/* WAGO simulator web UI — DIN-rail node graphics (no build step). */ * { box-sizing: border-box; } body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; background: #e9ecef; color: #1c2733; } /* ---------- login ---------- */ .login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #003a7a, #0062c4); } .login-card { background: #fff; border-radius: 8px; padding: 34px 40px; width: 320px; text-align: center; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35); } .login-card h1 { font-size: 1.25rem; margin: 10px 0 0; } .login-sub { color: #6b7684; margin-top: 2px; font-size: 0.85rem; } .login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; text-align: left; } .login-card label { font-size: 0.85rem; color: #3c4653; } .login-card input { width: 100%; padding: 9px 10px; border: 1px solid #c5ccd4; border-radius: 4px; font-size: 1rem; margin-top: 4px; } .login-card button { padding: 10px; border: 0; border-radius: 4px; background: #0062c4; color: #fff; font-size: 1rem; cursor: pointer; } .login-card button:hover { background: #004a99; } .error { color: #b3261e; font-size: 0.85rem; } .hidden { display: none; } /* ---------- top bar ---------- */ .topbar { display: flex; align-items: center; gap: 22px; background: #003a7a; color: #fff; padding: 8px 18px; } .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; } .tabs { display: flex; gap: 4px; } .tab { border: 0; background: transparent; color: #cfe0f5; padding: 7px 14px; border-radius: 4px; cursor: pointer; font-size: 0.95rem; } .tab.active { background: #0062c4; color: #fff; } .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; } .logout { color: #cfe0f5; text-decoration: none; font-size: 0.9rem; } .conn-dot { width: 10px; height: 10px; border-radius: 50%; background: #d9534f; display: inline-block; } .conn-dot.on { background: #4caf50; box-shadow: 0 0 6px #4caf50; } main { padding: 18px; max-width: 1280px; margin: 0 auto; } h2 { margin: 4px 0 14px; } .tab-page { display: none; } .tab-page.active { display: block; } /* ---------- DIN rail ---------- */ .rail { display: flex; align-items: stretch; gap: 6px; background: linear-gradient(#d7dde3, #b7c0c9); border-radius: 4px; padding: 26px 12px 12px; min-height: 130px; overflow-x: auto; box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.18); } .coupler, .module { background: linear-gradient(#fdfdfd, #dfe3e8); border: 1px solid #9aa4ae; border-radius: 3px; min-height: 92px; position: relative; padding-top: 16px; } .module { /* label stacks (LED + code, or code + lim LEDs + bar + num) are taller than the bare indicators; keep the rail visually even */ min-height: 124px; flex-shrink: 0; /* keep the computed width — do not squeeze rows */ } .mod-head { position: absolute; top: 2px; left: 5px; font-size: 0.62rem; color: #33414f; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; } .mod-designation { /* kind+slot designation (DI0, DO2, AI4) — module's lower left corner, below the channel indicators (FR-10.2.2) */ position: absolute; bottom: 3px; left: 5px; font-size: 0.62rem; color: #33414f; font-weight: 600; letter-spacing: 0.02em; line-height: 1; } .coupler { min-width: 96px; background: linear-gradient(#0d5db4, #003a7a); } .coupler .mod-head { color: #fff; font-size: 0.75rem; } .coupler-leds { display: flex; gap: 7px; padding: 42px 10px 0; } .cled { width: 8px; height: 8px; border-radius: 50%; background: #123; box-shadow: none; } .cled.on { background: #4caf50; box-shadow: 0 0 7px 2px rgba(76, 175, 80, 0.85); } .module { /* thin, tall bezel: the module's channel columns sit side by side */ flex-shrink: 0; /* keep the computed width — do not squeeze rows */ display: flex; flex-direction: row; align-items: flex-end; justify-content: flex-start; } /* digital modules: tall enough for 8 vertically stacked LEDs + labels */ .module:has(.mod-channels-v) { min-height: 248px; } .module { min-height: 124px; } .mod-channels { display: flex; gap: 5px; flex-wrap: wrap; align-items: flex-end; padding: 8px 6px 16px; /* bottom room for the designation label */ } /* vertical digital columns: LEDs stacked top-to-bottom, 8 per column */ .mod-channels-v { flex-direction: column; flex-wrap: nowrap; align-items: center; padding: 20px 4px 16px; /* top room for the article header */ gap: 4px; } .row-break { /* legacy two-row layout marker — vertical columns replace it */ display: none; } /* DI/DO LED cells with channel-number labels (FR-10.2.2) */ .led-cell { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; } .led-label { font-size: 0.55rem; color: #33414f; font-family: Consolas, monospace; white-space: nowrap; line-height: 1; } /* channel LEDs */ .led { width: 12px; height: 12px; border-radius: 50%; background: #2c3742; border: 1px solid #1b232c; cursor: pointer; transition: box-shadow 0.12s, background 0.12s; } .led.on { background: #37e04d; border-color: #2ab63a; box-shadow: 0 0 9px 2px rgba(70, 230, 80, 0.8); } /* analog bars (FR-10.2.14: range-scaled vertical fill + limit LEDs) */ .abar-cell { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; } .abar-label { font-size: 0.55rem; color: #33414f; font-family: Consolas, monospace; white-space: nowrap; line-height: 1; } .abar { position: relative; width: 16px; height: 48px; background: #232c36; border-radius: 3px; overflow: hidden; /* clip the fill inside the rounded bar */ display: inline-block; cursor: pointer; /* clickable: sets value at click height */ } .abar-fill { position: absolute; bottom: 0; left: 0; right: 0; height: 0%; background: linear-gradient(#4db6ff, #0d6eb4); border-radius: 0 0 3px 3px; transition: height 0.15s; } .abar-fill.limit { /* under/overflow: red limit fill */ background: linear-gradient(#ff6b5e, #c62828); } .lim-led { width: 8px; height: 4px; border-radius: 2px; background: #3a2b2b; } .lim-led.lim-over { order: 0; } /* directly above the bar */ .lim-led.lim-under { order: 2; } /* directly below the bar */ .abar-label.top-label { order: -1; } /* I/O code above the overflow LED */ .abar-label.bottom-label { order: 3; } /* I/O code below the underflow LED */ .abar { order: 1; } .abar-num { order: 4; font-size: 0.55rem; color: #33414f; white-space: nowrap; } .lim-led.on { background: #ff3b30; box-shadow: 0 0 6px 1px rgba(255, 59, 48, 0.8); } .rail-detail { margin-top: 10px; font-size: 0.8rem; color: #55606c; } /* ---------- diagnostics ---------- */ .diag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; } .diag-card { background: #fff; border-radius: 6px; padding: 14px 18px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); } .diag-card h3 { margin: 0 0 10px; font-size: 1rem; } .diag-card table { border-collapse: collapse; width: 100%; font-size: 0.88rem; } .diag-card td { padding: 4px 6px; border-bottom: 1px solid #eef1f4; } .diag-card td:last-child { text-align: right; font-family: Consolas, monospace; } .diag-card button { margin-top: 12px; padding: 7px 14px; border: 0; border-radius: 4px; background: #0062c4; color: #fff; cursor: pointer; } .diag-card button:hover { background: #004a99; } .fault-buttons { display: flex; gap: 8px; } /* ---------- configuration ---------- */ .config-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.4fr); gap: 16px; align-items: start; } .cfg-note { color: #6b7684; font-size: 0.8rem; margin: 0 0 12px; } #coupler-form { display: flex; flex-direction: column; gap: 10px; } .cfg-field { font-size: 0.85rem; color: #3c4653; display: flex; flex-direction: column; gap: 3px; } .cfg-field input, .cfg-field select { padding: 7px 8px; border: 1px solid #c5ccd4; border-radius: 4px; font-size: 0.9rem; width: 100%; } .cfg-check { font-size: 0.85rem; display: flex; gap: 8px; align-items: center; } .ok { color: #2e7d32; font-size: 0.85rem; } #module-list { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; margin-bottom: 10px; } .module-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid #d8dee5; border-radius: 4px; font-size: 0.85rem; cursor: pointer; background: #f7f9fb; } .module-row:hover { background: #eaf1f8; } .mod-io { color: #55606c; margin-left: auto; font-size: 0.78rem; white-space: nowrap; } #catalog-pick { padding: 6px; border: 1px solid #c5ccd4; border-radius: 4px; flex: 1; } .cfg-path { font-size: 0.75rem; color: #6b7684; align-self: center; } button.primary { background: #2e7d32; } button.primary:hover { background: #1b5e20; } /* ---------- channel list (FR-10.2.13) ---------- */ .list-title { margin: 22px 0 8px; } .chlist-head, .chlist-row { display: grid; grid-template-columns: 70px 1fr 90px; gap: 10px; align-items: center; } .chlist-head { font-size: 0.72rem; text-transform: uppercase; color: #6b7684; letter-spacing: 0.06em; padding: 0 10px 4px; } .chlist { max-height: 420px; overflow-y: auto; border: 1px solid #d8dee5; border-radius: 6px; background: #fff; } .chlist-row { padding: 4px 10px; border-bottom: 1px solid #eef1f4; } .chlist-row:last-child { border-bottom: 0; } .chlist-row:hover { background: #f2f6fa; } .row-io { font-family: Consolas, monospace; font-size: 0.82rem; color: #004a99; font-weight: 600; } .row-name { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; } .row-name.unnamed { color: #9aa4ae; } .row-value.num { width: 100%; padding: 4px 6px; border: 1px solid #c5ccd4; border-radius: 4px; font-family: Consolas, monospace; font-size: 0.85rem; } /* toggle switch */ .switch { position: relative; display: inline-block; width: 40px; height: 22px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; inset: 0; background: #b9c2cb; border-radius: 22px; transition: 0.15s; cursor: pointer; } .slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.15s; } .switch input:checked + .slider { background: #37b34a; } .switch input:checked + .slider::before { transform: translateX(18px); } /* ---------- channel-name editor ---------- */ .name-editor { max-height: 300px; overflow-y: auto; margin-bottom: 10px; } .name-row { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: center; padding: 2px 0; } .name-input { padding: 5px 8px; border: 1px solid #c5ccd4; border-radius: 4px; font-size: 0.85rem; width: 100%; } .range-row { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: center; padding: 2px 0; } .range-fields { display: flex; align-items: center; gap: 6px; } .range-fields input { width: 90px; padding: 5px 8px; border: 1px solid #c5ccd4; border-radius: 4px; font-size: 0.85rem; font-family: Consolas, monospace; } .range-sep { color: #6b7684; } .hidden-file { display: none; } #cfg-io-buttons { display: flex; gap: 8px; margin-top: 8px; }