:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: #f4f7fb;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    background: #f4f7fb;
}

a { color: inherit; }

button, input { font: inherit; }

button { cursor: pointer; }

button:disabled { cursor: wait; opacity: .65; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw;
    background: #fff;
    border-bottom: 1px solid #e4e9f1;
}

.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    background: #1f6feb; color: white; font-weight: 800; font-size: 20px;
    box-shadow: 0 7px 18px rgba(31, 111, 235, .25);
}
.brand strong { display: block; font-size: 16px; letter-spacing: .01em; }
.brand small { display: block; color: #7a879d; font-size: 11px; margin-top: 2px; }

nav a { color: #607089; text-decoration: none; font-size: 13px; font-weight: 650; padding: 10px 14px; border-radius: 9px; }
nav a.active, nav a:hover { color: #1f6feb; background: #edf4ff; }

.content-shell { width: min(1320px, 90vw); margin: 0 auto; flex: 1; padding: 48px 0 70px; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px 5vw; color: #8792a5; font-size: 11px; border-top: 1px solid #e4e9f1; background: #fff; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.detail-heading { align-items: flex-start; }
.eyebrow { color: #6e7d95; font-size: 10px; font-weight: 800; letter-spacing: .16em; margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -.035em; color: #121b2c; }
h2 { margin-bottom: 0; font-size: 19px; letter-spacing: -.02em; color: #172033; }
.subtitle { margin-bottom: 0; color: #728097; font-size: 14px; }
.source-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d8e4f5; background: #f8fbff; border-radius: 999px; padding: 9px 13px; color: #416187; font-size: 12px; font-weight: 700; white-space: nowrap; }
.source-dot { width: 7px; height: 7px; background: #27ae72; border-radius: 50%; box-shadow: 0 0 0 4px #ddf5e9; }
.back-link { display: inline-block; color: #3977c7; font-size: 12px; font-weight: 700; text-decoration: none; margin-bottom: 22px; }
.back-link:hover, .machine-link:hover { text-decoration: underline; }

.card { background: white; border: 1px solid #e3e9f2; border-radius: 16px; box-shadow: 0 8px 25px rgba(36, 55, 84, .045); }
.connect-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 28px; margin-bottom: 26px; }
.connect-card h2 { margin-bottom: 7px; }
.muted { color: #8490a4; font-size: 12px; }
.connect-form label { display: block; color: #52627b; font-size: 11px; font-weight: 750; margin-bottom: 7px; }
.token-row { display: flex; gap: 10px; }
input { min-width: 0; width: 100%; border: 1px solid #d4dce8; border-radius: 9px; padding: 11px 12px; color: #172033; background: #fbfcfe; outline: none; }
input:focus { border-color: #5793e8; box-shadow: 0 0 0 3px #e6f0ff; }
.primary-button, .secondary-button, .text-button { border: 0; border-radius: 9px; padding: 10px 14px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.primary-button { color: white; background: #1f6feb; box-shadow: 0 6px 15px rgba(31, 111, 235, .2); }
.primary-button:hover { background: #155bc5; }
.secondary-button { color: #355e91; border: 1px solid #cbdcf4; background: #f5f9ff; }
.secondary-button:hover { background: #eaf3ff; }
.text-button { color: #748198; background: transparent; padding-left: 5px; padding-right: 5px; }
.text-button:hover { color: #1f6feb; }
.inline-button { display: inline-block; text-decoration: none; }
.error-text, .error-card { color: #ae3f45; }
.error-text { margin: 8px 0 0; font-size: 12px; }
.error-card { padding: 22px; }
.error-card p { margin: 7px 0 14px; color: #7a4c54; font-size: 13px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 5px 0 18px; }
.last-updated { color: #8792a5; font-size: 12px; }
.last-updated strong { color: #4a5d78; }
.toolbar-actions { display: flex; align-items: center; gap: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.metric-card { position: relative; overflow: hidden; min-height: 125px; padding: 22px; display: flex; flex-direction: column; }
.metric-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #a3b2c7; }
.metric-card span { color: #738198; font-size: 11px; font-weight: 700; }
.metric-card strong { margin: 11px 0 3px; color: #162239; font-size: 29px; letter-spacing: -.04em; }
.metric-card small { color: #9aa5b5; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accent-blue::before { background: #4689ee; }
.accent-green::before { background: #2bb478; }
.accent-amber::before { background: #eca83e; }
.accent-red::before { background: #e66d72; }
.accent-purple::before { background: #8d74e8; }

.table-card { padding: 25px 0 10px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 25px 20px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th { padding: 10px 25px; color: #99a4b5; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-align: left; text-transform: uppercase; border-top: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; }
td { padding: 14px 25px; color: #4b5d76; font-size: 12px; border-bottom: 1px solid #f0f3f7; vertical-align: middle; }
tbody tr:hover { background: #fafcff; }
.machine-link { color: #1e63bd; font-size: 13px; font-weight: 800; text-decoration: none; }
.cell-subtitle { display: block; color: #a0aaba; font-size: 10px; margin-top: 4px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: capitalize; }
.status-badge > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-green { color: #18885a; background: #e7f8ef; }
.status-amber { color: #ad711e; background: #fff5df; }
.status-red { color: #bc4b51; background: #ffebed; }
.status-grey { color: #718096; background: #eef2f6; }
.disk-warning { color: #bc4b51; font-weight: 800; }
.empty-state { padding: 28px 25px; color: #8995a7; font-size: 13px; }
.loading-card { min-height: 105px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #718096; font-size: 13px; }
.spinner { width: 18px; height: 18px; border: 2px solid #d5e3f7; border-top-color: #347de1; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.detail-metrics { grid-template-columns: repeat(4, 1fr); }
.detail-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px; }
.detail-card { min-width: 0; padding: 25px 0 10px; }
.value-list { margin: 0; }
.value-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 25px; border-top: 1px solid #f0f3f7; }
.value-list dt { color: #8792a5; font-size: 12px; }
.value-list dd { margin: 0; color: #304461; font-size: 12px; font-weight: 750; text-align: right; }
.compact-table table { min-width: 500px; }
.compact-table th, .compact-table td { padding-left: 18px; padding-right: 18px; }

.trend-section { margin-top: 28px; }
.trend-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 18px; }
.trend-section-heading .muted { max-width: 620px; margin: 7px 0 0; line-height: 1.45; }
.range-picker { display: inline-flex; gap: 5px; padding: 4px; border: 1px solid #dce5f1; border-radius: 11px; background: #fff; flex-wrap: wrap; justify-content: flex-end; }
.range-button { border: 0; border-radius: 7px; padding: 7px 9px; color: #70809a; background: transparent; font-size: 11px; font-weight: 800; }
.range-button:hover { color: #356db7; background: #edf4ff; }
.range-active { color: #fff; background: #2d78d8; box-shadow: 0 3px 8px rgba(45, 120, 216, .2); }
.range-active:hover { color: #fff; background: #236ac6; }
.trend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.trend-card { min-width: 0; padding: 20px; }
.trend-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.trend-heading .eyebrow { margin-bottom: 5px; font-size: 9px; }
.trend-heading h2 { font-size: 16px; }
.trend-current { color: #286cc2; font-size: 18px; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.chart-frame { height: 168px; padding: 10px 0 0; }
.trend-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: #e9eef6; stroke-width: .45; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: #397fdf; stroke-width: 1.35; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-scale { display: flex; justify-content: space-between; gap: 10px; color: #8794a7; font-size: 10px; }
.chart-caption { margin: 9px 0 0; color: #9aa5b5; font-size: 10px; }
.chart-caption span { padding: 0 4px; color: #c1c9d4; }
.chart-empty { min-height: 190px; display: grid; place-items: center; color: #97a3b4; font-size: 12px; text-align: center; }

/* TV presentation routes. They intentionally use a separate layout so they fill a landscape
   display without the normal application chrome. The cloud API remains the only data source. */
.tv-shell { min-height: 100vh; background: #06090d; color: #edf5ff; overflow-x: hidden; }
.tv-page { min-height: 100vh; padding: 10px 14px 14px; background: radial-gradient(circle at 50% -30%, #15314c 0, #080d13 36%, #050709 82%); }
.tv-topline { min-height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 0 5px 11px; border-bottom: 1px solid #263441; }
.tv-brand { color: #75c7ff; font-size: 14px; font-weight: 900; letter-spacing: .08em; text-decoration: none; }
.tv-brand span { color: #7f8c9b; font-weight: 700; }
.tv-title-block { display: grid; gap: 3px; text-align: center; }
.tv-title-block strong { color: #f7fbff; font-size: 16px; }
.tv-title-block small { color: #91a4b8; font-size: 10px; }
.tv-topline-right { justify-self: end; display: inline-flex; align-items: center; gap: 8px; color: #9cb0c4; font-size: 11px; font-variant-numeric: tabular-nums; }
.tv-live-dot, .tv-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34dc82; box-shadow: 0 0 9px #34dc82; flex: 0 0 auto; }
.tv-not-connected { min-height: calc(100vh - 90px); display: grid; align-content: center; justify-items: center; gap: 12px; text-align: center; }
.tv-not-connected h1 { color: #f6fbff; font-size: clamp(25px, 3.5vw, 48px); }
.tv-not-connected p { max-width: 650px; margin: 0; color: #97aabc; line-height: 1.55; }
.tv-not-connected a { padding: 10px 14px; border: 1px solid #3a90d1; border-radius: 7px; color: #aee1ff; text-decoration: none; font-size: 12px; font-weight: 800; }
.tv-connect-row { display: flex; width: min(620px, 90vw); gap: 8px; }
.tv-token-input { border-color: #2d4e66; background: #09141d; color: #e7f5ff; box-shadow: none; }
.tv-token-input:focus { border-color: #5ec9ff; box-shadow: 0 0 0 3px rgba(94, 201, 255, .15); }
.tv-connect-button { border: 0; border-radius: 7px; padding: 10px 16px; color: #051117; background: #5ec9ff; font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.tv-connect-error { color: #ff9b9b !important; font-size: 11px; }

.tv-machine-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(200px, 1fr); gap: 10px; min-height: calc(100vh - 78px); padding-top: 10px; }
.tv-machine-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 16px; color: #eaf4ff; text-decoration: none; background: linear-gradient(145deg, rgba(17, 26, 35, .98), rgba(7, 11, 16, .99)); border: 1px solid #273948; border-radius: 8px; box-shadow: inset 0 1px rgba(255,255,255,.03); transition: border-color .15s ease, transform .15s ease; }
.tv-machine-card:hover { border-color: #5eaee8; transform: translateY(-1px); }
.tv-card-heading { display: flex; align-items: center; gap: 8px; }
.tv-card-heading strong { color: #fff; font-size: 17px; }
.tv-card-heading em { margin-left: auto; color: #71dc9d; font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.tv-card-location { min-height: 31px; margin: 8px 0; color: #8fa3b6; font-size: 11px; line-height: 1.35; }
.tv-card-primary { display: flex; align-items: baseline; gap: 8px; margin: auto 0 13px; }
.tv-card-primary strong { color: #e7fbff; font-size: clamp(31px, 3vw, 55px); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.tv-card-primary span { color: #8da2b5; font-size: 10px; }
.tv-card-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; color: #8da2b5; font-size: 11px; }
.tv-card-meta strong { color: #d9e6f0; font-weight: 700; font-variant-numeric: tabular-nums; }
.tv-card-footer { display: flex; justify-content: space-between; margin-top: 13px; padding-top: 10px; color: #74c8ff; font-size: 11px; font-weight: 800; border-top: 1px solid #1d2a35; }
.tv-idle .tv-status-dot { background: #f2b84b; box-shadow: 0 0 9px #f2b84b; }
.tv-idle .tv-card-heading em { color: #f3c368; }
.tv-attention .tv-status-dot { background: #f05d63; box-shadow: 0 0 9px #f05d63; }
.tv-attention .tv-card-heading em { color: #fa898d; }
.tv-unknown .tv-status-dot { background: #8da0b3; box-shadow: none; }
.tv-unknown .tv-card-heading em { color: #a5b0bb; }

.tv-machine-page { min-width: 1180px; }
.tv-machine-summary { display: grid; grid-template-columns: 1.4fr repeat(7, minmax(0, 1fr)); gap: 7px; padding: 10px 0 8px; }
.tv-state-box, .tv-metric { min-width: 0; min-height: 79px; padding: 11px 12px; background: rgba(11, 18, 25, .86); border: 1px solid #233542; border-radius: 6px; }
.tv-state-box { display: grid; align-content: center; border-left: 4px solid #74899d; }
.tv-state-running { border-left-color: #35d985; }
.tv-state-idle { border-left-color: #e7ae4c; }
.tv-state-box span, .tv-metric span { color: #8197aa; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.tv-state-box strong { color: #eafeef; font-size: 19px; letter-spacing: .04em; }
.tv-state-box small, .tv-metric small { overflow: hidden; color: #8da1b4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tv-metric { display: grid; align-content: center; gap: 3px; }
.tv-metric strong { overflow: hidden; color: #f0f8ff; font-size: clamp(18px, 2vw, 29px); letter-spacing: -.04em; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tv-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 2px 0 7px; }
.tv-controls > div:first-child { display: grid; gap: 3px; }
.tv-controls strong { color: #e5f1fb; font-size: 12px; }
.tv-controls span { color: #8ba0b3; font-size: 10px; }
.tv-range-picker { display: flex; gap: 4px; padding: 3px; border: 1px solid #2d4354; border-radius: 6px; background: #0c151e; }
.tv-range-picker button { border: 0; border-radius: 4px; padding: 6px 9px; color: #91a5b8; background: transparent; font-size: 9px; font-weight: 900; letter-spacing: .05em; }
.tv-range-picker button:hover { color: #cceaff; background: #172a3a; }
.tv-range-picker .tv-range-active { color: #041017; background: #57c4ff; }
.tv-chart-card { padding: 10px 11px 7px; background: rgba(7, 12, 17, .92); border: 1px solid #263b4a; border-radius: 7px; box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.tv-chart-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 0 2px 8px; }
.tv-kicker { margin: 0 0 3px; color: #74c9ff; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.tv-chart-heading h2 { color: #f2f9ff; font-size: 15px; }
.tv-chart-heading > p { max-width: 430px; margin: 0; color: #8097aa; font-size: 10px; line-height: 1.35; text-align: right; }
.tv-chart-scroll { max-height: calc(100vh - 245px); overflow: auto; border: 1px solid #182732; background: #060a0e; }
.tv-all-values-svg { display: block; min-width: 1180px; width: 100%; }
.tv-chart-time-grid { stroke: #1e3545; stroke-width: 1; vector-effect: non-scaling-stroke; }
.tv-chart-row-grid { stroke: #172731; stroke-width: 1; vector-effect: non-scaling-stroke; }
.tv-chart-time-label { fill: #73899b; font-size: 14px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.tv-chart-series-label { font-size: 14px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 800; }
.tv-chart-series-value { fill: #7890a2; font-size: 11px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.tv-chart-series-line { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tv-chart-caption { margin: 7px 2px 0; color: #72899b; font-size: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.tv-chart-empty { min-height: 300px; display: grid; place-items: center; color: #859caf; font-size: 12px; }

/* PHP-inspired factory wall.  The visual language follows the established monitor screen, while
   all data is supplied by the authenticated C# cloud API rather than browser-side JSON files. */
.php-inspired-wall { padding-top: 7px; }
.php-tv-header { min-height: 58px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 6px 9px; border-bottom: 1px solid #2b333a; }
.php-hq-time { display: grid; gap: 2px; color: #42e98a; font-variant-numeric: tabular-nums; }
.php-hq-time small, .php-kicker { color: #7d91a2; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.php-hq-time strong { font-size: 12px; }
.php-factory-title { display: grid; gap: 2px; justify-items: center; text-align: center; }
.php-factory-title > strong { color: #fff; font-size: 16px; text-transform: uppercase; }
.php-factory-title small { color: #8aa0b4; font-size: 10px; }
.php-header-actions { justify-self: end; display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: 6px; }
.php-date-chip, .php-shift-chip, .php-source-label { border: 1px solid #2d4354; border-radius: 3px; padding: 4px 6px; color: #b6c8d6; background: #0c141a; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.php-shift-ready { color: #73e9a6; border-color: #266144; }
.php-shift-missing { color: #f4be67; border-color: #70552e; }
.php-source-label { color: #93a8b8; }
.php-source-label.php-live { color: #39e888; border-color: #237d4b; box-shadow: 0 0 10px rgba(52,220,130,.15); }
.php-machine-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(295px, 1fr); gap: 8px; min-height: calc(100vh - 83px); padding-top: 8px; }
.php-machine-card { display: flex; min-width: 0; flex-direction: column; padding: 7px; color: #e8f2fa; text-decoration: none; background: linear-gradient(145deg, #10171d, #070b0e); border: 1px solid #2b3740; border-radius: 7px; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.php-machine-card:hover { border-color: #50b8ef; box-shadow: 0 0 0 1px rgba(80,184,239,.12), 0 10px 22px rgba(0,0,0,.2); }
.php-card-titlebar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-height: 22px; padding: 0 2px; }
.php-card-titlebar strong { justify-self: center; overflow: hidden; color: #fff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.php-window-dots { display: inline-flex; gap: 4px; }
.php-window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #65717b; }
.php-window-dots .led-good { background: #35d986; box-shadow: 0 0 6px rgba(53,217,134,.7); }
.php-window-dots .led-bad { background: #f05146; box-shadow: 0 0 6px rgba(240,81,70,.6); }
.php-window-dots .led-dim { background: #9da4aa; }
.php-expand { color: #67c9ff; font-size: 8px; font-weight: 900; }
.php-card-shiftbar { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 22px; padding-top: 2px; }
.php-shift-label { overflow: hidden; max-width: 66%; color: #cfdce5; font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.php-card-shiftbar .php-source-label { padding: 2px 4px; font-size: 8px; }
.php-card-location { overflow: hidden; min-height: 16px; margin: 0 0 5px; color: #7d96a9; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.php-card-main { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 116px; gap: 8px; }
.php-values-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 3px; margin: 0; }
.php-values-grid div { min-width: 0; min-height: 27px; padding: 3px 5px; border: 1px solid #25313a; border-radius: 2px; background: rgba(6,10,13,.55); }
.php-values-grid dt { overflow: hidden; color: #778c9d; font-size: 7px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.php-values-grid dd { overflow: hidden; margin: 2px 0 0; color: #dff6ff; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.php-shift-visual { display: grid; grid-template-columns: 79px 1fr; align-items: center; gap: 7px; min-width: 0; }
.php-pie { width: 76px; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 1px 9px rgba(0,0,0,.45); }
.php-pie::after { display: block; width: 42%; height: 42%; margin: 29%; border-radius: 50%; background: #0d151b; content: ""; }
.php-pie-legend { display: grid; gap: 5px; color: #aebfcb; font-size: 8px; font-variant-numeric: tabular-nums; }
.php-pie-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.php-pie-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 1px; }
.state-active { background: #30d17b; }.state-idle { background: #f15143; }.state-nonet { background: #8f97a1; }
.php-empty-pie { display: grid; min-height: 76px; place-items: center; padding: 5px; border: 1px dashed #40505c; border-radius: 50%; color: #8295a5; font-size: 8px; text-align: center; }
.php-shift-counters { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 6px; }
.php-counter-block { display: grid; grid-template-columns: auto 1fr; column-gap: 5px; row-gap: 2px; min-width: 0; padding: 4px 5px; border: 1px solid #25323a; background: #090f13; color: #91a4b3; font-size: 7px; }
.php-counter-block strong { grid-column: 1 / -1; color: #e8f5fb; font-size: 8px; }
.php-counter-block span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.php-counter-block b { color: #9ef4c4; font-weight: 800; }.php-counter-empty { grid-template-columns: 1fr; color: #728697; }
.php-card-bottom { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding: 5px 1px 0; color: #8197a7; font-size: 8px; font-variant-numeric: tabular-nums; border-top: 1px solid #1e2a31; }
.php-card-bottom span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.php-card-live { border-color: #247d4b; }.php-card-idle { border-color: #6c5a35; }.php-card-attention { border-color: #62363a; }.php-card-unknown { border-color: #3e4b55; }
.php-shift-notice { margin: 7px 2px 0; color: #dbb66d; font-size: 10px; text-align: center; }

.php-expanded-machine { min-width: 1180px; }
.php-expanded-summary { display: grid; grid-template-columns: 1.35fr .95fr 1fr; min-height: 166px; gap: 8px; padding: 8px 0; }
.php-expanded-values, .php-expanded-state, .php-expanded-shifts { min-width: 0; padding: 8px; border: 1px solid #263541; background: rgba(6,11,15,.86); }
.php-expanded-values .php-values-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.php-expanded-state { display: grid; grid-template-columns: 120px 1fr; align-items: center; column-gap: 10px; }
.php-expanded-state .php-kicker { grid-column: 1 / -1; margin: 0 0 3px; }.php-pie-large { width: 112px; }
.php-empty-pie-large { min-height: 112px; }.php-expanded-shifts { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-content: start; }
.php-expanded-meta { grid-column: 1 / -1; margin: 2px 0 0; color: #8296a6; font-size: 9px; line-height: 1.45; }
.php-expanded-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 1px 0 7px; }
.php-expanded-controls > div:first-child { display: grid; gap: 3px; }.php-expanded-controls strong { color: #e5f1fb; font-size: 11px; }.php-expanded-controls span { color: #8ba0b3; font-size: 9px; }


#blazor-error-ui { color-scheme: light only; background: #fff1d6; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .15); box-sizing: border-box; display: none; left: 0; padding: .7rem 1.2rem; position: fixed; width: 100%; z-index: 1000; color: #654914; font-size: 12px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .55rem; }

@media (max-width: 850px) {
    .content-shell { width: min(94vw, 700px); padding-top: 32px; }
    .topbar { padding: 0 3vw; }
    .page-heading, .toolbar { align-items: flex-start; flex-direction: column; }
    .source-pill { align-self: flex-start; }
    .connect-card, .detail-grid { grid-template-columns: 1fr; }
    .metric-grid, .detail-metrics { grid-template-columns: repeat(2, 1fr); }
    .trend-grid { grid-template-columns: repeat(2, 1fr); }
    .trend-section-heading { align-items: flex-start; flex-direction: column; }
    .range-picker { justify-content: flex-start; }
    .toolbar-actions { width: 100%; justify-content: flex-start; }
    .site-footer { padding: 16px 3vw; flex-direction: column; }
    .tv-machine-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .metric-grid, .detail-metrics, .trend-grid { grid-template-columns: 1fr; }
    .connect-card { padding: 20px; }
    .token-row { flex-direction: column; }
    .tv-machine-wall { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Factory operator TV. This deliberately follows the proven PHP wall: a fixed
   3x3 landscape canvas and a full-screen in-place machine expansion.
   -------------------------------------------------------------------------- */
.tv-shell { height: 100vh; min-height: 0; overflow: hidden; background: #050505; }
.operator-wall, .operator-expanded { height: 100vh; min-width: 1180px; overflow: hidden; color: #e9eef4; background: #070707; font-family: "Segoe UI", Arial, sans-serif; }
.operator-wall button, .operator-wall input, .operator-expanded button, .operator-expanded select { border-radius: 2px; font: inherit; }
.operator-header { height: 60px; display: grid; grid-template-columns: 170px 150px 1fr auto; align-items: center; gap: 10px; padding: 5px 9px; border-bottom: 1px solid #303030; background: #0b0b0b; }
.operator-header nav { align-self: start; display: flex; gap: 4px; }
.operator-header nav a { padding: 3px 6px; border: 1px solid #333; border-radius: 2px; color: #b4bec8; background: #141414; font-size: 9px; text-decoration: none; }
.operator-header nav a.active { color: #4df29a; border-color: #275b41; background: #0b1b12; }
.operator-clock { display: grid; gap: 2px; color: #00ff88; font-size: 10px; font-variant-numeric: tabular-nums; }.operator-clock span { font-size: 8px; }.operator-clock strong { font-size: 13px; }
.operator-title { display: grid; justify-items: center; gap: 2px; color: #fff; }.operator-title strong { font-size: 16px; }.operator-title small { color: #8290a0; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.operator-header-controls { justify-self: end; display: flex; align-items: center; gap: 4px; font-size: 9px; }
.operator-header-controls > span, .operator-header-controls button { height: 26px; display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid #343434; color: #e4ebf2; background: #171717; font-weight: 700; }
.operator-header-controls button:not(:disabled):hover, .operator-header-controls button.selected { color: #07110c; background: #35dd87; border-color: #35dd87; }.operator-header-controls button:disabled { cursor: not-allowed; color: #79818a; opacity: .8; }
.operator-date { font-variant-numeric: tabular-nums; }
.operator-connect { height: calc(100vh - 60px); display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; background: radial-gradient(circle, #15212b 0, #070707 54%); }
.operator-connect h1 { margin: 0; color: #fff; font-size: 25px; }.operator-connect p { max-width: 650px; margin: 0; color: #9ca8b3; font-size: 12px; }.operator-connect > div { display: flex; width: 580px; gap: 7px; }.operator-connect input { padding: 9px; color: #fff; background: #0e1318; border: 1px solid #34424f; }.operator-connect button, .operator-connect a { padding: 9px 16px; border: 1px solid #287e50; color: #fff; background: #169557; font-size: 11px; font-weight: 800; text-decoration: none; }.operator-error { color: #ff6b67 !important; }
.operator-grid { height: calc(100vh - 60px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; overflow: hidden; }
.operator-tile { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 5px; border: 1px solid #2b2b2b; border-radius: 6px; background: #111; box-shadow: inset 0 0 0 1px rgba(255,255,255,.015); overflow: hidden; }.operator-tile.printing { border-color: #24603f; }.operator-tile.offline { border-color: #5a2929; }
.operator-tile-title { height: 21px; display: grid; grid-template-columns: 55px 1fr 26px; align-items: center; }.operator-tile-title > strong { overflow: hidden; color: #fff; font-size: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }.operator-tile-title > a { color: #55c9ff; font-size: 16px; line-height: 1; text-align: center; text-decoration: none; }.operator-tile-title > a:hover { color: #fff; }
.operator-lights { display: inline-flex; align-items: center; gap: 4px; }.operator-lights i { width: 8px; height: 8px; border-radius: 50%; background: #ed4b42; box-shadow: 0 0 4px rgba(237,75,66,.4); }.operator-lights i.on { background: #2bd17d; box-shadow: 0 0 5px rgba(43,209,125,.65); }
.operator-shift-row { height: 20px; display: grid; grid-template-columns: minmax(80px, auto) 1fr auto; align-items: center; gap: 5px; font-size: 7px; }.shift-alert { overflow: hidden; padding: 2px 4px; border: 1px solid #2b4f3a; border-radius: 999px; color: #59e398; background: #0d1712; text-overflow: ellipsis; white-space: nowrap; }.shift-alert.no-shift { color: #ff6d62; border-color: #5c2f2d; background: #170d0d; }.operator-location { overflow: hidden; color: #33b8ff; font-size: 8px; font-weight: 800; text-align: right; text-overflow: ellipsis; white-space: nowrap; }.operator-shift-row time { color: #7d8792; font-variant-numeric: tabular-nums; white-space: nowrap; }
.operator-tile progress, .expanded-values-pane progress { width: 100%; height: 4px; margin: 1px 0 4px; border: 0; background: #242424; accent-color: #2cbd74; }.operator-tile progress::-webkit-progress-bar, .expanded-values-pane progress::-webkit-progress-bar { background: #242424; }.operator-tile progress::-webkit-progress-value, .expanded-values-pane progress::-webkit-progress-value { background: #2cbd74; }
.operator-tile-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 23% 42% 35%; gap: 5px; overflow: hidden; }
.operator-left-data { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.operator-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px; margin: 0; }.operator-values > div { min-width: 0; min-height: 24px; padding: 3px 4px; border: 1px solid #292929; background: #0b0b0b; }.operator-values dt { overflow: hidden; color: #70808e; font-size: 6px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }.operator-values dd { overflow: hidden; margin: 2px 0 0; color: #d8f2ff; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.operator-dual-counters { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: auto; }.operator-dual-counters .php-counter-block { padding: 2px 3px; border-color: #292929; background: #090909; font-size: 6px; }.operator-dual-counters .php-counter-block strong { font-size: 6px; }.operator-starts { display: block; padding-top: 2px; color: #d9e4eb; font-size: 7px; text-align: center; }
.operator-state-visuals { min-width: 0; min-height: 0; display: grid; grid-template-columns: 47% 53%; border-left: 1px solid #242424; border-right: 1px solid #242424; }.operator-pie-column, .operator-bars-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; }.operator-pie-column > small, .operator-bars-column > small, .expanded-pie-pane > small, .expanded-bars-pane > small { overflow: hidden; width: 100%; height: 16px; color: #8d99a5; font-size: 7px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.operator-pie { width: min(83px, 66%); aspect-ratio: 1; margin-top: 3px; border-radius: 50%; background: conic-gradient(#858585 0 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }.operator-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 5px; margin-top: 4px; color: #7f8b95; font-size: 6px; }.operator-legend span { white-space: nowrap; }.operator-legend i { display: inline-block; width: 6px; height: 6px; margin-right: 2px; }.operator-legend i.active, .operator-bars i.active { background: #2dcc7b; }.operator-legend i.idle, .operator-bars i.idle { background: #ef4c3d; }.operator-legend i.no-net, .operator-bars i.no-net { background: #8a8d90; }
.operator-bars { flex: 1; width: 100%; display: flex; align-items: end; justify-content: space-around; gap: 5px; padding: 8px 4px 2px; border-bottom: 1px solid #333; }.operator-bars > span { position: relative; height: 100%; flex: 1; display: flex; align-items: end; justify-content: center; }.operator-bars i { display: block; width: 55%; min-height: 2px; max-height: 100%; }.operator-bars b { position: absolute; top: -7px; color: #84909a; font-size: 6px; font-weight: 500; white-space: nowrap; }.operator-bars em { position: absolute; bottom: -12px; color: #727b83; font-size: 6px; font-style: normal; white-space: nowrap; }
.operator-files-card { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding-left: 2px; color: #94a3b0; }.operator-files-card h4, .expanded-events-card h4 { margin: 0; color: #b7c8d5; font-size: 9px; }.operator-files-card > p, .expanded-events-card > p { margin: 2px 0 3px; color: #71808c; font-size: 6px; }.operator-table-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; border: 1px solid #202830; background: #080b0e; scrollbar-width: thin; }.operator-table-scroll table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 6px; }.operator-table-scroll th, .operator-table-scroll td { overflow: hidden; padding: 3px; border-bottom: 1px solid #171e24; text-align: left; text-overflow: ellipsis; white-space: nowrap; }.operator-table-scroll th { position: sticky; top: 0; color: #88a0b2; background: #0c1116; }.operator-table-scroll th:first-child, .operator-table-scroll td:first-child { width: 52%; }.operator-files-card footer, .expanded-events-card footer { padding-top: 3px; color: #87a9be; font-size: 6px; }
.operator-empty-slot { border-style: dashed; border-color: #252b30; background: repeating-linear-gradient(135deg,#090b0d,#090b0d 12px,#0b0e10 12px,#0b0e10 24px); }.operator-empty-slot > div:last-child { flex: 1; display: grid; place-content: center; justify-items: center; gap: 5px; padding: 20px; text-align: center; }.operator-empty-slot > div:last-child strong { color: #596976; font-size: 10px; }.operator-empty-slot > div:last-child span { max-width: 250px; color: #43515d; font-size: 8px; line-height: 1.4; }
.shift-manager-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.82); backdrop-filter: blur(2px); }.shift-manager-panel { width: min(720px,80vw); padding: 12px; border: 1px solid #34434f; border-radius: 6px; background: #0d1115; box-shadow: 0 24px 80px rgba(0,0,0,.75); }.shift-manager-panel header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 9px; border-bottom: 1px solid #28323a; }.shift-manager-panel header strong { color: #fff; font-size: 13px; }.shift-manager-panel header button { padding: 5px 9px; border: 1px solid #81423d; color: #fff; background: #d64b42; font-size: 9px; font-weight: 800; }.shift-manager-status { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; padding: 12px 0; }.shift-manager-status span { display: grid; gap: 5px; padding: 10px; border: 1px solid #28333c; color: #82909c; background: #090c0f; font-size: 8px; }.shift-manager-status strong { color: #dce8f0; font-size: 16px; }.shift-manager-panel p { margin: 0 0 8px; color: #9aa9b5; font-size: 10px; line-height: 1.55; }.shift-manager-panel .shift-manager-warning { margin-bottom: 0; padding: 8px; border-left: 3px solid #cf9c45; color: #e0bd7c; background: #17130c; }

/* Expanded machine view */
.operator-expanded:focus { outline: none; }
.expanded-header { height: 42px; display: grid; grid-template-columns: 38px 86px 1fr auto minmax(200px,auto); align-items: center; gap: 8px; padding: 4px 7px; border-top: 6px solid #19343a; border-bottom: 1px solid #272727; background: #080808; }.expanded-header > strong { color: #fff; font-size: 13px; text-align: center; }.expanded-close { padding: 5px 8px; border-radius: 3px; color: #fff; background: #e74d43; font-size: 9px; font-weight: 900; text-decoration: none; white-space: nowrap; }.expanded-close:hover { background: #ff655b; }.expanded-shifts { display: flex; gap: 3px; }.expanded-shifts span { padding: 2px 5px; border: 1px solid #333; border-radius: 999px; color: #8b9299; font-size: 7px; }.expanded-shifts span.active { color: #65d7ff; border-color: #316076; background: #101b21; }.expanded-location { overflow: hidden; color: #32baff; font-size: 11px; font-weight: 800; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.expanded-overview { height: 31vh; min-height: 195px; display: grid; grid-template-columns: 145px 270px 1fr 285px; gap: 8px; padding: 7px; border-bottom: 1px solid #272727; overflow: hidden; }.expanded-values-pane, .expanded-pie-pane, .expanded-bars-pane { min-width: 0; min-height: 0; }.expanded-values-pane { display: flex; flex-direction: column; }.expanded-values-pane .operator-values > div { min-height: 26px; }.expanded-values-pane .operator-dual-counters { margin-top: 5px; }.expanded-pie-pane { display: grid; grid-template-columns: 145px 1fr; align-items: center; }.expanded-pie-pane > small { grid-column: 1 / -1; }.expanded-pie { width: 130px; margin: 0 auto; }.expanded-pie-pane .operator-legend { display: grid; font-size: 8px; }.expanded-bars-pane { display: flex; flex-direction: column; }.expanded-bars { padding: 18px 20px 16px; }.expanded-bars b { top: -13px; color: #a4adb5; font-size: 8px; }.expanded-bars em { bottom: -14px; font-size: 8px; }.expanded-overview > .operator-files-card { padding: 7px; border: 1px solid #202830; background: #080b0e; }.expanded-overview .operator-files-card h4 { font-size: 10px; }.expanded-overview .operator-files-card > p, .expanded-overview .operator-files-card footer { font-size: 8px; }.expanded-overview .operator-table-scroll table { font-size: 8px; }
.expanded-chart-panel { height: calc(69vh - 42px); min-height: 0; padding: 5px 7px 7px; display: flex; flex-direction: column; }.expanded-chart-controls { min-height: 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 3px 6px; border: 1px solid #242a30; background: #0b0d0f; color: #a5afb8; font-size: 8px; }.expanded-chart-controls label { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }.expanded-chart-controls input { width: auto; margin: 0; padding: 0; }.expanded-chart-controls select, .expanded-chart-controls button { padding: 2px 5px; border: 1px solid #34404a; color: #fff; background: #11161b; font-size: 8px; }.expanded-chart-controls button:hover { border-color: #2dcc7b; }.cloud-chip { color: #fff; font-weight: 800; }.chart-threshold { color: #8f9caa; }.chart-stats { margin-left: auto; color: #a9c9dc; font-variant-numeric: tabular-nums; }
.expanded-chart-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 6px; padding-top: 5px; }.expanded-plot { min-width: 0; min-height: 0; position: relative; border: 1px solid #1b2228; background: #050607; }.operator-series-legend { position: absolute; z-index: 2; top: 5px; left: 50%; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; transform: translateX(-50%); color: #c4ccd3; font-size: 7px; }.operator-series-legend span::before { display: inline-block; width: 14px; height: 2px; margin-right: 3px; vertical-align: middle; content: ""; }.operator-series-legend .print::before { background:#31d887; }.operator-series-legend .hopper::before { background:#00d8ff; }.operator-series-legend .mix::before { background:#f2d33c; }.operator-series-legend .hopper-torque::before { background:#ff9f2f; }.operator-series-legend .mix-torque::before { background:#ef466f; }.operator-series-legend .temp::before { background:#b666d2; }.operator-series-legend .robot::before { background:#7f8cff; }
.operator-trend-wrap { width: 100%; height: 100%; min-height: 0; }.operator-trend-svg { display: block; width: 100%; height: 100%; }.operator-grid-line { stroke: #263039; stroke-width: 1; vector-effect: non-scaling-stroke; }.operator-grid-line.horizontal { stroke: #171d22; }.operator-axis-label { fill: #77828d; font-size: 11px; font-family: "Segoe UI",Arial,sans-serif; }.operator-series-line { stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }.operator-state-band.active { fill: rgba(45,204,123,.75); }.operator-state-band.idle { fill: rgba(239,76,61,.76); }.operator-state-band.no-net { fill: rgba(138,141,144,.72); }.operator-state-text { fill: #edf6f0; font-size: 10px; font-weight: 700; }.operator-event-line { stroke: #00c9ff; stroke-width: 1; stroke-dasharray: 3 3; opacity: .65; vector-effect: non-scaling-stroke; }.operator-event-line.selected { stroke: #fff; stroke-width: 3; opacity: 1; }.operator-event-label { fill: #62d9f5; font-size: 8px; }.operator-chart-empty { height: 100%; display: grid; place-items: center; color: #71808c; font-size: 11px; }
.expanded-events-card { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 6px; border: 1px solid #202830; background: #080b0e; }.expanded-events-card h4 { font-size: 10px; }.expanded-events-card > p, .expanded-events-card footer { font-size: 7px; }.expanded-events-card .operator-table-scroll table { font-size: 7px; }.expanded-events-card .operator-table-scroll th:first-child, .expanded-events-card .operator-table-scroll td:first-child { width: 27%; }.expanded-events-card .operator-table-scroll th:nth-child(2), .expanded-events-card .operator-table-scroll td:nth-child(2) { width: 35%; }.expanded-events-card tbody tr { cursor: pointer; }.expanded-events-card tbody tr:hover, .expanded-events-card tbody tr.selected { background: rgba(40,142,210,.18); }.expanded-events-card td.effective { color: #43df91; }.expanded-events-card td.dry { color: #ff7369; }

@media (max-height: 800px) {
    .operator-grid { gap: 4px; padding: 4px; }.operator-tile { padding: 3px; }.operator-values > div { min-height: 19px; padding: 2px 3px; }.operator-pie { width: 60px; }.operator-files-card > p { display: none; }.expanded-overview { height: 30vh; min-height: 170px; }.expanded-chart-panel { height: calc(70vh - 42px); }.expanded-pie { width: 105px; }
}

/* Administrator Shift Manager. Dense configuration cards keep the light fleet style while
   allowing real factory calendars, machine assignments and weather overrides to be edited. */
.admin-login-card { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; padding: 24px; margin-bottom: 22px; }.admin-login-card h2 { margin: 5px 0 0; color: #172033; font-size: 22px; }.admin-login-card p { margin: 8px 0 0; line-height: 1.5; }.form-help { margin: 8px 0 12px; color: #7b899e; font-size: 11px; line-height: 1.45; }.admin-toolbar { margin-bottom: 16px; }.admin-toolbar .cell-subtitle { display: block; margin-top: 4px; }.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }.admin-panel { min-width: 0; padding: 20px; }.admin-panel .section-heading { margin-bottom: 14px; }.admin-panel h2 { font-size: 17px; }.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 12px; }.admin-form-grid label, .checkbox-line, .weekday-picker { display: grid; gap: 5px; color: #68788f; font-size: 10px; font-weight: 750; }.admin-form-grid input, .admin-form-grid select { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #d5deea; border-radius: 7px; color: #304461; background: #f8faff; font: inherit; }.compact-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }.weekday-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 5px 0 12px; }.weekday-picker > span { margin-right: 4px; }.weekday-picker label, .checkbox-line { display: inline-flex; align-items: center; gap: 5px; color: #596b83; font-size: 10px; font-weight: 650; }.weekday-picker input, .checkbox-line input { width: auto; margin: 0; accent-color: #1f6feb; }.admin-panel > .primary-button, .admin-panel > .secondary-button { margin: 4px 5px 14px 0; }.admin-table-scroll { max-height: 240px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }.admin-table-scroll table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 10px; }.admin-table-scroll th, .admin-table-scroll td { padding: 8px 9px; border-bottom: 1px solid #edf1f6; color: #4b5d76; text-align: left; vertical-align: top; white-space: nowrap; }.admin-table-scroll th { position: sticky; top: 0; z-index: 1; color: #7e8ca0; background: #f3f7fb; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }.admin-table-scroll tbody tr:last-child td { border-bottom: 0; }.admin-table-scroll strong { color: #304461; }.danger-link { color: #bc4b51; }.success-card { padding: 14px 18px; margin-bottom: 18px; border: 1px solid #ccebdc; border-radius: 10px; color: #18885a; background: #eaf8f1; }.success-card p { display: inline; margin-left: 5px; color: #4e8069; font-size: 12px; }.admin-audit-card { margin-bottom: 20px; }.admin-audit-card .table-scroll { max-height: 260px; }

@media (max-width: 1050px) {
    .admin-grid, .admin-login-card { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
    .admin-form-grid, .compact-form { grid-template-columns: 1fr; }.admin-panel { padding: 15px; }.admin-table-scroll { margin-left: -2px; margin-right: -2px; }
}

.workspace-login { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e4eaf2; color: #68788f; font-size: 11px; font-weight: 700; }.workspace-login > div { min-height: 42px; }

/* --------------------------------------------------------------------------
   Live wall redesign

   The original PHP wall tried to show the full expanded machine experience in
   every 3 x 3 tile.  That made a landscape TV use 6-8px text.  These modes
   keep the same cloud data and production semantics, but give each density a
   deliberate job: minimal fleet status, normal operations, or one expanded
   machine with its full history.
   -------------------------------------------------------------------------- */
.live-app-shell { min-height: 100vh; background: #f4f7fb; }
.live-topbar { position: relative; z-index: 3; }
.live-content-shell { min-width: 0; padding: 0; }
.live-wall-page { width: min(1760px, calc(100vw - 56px)); height: calc(100vh - 76px); min-height: 0; display: flex; flex-direction: column; gap: 16px; margin: 0 auto; padding: 26px 0 20px; }
.live-wall-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex: 0 0 auto; }
.live-wall-heading .eyebrow { margin: 0 0 8px; }
.live-wall-heading h1 { margin: 0; color: #172033; font-size: clamp(30px, 2.35vw, 43px); line-height: 1; letter-spacing: -.045em; }
.live-wall-subtitle { margin: 10px 0 0; color: #6e7e96; font-size: 13px; }
.live-heading-status { display: flex; align-items: center; gap: 16px; padding-bottom: 3px; }
.live-clock { display: grid; gap: 2px; min-width: 86px; color: #1c8a61; font-variant-numeric: tabular-nums; }
.live-clock span, .live-toolbar-label { color: #8593a7; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.live-clock strong { font-size: 17px; letter-spacing: -.02em; }
.live-wall-toolbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 13px 16px; flex: 0 0 auto; }
.live-toolbar-copy { display: grid; gap: 3px; min-width: 250px; }
.live-toolbar-copy strong { color: #263a58; font-size: 14px; }
.live-toolbar-copy small { color: #78889e; font-size: 11px; }
.live-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.live-mode-picker { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #dce5f1; border-radius: 9px; background: #f7faff; }
.live-mode-button { border: 0; border-radius: 6px; padding: 7px 11px; color: #60708a; background: transparent; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.live-mode-button:hover { color: #1f6feb; background: #edf4ff; }
.live-mode-button.is-active { color: #fff; background: #1f6feb; box-shadow: 0 2px 6px rgba(31,111,235,.2); }
.live-page-status { color: #718198; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-page-button, .live-auto-button { min-height: 33px; padding: 7px 10px; font-size: 10px; }
.live-auto-button.is-active { color: #18885a; border-color: #bde7d0; background: #eaf8f1; }
.live-connect-card { width: min(680px, 100%); display: grid; gap: 12px; place-self: center; margin: auto; padding: 28px; }
.live-connect-card h1 { margin: 0; color: #172033; font-size: 25px; }.live-connect-card p { max-width: 600px; margin: 0; color: #718096; font-size: 13px; line-height: 1.5; }
.live-connect-row { display: flex; gap: 8px; margin-top: 4px; }.live-connect-row input { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid #d5deea; border-radius: 7px; color: #263a58; background: #fff; font: inherit; }
.live-machine-grid { min-height: 0; flex: 1; display: grid; gap: 16px; }
.live-minimal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
.live-normal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.live-machine-card { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 15px; border: 1px solid #dce5ef; border-radius: 15px; color: #42546d; background: #fff; box-shadow: 0 8px 24px rgba(36,55,84,.06); }
.live-machine-card.printing { border-color: #b9e8cf; box-shadow: 0 8px 24px rgba(34,140,91,.09); }.live-machine-card.idle { border-color: #f0d79d; }.live-machine-card.offline { border-color: #efcbd0; }
.live-machine-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.live-machine-identity { display: flex; align-items: center; min-width: 0; gap: 9px; }.live-machine-identity > div { min-width: 0; }.live-machine-identity h2 { overflow: hidden; margin: 0; color: #1c2d47; font-size: 15px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }.live-machine-identity span:not(.live-state-dot) { display: block; overflow: hidden; margin-top: 3px; color: #8795a9; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.live-state-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #9aa5b5; box-shadow: 0 0 0 4px rgba(154,165,181,.12); }.live-state-dot.printing { background: #2bb478; box-shadow: 0 0 0 4px rgba(43,180,120,.13); }.live-state-dot.idle { background: #eca83e; box-shadow: 0 0 0 4px rgba(236,168,62,.14); }.live-state-dot.offline { background: #d45b66; box-shadow: 0 0 0 4px rgba(212,91,102,.13); }
.live-card-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 8px; }.live-card-actions .table-action { white-space: nowrap; }
.status-badge.idle { color: #8a641f; border-color: #f0d79d; background: #fff7e7; }.status-badge.unreachable { color: #b64f58; border-color: #efcbd0; background: #fff1f2; }.status-badge.collecting { color: #18885a; border-color: #ccebdc; background: #eaf8f1; }

/* Minimal: exactly the data needed to scan nine machine states at a distance. */
.live-minimal-card { gap: 10px; padding: 16px; }.live-minimal-card .table-action { align-self: center; }.live-status-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.live-status-line time { overflow: hidden; color: #7d8ca0; font-size: 10px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.live-minimal-job { display: grid; gap: 5px; min-width: 0; margin-top: auto; padding: 11px 12px; border: 1px solid #e6ecf3; border-radius: 10px; background: #f8faff; }.live-minimal-job span { color: #8795a8; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }.live-minimal-job strong { overflow: hidden; color: #294361; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.live-minimal-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }.live-minimal-metrics span { display: grid; gap: 2px; min-width: 0; padding: 7px 8px; border-left: 3px solid #d9e5f5; background: #fbfcfe; }.live-minimal-metrics small { overflow: hidden; color: #8a98aa; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.live-minimal-metrics strong { overflow: hidden; color: #344d6d; font-size: 13px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.live-minimal-card footer { display: flex; justify-content: space-between; gap: 8px; min-width: 0; padding-top: 2px; color: #7e8da1; font-size: 9px; }.live-minimal-card footer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Normal: production context without forcing an expanded graph into every tile. */
.live-normal-card { gap: 9px; padding: 15px 16px 11px; }.live-normal-job-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; min-width: 0; }.live-current-job { display: grid; gap: 2px; min-width: 0; }.live-current-job span, .live-progress-copy span { color: #8795a8; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }.live-current-job strong { overflow: hidden; color: #294361; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }.live-current-job small { overflow: hidden; color: #8291a5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.live-progress-copy { display: grid; justify-items: end; gap: 2px; flex: 0 0 auto; }.live-progress-copy strong { color: #1f6feb; font-size: 16px; font-variant-numeric: tabular-nums; }
.live-progress { width: 100%; height: 5px; overflow: hidden; border: 0; border-radius: 999px; background: #e8eef6; }.live-progress::-webkit-progress-bar { background: #e8eef6; }.live-progress::-webkit-progress-value { background: linear-gradient(90deg,#1f6feb,#36a3f7); border-radius: 999px; }.live-progress::-moz-progress-bar { background: linear-gradient(90deg,#1f6feb,#36a3f7); border-radius: 999px; }
.live-normal-details { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(235px, .9fr); gap: 12px; min-height: 0; }.live-values-panel { display: grid; gap: 7px; min-width: 0; }.live-values-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }.live-values-grid > span { display: grid; gap: 2px; min-width: 0; padding: 6px 7px; border: 1px solid #e7edf4; border-radius: 7px; background: #fafcff; }.live-values-grid small { overflow: hidden; color: #8a98aa; font-size: 8px; font-weight: 800; letter-spacing: .05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }.live-values-grid strong { overflow: hidden; color: #3b506c; font-size: 11px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.live-shift-counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }.live-shift-counters > span { display: grid; gap: 2px; min-width: 0; padding: 7px; border-left: 3px solid #d6e6fb; background: #f8faff; }.live-shift-counters small { overflow: hidden; color: #8997a9; font-size: 8px; font-weight: 800; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }.live-shift-counters strong { overflow: hidden; color: #365272; font-size: 10px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }.live-shift-counters em { overflow: hidden; color: #8593a5; font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.live-state-panel { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 11px; min-width: 0; padding: 8px 10px; border: 1px solid #e6ecf3; border-radius: 10px; background: #fbfcfe; }.live-pie-wrap { display: grid; justify-items: center; gap: 4px; min-width: 0; text-align: center; }.live-pie { width: 58px; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 3px 10px rgba(47,65,88,.11); }.live-pie::after { display: block; width: 44%; height: 44%; margin: 28%; border-radius: 50%; background: #fbfcfe; content: ""; }.live-pie-wrap div:last-child { display: grid; gap: 1px; min-width: 0; }.live-pie-wrap span { color: #8695a8; font-size: 8px; font-weight: 800; text-transform: uppercase; }.live-pie-wrap strong { overflow: hidden; color: #3b506c; font-size: 9px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }.live-pie-wrap small { overflow: hidden; color: #8996a8; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.live-state-bars { display: grid; gap: 8px; min-width: 0; }.live-state-bars > span { display: grid; grid-template-columns: 58px minmax(40px, 1fr) 43px; align-items: center; gap: 6px; min-width: 0; }.live-state-bars small { overflow: hidden; color: #7f8ea0; font-size: 8px; font-weight: 800; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }.live-state-bars i { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: #e6ecf3; }.live-state-bars b { display: block; height: 100%; min-width: 0; border-radius: inherit; }.live-state-bars b.active { background: #2bb478; }.live-state-bars b.idle { background: #eca83e; }.live-state-bars b.no-net { background: #9aa5b5; }.live-state-bars strong { overflow: hidden; color: #65758b; font-size: 9px; font-variant-numeric: tabular-nums; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.live-normal-card .operator-files-card { min-height: 0; display: flex; flex: 1 1 66px; flex-direction: column; padding: 7px 0 0; color: #63748b; }.live-normal-card .operator-files-card h4 { margin: 0; color: #344d6d; font-size: 10px; }.live-normal-card .operator-files-card > p { display: none; }.live-normal-card .operator-table-scroll { flex: 1; min-height: 0; margin-top: 4px; overflow: hidden; border: 1px solid #e4eaf2; border-radius: 7px; background: #fff; }.live-normal-card .operator-table-scroll table { width: 100%; border-collapse: collapse; font-size: 9px; }.live-normal-card .operator-table-scroll th, .live-normal-card .operator-table-scroll td { overflow: hidden; padding: 4px 6px; color: #587089; text-align: left; text-overflow: ellipsis; white-space: nowrap; }.live-normal-card .operator-table-scroll th { color: #8190a5; background: #f3f7fb; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }.live-normal-card .operator-files-card footer { overflow: hidden; padding-top: 4px; color: #8492a4; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.live-normal-footer { display: flex; justify-content: space-between; gap: 12px; min-width: 0; color: #8190a4; font-size: 9px; font-variant-numeric: tabular-nums; }.live-normal-footer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.live-empty-slot { align-items: center; justify-content: center; gap: 7px; border-style: dashed; background: repeating-linear-gradient(135deg,#fafcff,#fafcff 12px,#f4f7fb 12px,#f4f7fb 24px); text-align: center; }.live-slot-number { color: #91a0b3; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }.live-empty-slot strong { color: #5e718c; font-size: 14px; }.live-empty-slot p { max-width: 280px; margin: 0; color: #9aa6b6; font-size: 10px; line-height: 1.45; }

/* Expanded: the same full live graph/event experience, framed as a Fleet page. */
.live-expanded-page { height: calc(100vh - 76px); min-width: 0; display: flex; flex-direction: column; overflow: hidden; color: #42546d; background: #f4f7fb; }.live-expanded-page:focus { outline: none; }
.live-expanded-page .expanded-header { height: 64px; min-height: 64px; display: grid; grid-template-columns: 38px 112px minmax(160px, 1fr) auto minmax(230px, auto); gap: 10px; padding: 9px 28px; border-top: 0; border-bottom: 1px solid #dce5ef; background: #fff; box-shadow: 0 4px 14px rgba(36,55,84,.04); }.live-expanded-page .operator-lights { align-self: center; }.live-expanded-page .operator-lights i { width: 9px; height: 9px; background: #d45b66; box-shadow: 0 0 0 3px rgba(212,91,102,.1); }.live-expanded-page .operator-lights i.on { background: #2bb478; box-shadow: 0 0 0 3px rgba(43,180,120,.12); }.live-expanded-page .expanded-close { align-self: center; padding: 8px 10px; border: 1px solid #d5deea; border-radius: 7px; color: #45617f; background: #f8faff; font-size: 10px; font-weight: 800; text-align: center; }.live-expanded-page .expanded-close:hover { color: #1f6feb; border-color: #b9d3f6; background: #edf4ff; }.live-expanded-page .expanded-header > strong { overflow: hidden; align-self: center; color: #1c2d47; font-size: 19px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }.live-expanded-page .expanded-shifts { align-self: center; }.live-expanded-page .expanded-shifts span { padding: 5px 8px; color: #8a641f; border-color: #f0d79d; background: #fff7e7; font-size: 9px; font-weight: 800; }.live-expanded-page .expanded-shifts span.active { color: #18885a; border-color: #ccebdc; background: #eaf8f1; }.live-expanded-page .expanded-location { align-self: center; color: #3977c7; font-size: 12px; text-align: right; }
.live-expanded-overview { height: clamp(206px, 28vh, 270px); min-height: 206px; flex: 0 0 auto; grid-template-columns: 255px minmax(245px, .92fr) minmax(260px, 1fr) minmax(310px, 1.06fr); gap: 14px; padding: 14px 28px; border-bottom: 1px solid #dfe6ef; background: #f4f7fb; }.live-expanded-overview > section, .live-expanded-overview > .operator-files-card { min-width: 0; overflow: hidden; padding: 11px; border: 1px solid #dfe6ef; border-radius: 11px; background: #fff; box-shadow: 0 5px 16px rgba(36,55,84,.045); }.live-expanded-overview .expanded-values-pane { gap: 7px; }.live-expanded-overview .expanded-values-pane progress { flex: 0 0 5px; width: 100%; height: 5px; border: 0; border-radius: 999px; background: #e8eef6; }.live-expanded-overview .expanded-values-pane progress::-webkit-progress-bar { background: #e8eef6; }.live-expanded-overview .expanded-values-pane progress::-webkit-progress-value { background: #1f6feb; }.live-expanded-overview .operator-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }.live-expanded-overview .operator-values > div { min-width: 0; min-height: 0; padding: 4px 5px; border: 1px solid #e7edf4; border-radius: 5px; background: #fafcff; }.live-expanded-overview .operator-values dt { overflow: hidden; color: #8997a9; font-size: 7px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }.live-expanded-overview .operator-values dd { overflow: hidden; margin: 2px 0 0; color: #3b506c; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }.live-expanded-overview .operator-dual-counters { margin-top: auto; gap: 5px; }.live-expanded-overview .php-counter-block { padding: 4px 5px; border-color: #e4eaf2; background: #f8faff; color: #8390a1; font-size: 7px; }.live-expanded-overview .php-counter-block strong { color: #526680; font-size: 8px; }.live-expanded-overview .php-counter-block b { color: #18885a; }.live-expanded-overview .operator-starts { padding-top: 3px; color: #61748e; font-size: 9px; }
.live-expanded-overview .expanded-pie-pane { grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-content: center; }.live-expanded-overview .expanded-pie-pane > small, .live-expanded-overview .expanded-bars-pane > small { margin-bottom: 3px; color: #7d8da1; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }.live-expanded-overview .expanded-pie { width: 100px; }.live-expanded-overview .operator-pie::after { background: #fff; }.live-expanded-overview .operator-legend { gap: 7px; color: #62758e; font-size: 9px; }.live-expanded-overview .operator-legend i { width: 8px; height: 8px; }.live-expanded-overview .operator-legend .active { background: #2bb478; }.live-expanded-overview .operator-legend .idle { background: #eca83e; }.live-expanded-overview .operator-legend .no-net { background: #9aa5b5; }
.live-expanded-overview .expanded-bars-pane { display: flex; flex-direction: column; }.live-expanded-overview .expanded-bars { flex: 1; min-height: 0; padding: 17px 18px 18px; border-bottom-color: #dce5ef; }.live-expanded-overview .expanded-bars b { color: #5e718b; font-size: 9px; }.live-expanded-overview .expanded-bars em { color: #7f8ea0; font-size: 9px; }.live-expanded-overview .operator-bars i.active { background: #2bb478; }.live-expanded-overview .operator-bars i.idle { background: #eca83e; }.live-expanded-overview .operator-bars i.no-net { background: #9aa5b5; }.live-expanded-overview > .operator-files-card { display: flex; flex-direction: column; color: #65768d; }.live-expanded-overview .operator-files-card h4 { margin: 0; color: #344d6d; font-size: 12px; }.live-expanded-overview .operator-files-card > p { margin: 3px 0 6px; color: #8a97a9; font-size: 9px; }.live-expanded-overview .operator-table-scroll { flex: 1; min-height: 0; border-color: #e2e8f0; border-radius: 6px; }.live-expanded-overview .operator-table-scroll table { font-size: 9px; }.live-expanded-overview .operator-table-scroll th, .live-expanded-overview .operator-table-scroll td { padding: 4px 6px; }.live-expanded-overview .operator-files-card footer { overflow: hidden; padding-top: 5px; color: #8190a4; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.live-expanded-chart { height: auto; min-height: 0; flex: 1; padding: 12px 28px 18px; background: #f4f7fb; }.live-expanded-chart .expanded-chart-controls { min-height: 39px; gap: 9px; padding: 6px 9px; border-color: #dbe4ee; border-radius: 9px; color: #66778e; background: #fff; font-size: 10px; }.live-expanded-chart .expanded-chart-controls select, .live-expanded-chart .expanded-chart-controls button, .live-expanded-chart .operator-date-input { padding: 5px 7px; border-color: #d5deea; border-radius: 5px; color: #465f7c; background: #f8faff; font-size: 9px; }.live-expanded-chart .expanded-chart-controls button:hover { color: #1f6feb; border-color: #a9c8ef; background: #edf4ff; }.live-expanded-chart .chart-stats { color: #416187; font-size: 10px; }.live-expanded-chart .expanded-chart-body { grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; padding-top: 12px; }.live-expanded-chart .expanded-plot, .live-expanded-chart .expanded-events-card { border-color: #dfe6ef; border-radius: 11px; background: #fff; box-shadow: 0 5px 16px rgba(36,55,84,.045); }.live-expanded-chart .expanded-plot { overflow: hidden; }.live-expanded-chart .operator-series-legend { top: 9px; gap: 12px; color: #5d6e85; font-size: 9px; }.live-expanded-chart .expanded-events-card { padding: 10px; }.live-expanded-chart .expanded-events-card h4 { margin: 0; color: #344d6d; font-size: 12px; }.live-expanded-chart .expanded-events-card > p { margin: 4px 0 7px; color: #8a97a9; font-size: 9px; line-height: 1.4; }.live-expanded-chart .expanded-events-card .operator-table-scroll { border-color: #e2e8f0; }.live-expanded-chart .expanded-events-card .operator-table-scroll table { font-size: 9px; }.live-expanded-chart .expanded-events-card .operator-table-scroll th, .live-expanded-chart .expanded-events-card .operator-table-scroll td { padding: 5px 6px; }.live-expanded-chart .expanded-events-card footer { padding-top: 6px; color: #8190a4; font-size: 9px; }.live-expanded-chart .operator-grid-line { stroke: #dfe6ef; }.live-expanded-chart .operator-grid-line.horizontal { stroke: #edf1f6; }.live-expanded-chart .operator-axis-label { fill: #77879d; }.live-expanded-chart .operator-event-label { fill: #1477a7; }

@media (max-width: 1250px) {
    .live-wall-page { width: min(96vw, 1760px); }.live-wall-toolbar { align-items: flex-start; flex-direction: column; }.live-toolbar-actions { justify-content: flex-start; }.live-normal-details { grid-template-columns: 1fr; }.live-normal-card { overflow: auto; }.live-expanded-page { overflow: auto; height: auto; min-height: calc(100vh - 76px); }.live-expanded-page .expanded-header { grid-template-columns: 38px 112px minmax(140px,1fr) auto; }.live-expanded-page .expanded-location { display: none; }.live-expanded-overview { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }.live-expanded-chart { min-height: 600px; }.live-expanded-chart .expanded-chart-body { grid-template-columns: minmax(0,1fr) 250px; min-height: 520px; }
}

@media (max-height: 850px) and (min-width: 1251px) {
    .live-wall-page { gap: 10px; padding-top: 13px; padding-bottom: 12px; }.live-wall-heading .eyebrow { margin-bottom: 5px; }.live-wall-heading h1 { font-size: 31px; }.live-wall-subtitle { margin-top: 6px; font-size: 11px; }.live-wall-toolbar { min-height: 62px; padding: 9px 12px; }.live-toolbar-copy small { font-size: 10px; }.live-machine-grid { gap: 10px; }.live-machine-card { border-radius: 11px; }.live-minimal-card { gap: 7px; padding: 11px; }.live-normal-card { gap: 6px; padding: 10px 12px 8px; }.live-normal-details { gap: 8px; }.live-values-grid { gap: 4px; }.live-values-grid > span { padding: 4px 5px; }.live-state-panel { padding: 6px 8px; }.live-state-bars { gap: 5px; }.live-normal-card .operator-table-scroll th, .live-normal-card .operator-table-scroll td { padding-top: 3px; padding-bottom: 3px; }.live-expanded-page .expanded-header { height: 52px; min-height: 52px; padding-top: 5px; padding-bottom: 5px; }.live-expanded-overview { height: clamp(176px, 27vh, 230px); min-height: 176px; padding-top: 8px; padding-bottom: 8px; }.live-expanded-overview > section, .live-expanded-overview > .operator-files-card { padding: 7px; }.live-expanded-overview .expanded-pie { width: 75px; }.live-expanded-chart { padding-top: 7px; padding-bottom: 10px; }.live-expanded-chart .expanded-chart-body { padding-top: 7px; }
}

@media (max-width: 760px) {
    .live-wall-page { width: min(94vw, 600px); height: auto; min-height: calc(100vh - 76px); }.live-wall-heading, .live-heading-status { align-items: flex-start; flex-direction: column; }.live-minimal-grid, .live-normal-grid { grid-template-columns: 1fr; grid-template-rows: none; }.live-machine-card { min-height: 220px; }.live-expanded-page .expanded-header { height: auto; grid-template-columns: 32px 1fr; padding: 12px 3vw; }.live-expanded-page .expanded-close, .live-expanded-page .expanded-shifts { grid-row: 2; }.live-expanded-page .expanded-header > strong { font-size: 16px; }.live-expanded-overview { grid-template-columns: 1fr; }.live-expanded-chart .expanded-chart-controls { align-items: flex-start; }.live-expanded-chart .expanded-chart-body { grid-template-columns: 1fr; min-height: 760px; }.live-expanded-chart .expanded-events-card { min-height: 240px; }
}

/* Unified operator design system. The TV routes keep the compact PHP-inspired information
   density, while using the same light canvas, white cards and restrained status colours as the
   fleet overview. This block intentionally overrides the older dark presentation rules above. */
.tv-shell { background: #f4f7fb; color: #172033; }
.operator-wall, .operator-expanded { color: #27364d; background: #f4f7fb; }
.operator-header { border-bottom-color: #dfe6f0; background: #fff; box-shadow: 0 4px 16px rgba(36,55,84,.05); }
.operator-header nav { min-width: 245px; }
.operator-header nav a { color: #607089; border-color: transparent; background: transparent; }
.operator-header nav a.active, .operator-header nav a:hover { color: #1f6feb; border-color: #dce9fb; background: #edf4ff; }
.operator-clock { color: #18885a; }
.operator-title { color: #172033; }.operator-title strong { color: #172033; }.operator-title small { color: #8996a9; }
.operator-header-controls > span, .operator-header-controls button, .operator-header-link { height: 26px; display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid #dce4ef; border-radius: 5px !important; color: #53657e; background: #f8faff; font-weight: 750; text-decoration: none; }
.operator-header-controls button:not(:disabled):hover, .operator-header-controls button.selected, .operator-header-link:hover { color: #fff; border-color: #1f6feb; background: #1f6feb; }
.operator-connect { background: radial-gradient(circle, #fff 0, #f4f7fb 58%); }.operator-connect h1 { color: #172033; }.operator-connect p { color: #718096; }.operator-connect input { color: #172033; border-color: #d4dce8; background: #fff; }.operator-connect button, .operator-connect a { color: #fff; border-color: #1f6feb; background: #1f6feb; }
.operator-grid { background: #edf2f8; }
.operator-tile { border-color: #dce4ee; background: #fff; box-shadow: 0 5px 18px rgba(36,55,84,.055); }.operator-tile.printing { border-color: #8ad9b5; }.operator-tile.offline { border-color: #efb8bb; }
.operator-tile-title > strong { color: #172033; }.operator-tile-title > a { color: #3977c7; }.operator-tile-title > a:hover { color: #1f6feb; }
.operator-shift-row time { color: #919daf; }.shift-alert { color: #18885a; border-color: #ccebdc; background: #eaf8f1; }.shift-alert.no-shift { color: #bc4b51; border-color: #f1ccd0; background: #fff0f1; }.operator-location { color: #3977c7; }
.operator-tile progress, .expanded-values-pane progress { background: #e8edf3; }.operator-tile progress::-webkit-progress-bar, .expanded-values-pane progress::-webkit-progress-bar { background: #e8edf3; }
.operator-state-visuals { border-color: #e5eaf1; }
.operator-values > div { border-color: #e8edf3; background: #f9fbfd; }.operator-values dt { color: #8996a9; }.operator-values dd { color: #304461; }
.operator-dual-counters .php-counter-block { border-color: #e3e9f1; background: #f8fafd; }.operator-starts { color: #4a5d78; }
.operator-pie-column > small, .operator-bars-column > small, .expanded-pie-pane > small, .expanded-bars-pane > small { color: #7b899e; }
.operator-legend { color: #6d7b8e; }.operator-bars { border-bottom-color: #d9e1ec; }.operator-bars b { color: #64748a; }.operator-bars em { color: #8290a2; }
.operator-files-card { color: #64748a; }.operator-files-card h4, .expanded-events-card h4 { color: #304461; }.operator-files-card > p, .expanded-events-card > p { color: #8b97a9; }
.operator-table-scroll { border-color: #e2e8f0; background: #fff; }.operator-table-scroll th { color: #7e8ca0; background: #f3f7fb; }.operator-table-scroll th, .operator-table-scroll td { color: #4b5d76; border-bottom-color: #edf1f6; }.operator-files-card footer, .expanded-events-card footer { color: #72839a; }
.operator-table-scroll table { min-width: 0; }
.operator-empty-slot { border-color: #dce3ec; background: repeating-linear-gradient(135deg,#f8fafc,#f8fafc 12px,#f2f6fa 12px,#f2f6fa 24px); }.operator-empty-slot > div:last-child strong { color: #7f8da1; }.operator-empty-slot > div:last-child span { color: #a0aaba; }
.shift-manager-backdrop { background: rgba(35,49,68,.45); }.shift-manager-panel { border-color: #d7e0eb; background: #fff; box-shadow: 0 24px 80px rgba(30,45,68,.25); }.shift-manager-panel header { border-bottom-color: #e4eaf2; }.shift-manager-panel header strong { color: #172033; }.shift-manager-status span { color: #7f8da2; border-color: #e4eaf2; background: #f8fafc; }.shift-manager-status strong { color: #304461; }.shift-manager-panel p { color: #68788e; }.shift-manager-panel .shift-manager-warning { color: #8b641f; background: #fff8e8; }
.expanded-header { border-top-color: #d5e6fb; border-bottom-color: #dfe6ef; background: #fff; }.expanded-header > strong { color: #172033; }.expanded-shifts span { color: #78869a; border-color: #dce3ec; }.expanded-shifts span.active { color: #1f6feb; border-color: #cbdcf4; background: #edf4ff; }.expanded-location { color: #3977c7; }
.expanded-overview { border-bottom-color: #dfe6ef; background: #f4f7fb; }.expanded-overview > .operator-files-card, .expanded-events-card { border-color: #dfe6ef; background: #fff; box-shadow: 0 5px 18px rgba(36,55,84,.04); }
.expanded-chart-body { grid-template-columns: minmax(0,1fr) 250px; }
.expanded-chart-panel { background: #f4f7fb; }.expanded-chart-controls { color: #607089; border-color: #dbe3ed; background: #fff; }.expanded-chart-controls select, .expanded-chart-controls button, .operator-date-input { color: #43556f; border-color: #d5deea; background: #f8faff; }.expanded-chart-controls button:hover { color: #1f6feb; border-color: #77a8e8; }.cloud-chip { color: #286cc2; }.chart-threshold { color: #718096; }.chart-stats { color: #416187; }
.expanded-plot { border-color: #dfe6ef; background: #fff; box-shadow: 0 5px 18px rgba(36,55,84,.04); }.operator-series-legend { color: #52627b; }.operator-grid-line { stroke: #dfe6ef; }.operator-grid-line.horizontal { stroke: #edf1f6; }.operator-axis-label { fill: #728097; }.operator-state-text { fill: #fff; }.operator-event-line.selected { stroke: #172033; }.operator-event-label { fill: #1477a7; }.operator-chart-empty { color: #8794a7; }
.expanded-events-card tbody tr:hover, .expanded-events-card tbody tr.selected { background: #edf4ff; }.expanded-events-card td.effective { color: #18885a; }.expanded-events-card td.dry { color: #bc4b51; }

/* Analytics, alerts and shift-manager application pages. */
.data-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 14px; margin-bottom: 20px; }.data-toolbar label { display: grid; gap: 5px; color: #68788f; font-size: 10px; font-weight: 750; }.data-toolbar input { width: 150px; padding: 8px 9px; }.quick-ranges { display: flex; gap: 4px; padding: 4px; border: 1px solid #dce5f1; border-radius: 9px; background: #f8faff; }
.analytics-table table { min-width: 1050px; }.analytics-table td, .analytics-table th { padding-left: 14px; padding-right: 14px; }.state-split { width: 150px; height: 9px; display: flex; overflow: hidden; border-radius: 999px; background: #e8edf3; }.state-split i { display: block; height: 100%; }.state-split .active { background: #2bb478; }.state-split .idle { background: #eca83e; }.state-split .no-net { background: #9aa5b5; }.good-number { color: #18885a; font-weight: 800; }.bad-number { color: #bc4b51; font-weight: 800; }.table-action { color: #1f6feb; font-size: 11px; font-weight: 750; text-decoration: none; }.table-action:hover { text-decoration: underline; }.success-state { color: #18885a; }
.manager-card { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; padding: 26px; margin-bottom: 22px; }.manager-card p { margin: 8px 0 0; color: #718096; font-size: 13px; line-height: 1.55; }.manager-callout { display: grid; gap: 6px; padding: 16px; border: 1px solid #d6e4f7; border-radius: 12px; color: #355e91; background: #f2f7ff; }.manager-callout strong { font-size: 12px; }.manager-callout span { color: #687c98; font-size: 11px; line-height: 1.45; }

@media (max-width: 1050px) {
    .topbar { height: auto; min-height: 76px; gap: 16px; padding-top: 12px; padding-bottom: 12px; }.topbar nav { display: flex; flex-wrap: wrap; justify-content: flex-end; }.manager-card { grid-template-columns: 1fr; }
}

/* Final normal-wall sizing pass.  Keep the printed-file table in its own
   allocated band instead of allowing a flex-shrunk table to paint over the
   shift summary on a 16:9 TV. */
.live-normal-card { gap: 6px; }
.live-normal-details { height: 104px; flex: 0 0 104px; }
.live-values-panel { grid-template-rows: 70px 27px; }
.live-values-grid { grid-auto-rows: 33px; }
.live-values-grid > span { padding: 4px 6px; }
.live-shift-counters > span { min-height: 27px; display: flex; align-items: center; gap: 5px; padding: 4px 6px; }
.live-shift-counters small { flex: 0 0 auto; }.live-shift-counters strong { font-size: 9px; }.live-shift-counters em { display: none; }
.live-state-panel { height: 104px; padding: 6px 9px; }
.live-normal-card .operator-files-card { flex: 0 0 49px; min-height: 49px; padding-top: 3px; }
.live-normal-card .operator-files-card h4 { font-size: 9px; line-height: 11px; }
.live-normal-card .operator-table-scroll { min-height: 30px; margin-top: 2px; }
.live-normal-card .operator-table-scroll th, .live-normal-card .operator-table-scroll td { padding-top: 2px; padding-bottom: 2px; }
.live-normal-card .operator-files-card footer { display: none; }
.live-normal-footer { min-height: 11px; font-size: 8px; }

@media (max-height: 850px) and (min-width: 1251px) {
    .live-normal-details { height: 89px; flex-basis: 89px; }.live-values-panel { grid-template-rows: 59px 24px; }.live-values-grid { grid-auto-rows: 28px; }.live-values-grid > span { padding: 3px 4px; }.live-shift-counters > span { min-height: 24px; padding: 3px 4px; }.live-state-panel { height: 89px; }.live-normal-card .operator-files-card { flex-basis: 43px; min-height: 43px; }.live-normal-card .operator-table-scroll { min-height: 24px; }
}
