h1, h2 { margin: 0; font-size: 1rem; }
.page { width: min(1500px, calc(100% - 28px)); }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(430px, .72fr); gap: 14px; align-items: start; }
.dashboard > .grid { align-content: start; }
.leader-main, .leader-side { min-width: 0; }
.dashboard > .error { grid-column: 1 / -1; }
.room-card { text-align: center; }
.operator-count-control { display: grid; grid-template-columns: minmax(150px, 220px) auto; justify-content: center; gap: 8px; align-items: end; margin-top: 14px; text-align: left; }
.procedures, .voice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.procedures button { min-height: 58px; }
.procedures button.procedure-selected { outline: 3px solid #fff0bd; box-shadow: 0 0 18px rgba(255,216,116,.28); }
.voice-row button { min-height: 44px; font-size: .78rem; }
.pressure-panel h2, .command-panel h2 { margin-bottom: 10px; }
.gauge-wrap { position: relative; width: min(100%, 600px); margin: 0 auto; }
#pressureGauge { display: block; width: 100%; height: auto; }
.digital-pressure { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); min-width: 150px; padding: 7px 12px; border: 1px solid #6c7f8f; border-radius: 6px; background: #071018; color: #fff0bd; font: 900 1.55rem/1 'Courier New', monospace; text-align: center; }
.pump-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 2px; }
.pump-controls button { min-height: 64px; touch-action: none; user-select: none; }
.pump-controls button.pump-active { outline: 3px solid #fff0bd; box-shadow: 0 0 20px rgba(255, 216, 116, .42); transform: translateY(1px); }
.hold-instruction { margin: 9px 0 16px; color: var(--muted); font-size: .72rem; text-align: center; }
.pressure-announcements { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pressure-announcements button { padding: .58rem .35rem; font-size: .73rem; }
.pressure-announcements button.announced { border-color: rgba(102, 193, 122, .75); background: rgba(40, 92, 56, .6); }
.command-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.command-buttons button { min-height: 48px; padding: .6rem .7rem; text-align: left; font-size: .72rem; line-height: 1.25; }
.command-buttons button.command-active { border-color: #78bfff; background: #244a64; }
.command-buttons button.command-done { border-color: rgba(102, 193, 122, .55); background: rgba(40, 92, 56, .42); }
.command-buttons button.command-ready { outline: 2px solid #f0b84e; background: #5b451e; }
.command-number { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: rgba(255,255,255,.13); font-size: .68rem; }
.operator-panel { min-width: 0; }
.indicator-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: var(--muted); font-size: .68rem; }
.indicator-legend span { display: flex; align-items: center; gap: 5px; }
.indicator-legend i, .equipment-indicator i { width: 11px; height: 11px; border-radius: 50%; background: #263340; border: 1px solid #52616e; flex: 0 0 auto; }
.indicator-legend .legend-on, .equipment-indicator.present i { background: var(--green); border-color: #8de09e; box-shadow: 0 0 9px rgba(102,193,122,.75); }
.indicator-legend .legend-moving, .equipment-indicator.moving i { background: var(--amber); border-color: #ffe09c; box-shadow: 0 0 10px rgba(239,183,78,.85); }
.operator-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.operator { border: 1px solid var(--line); background: var(--panel-2); border-radius: 11px; padding: 11px; min-height: 128px; }
.operator.confirmed { border-color: rgba(102,193,122,.68); background: rgba(40,92,56,.36); }
.operator.affected { border-color: rgba(237,107,114,.75); background: rgba(118,45,53,.3); }
.operator header { display: flex; justify-content: space-between; gap: .5rem; font-weight: 900; }
.operator header > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.operator-state { margin: .42rem 0 0; color: #b9c9d7; font-size: .7rem; font-weight: 800; letter-spacing: .04em; }
.equipment-indicators { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.equipment-indicator { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 7px 4px; border: 1px solid #344657; border-radius: 7px; background: #0c151e; color: #7e8d9b; font-size: .67rem; font-weight: 900; white-space: nowrap; }
.equipment-indicator.present { color: #d9f8df; border-color: rgba(102,193,122,.46); background: rgba(31,75,43,.36); }
.equipment-indicator.moving { color: #fff0c5; border-color: rgba(239,183,78,.6); background: rgba(97,73,30,.45); animation: equipment-flash .7s steps(2, jump-none) infinite; }
.tension-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.tension { display: flex; justify-content: space-between; gap: 5px; padding: 6px 7px; border-radius: 7px; background: #0c151e; color: var(--muted); font-size: .66rem; }
.tension strong { color: #fff0bd; font: 900 .77rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.operator.offline .equipment-indicators, .operator.offline .tension-row { opacity: .66; }
@keyframes equipment-flash { 0%, 45% { filter: brightness(.55); opacity: .62; } 55%, 100% { filter: brightness(1.35); opacity: 1; } }
.event-log { max-height: 330px; overflow: auto; margin: 10px 0 0; padding-left: 1.7rem; color: var(--muted); font-size: .8rem; }
.event-log li { padding: .25rem 0; }
@media(max-width: 1050px) { .dashboard { grid-template-columns: 1fr; } .leader-side { grid-row: auto; } }
@media(max-width: 600px) { .pump-controls, .pressure-announcements { grid-template-columns: 1fr; } .command-buttons { grid-template-columns: 1fr; } }
@media(max-width: 480px) { .procedures, .operator-count-control, .equipment-indicators, .tension-row { grid-template-columns: 1fr; } }
