:root{--bg-dark: #090D16;--bg-card: #111827;--bg-card-hover: #1F2937;--border-color: #1F2937;--border-glow: #374151;--text-main: #F9FAFB;--text-muted: #9CA3AF;--text-dim: #6B7280;--accent-cyan: #06B6D4;--accent-blue: #3B82F6;--accent-blue-glow: rgba(59, 130, 246, .4);--status-on: #10B981;--status-on-glow: rgba(16, 185, 129, .3);--status-off: #EF4444;--status-off-glow: rgba(239, 68, 68, .3);--status-warning: #F59E0B;--font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;touch-action:manipulation}html,body{width:100vw;height:100vh;height:-webkit-fill-available;overflow:hidden;position:fixed;top:0;left:0;right:0;bottom:0;background-color:var(--bg-dark);color:var(--text-main);font-family:var(--font-family)}.app-container{display:flex;flex-direction:column;height:100vh;height:-webkit-fill-available;width:100vw;max-width:100vw;overflow:hidden}.app-header{background:#111827f2;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-bottom:1px solid var(--border-color);padding:.5rem .75rem;display:flex;justify-content:space-between;align-items:center;z-index:100;flex-shrink:0;width:100vw;max-width:100vw;box-sizing:border-box}.brand-title{display:flex;align-items:center;gap:.4rem;flex-shrink:0}.brand-title svg{width:22px;height:22px;color:var(--accent-cyan)}.brand-title h1{font-size:1rem;font-weight:700;letter-spacing:.5px;background:linear-gradient(135deg,#60a5fa,#06b6d4);-webkit-background-clip:text;-webkit-text-fill-color:transparent;white-space:nowrap}.header-controls{display:flex;align-items:center;gap:.35rem;flex-wrap:nowrap;justify-content:flex-end}.role-badge{display:flex;align-items:center;gap:.3rem;padding:.25rem .5rem;border-radius:9999px;font-size:.7rem;font-weight:600;white-space:nowrap;flex-shrink:0}.role-badge.viewer{background:#3b82f626;color:#60a5fa;border:1px solid rgba(59,130,246,.3)}.role-badge.admin{background:#10b98126;color:#34d399;border:1px solid rgba(16,185,129,.3)}.btn-auth{background:var(--bg-card);border:1px solid var(--border-color);color:var(--text-main);padding:.3rem .5rem;border-radius:6px;cursor:pointer;display:flex;align-items:center;gap:.3rem;font-size:.7rem;font-family:inherit;font-weight:500;white-space:nowrap;flex-shrink:0}.btn-close{background:transparent;border:none;color:var(--text-muted);font-size:1.5rem;cursor:pointer;line-height:1;padding:0 .25rem}.btn-close:hover{color:var(--text-main)}.dashboard-grid{display:grid;grid-template-columns:1fr 320px;gap:.75rem;padding:.75rem;max-width:1600px;margin:0 auto;width:100vw;max-width:100vw;flex:1;overflow:hidden;box-sizing:border-box}.schematic-card{background:var(--bg-card);border:1px solid var(--border-color);border-radius:14px;padding:.75rem;display:flex;flex-direction:column;position:relative;overflow:hidden;height:100%;width:100%}.schematic-header{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.4rem;margin-bottom:.5rem;border-bottom:1px solid var(--border-color);padding-bottom:.4rem;flex-shrink:0}.schematic-header h2{font-size:.9rem;font-weight:600;color:var(--text-main);display:flex;align-items:center;gap:.4rem}.mode-presets{display:flex;gap:.3rem;flex-wrap:nowrap;max-width:100%;overflow-x:auto}.btn-mode{flex:1;min-width:75px;background:#1f2937cc;border:1px solid var(--border-glow);color:var(--text-muted);padding:.35rem .4rem;border-radius:6px;font-size:.7rem;font-weight:600;cursor:pointer;font-family:inherit;text-align:center;white-space:nowrap}.btn-mode.active{background:linear-gradient(135deg,#06b6d440,#3b82f640);border-color:var(--accent-cyan);color:#38bdf8}.btn-mode:disabled{opacity:.5;cursor:not-allowed}.svg-container{width:100%;flex:1;height:100%;display:flex;align-items:center;justify-content:center;background:#060911;border-radius:10px;border:1px solid rgba(255,255,255,.05);position:relative;overflow:hidden;touch-action:none}.svg-container svg{width:100%;height:100%;transform-origin:center center}.side-panel{display:flex;flex-direction:column;gap:.6rem;overflow-y:auto;height:100%}.panel-card{background:var(--bg-card);border:1px solid var(--border-color);border-radius:12px;padding:.75rem}.panel-title{font-size:.8rem;font-weight:600;color:var(--text-main);margin-bottom:.4rem;display:flex;align-items:center;gap:.4rem}.alert-box{padding:.5rem .65rem;border-radius:8px;font-size:.725rem;line-height:1.3;margin-bottom:.35rem;display:flex;align-items:flex-start;gap:.4rem}.alert-box.warning{background:#f59e0b1f;border:1px solid rgba(245,158,11,.3);color:#fbbf24}.alert-box.danger{background:#ef44441f;border:1px solid rgba(239,68,68,.3);color:#f87171}.alert-box.info{background:#3b82f61f;border:1px solid rgba(59,130,246,.3);color:#60a5fa}.alert-box.success{background:#10b9811f;border:1px solid rgba(16,185,129,.3);color:#34d399}.valve-list{display:flex;flex-direction:column;gap:.35rem;max-height:200px;overflow-y:auto}.valve-item{display:flex;align-items:center;justify-content:space-between;background:#1f293780;border:1px solid var(--border-color);padding:.45rem .6rem;border-radius:8px;gap:.4rem}.valve-info{display:flex;align-items:center;gap:.4rem;flex:1}.valve-id-badge{width:24px;height:24px;border-radius:6px;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:.75rem;flex-shrink:0}.toggle-switch{position:relative;display:inline-block;width:40px;height:20px;flex-shrink:0}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:var(--status-off);transition:.3s;border-radius:20px}.toggle-slider:before{position:absolute;content:"";height:14px;width:14px;left:3px;bottom:3px;background-color:#fff;transition:.3s;border-radius:50%}input:checked+.toggle-slider{background-color:var(--status-on)}input:checked+.toggle-slider:before{transform:translate(18px)}.log-list{display:flex;flex-direction:column;gap:.35rem;max-height:140px;overflow-y:auto;font-size:.7rem}.log-item{padding:.35rem .5rem;background:#11182799;border-left:3px solid var(--accent-cyan);border-radius:0 6px 6px 0}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000d9;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;z-index:10000;opacity:0;pointer-events:none;transition:opacity .25s ease;padding:1rem}.modal-overlay.open{opacity:1;pointer-events:auto}.modal-card{background:var(--bg-card);border:1px solid var(--border-glow);border-radius:14px;padding:1rem;width:100%;max-width:440px;position:relative;z-index:10001}.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.input-field{width:100%;padding:.6rem .75rem;background:var(--bg-dark);border:1px solid var(--border-color);border-radius:8px;color:var(--text-main);font-family:inherit;margin-top:.4rem;margin-bottom:.75rem;font-size:.85rem}.btn-primary{width:100%;padding:.65rem;background:linear-gradient(135deg,var(--accent-blue),var(--accent-cyan));border:none;border-radius:8px;color:#fff;font-weight:600;font-family:inherit;cursor:pointer;font-size:.85rem}@media (max-width: 768px){.app-header{flex-direction:column;align-items:stretch;padding:.4rem .6rem;gap:.35rem}.brand-title{justify-content:space-between;width:100%}.brand-title h1{font-size:.9rem}.header-controls{width:100%;max-width:100%;justify-content:space-between;gap:.25rem}.header-controls .btn-auth{flex:1;justify-content:center;padding:.35rem .25rem;font-size:.68rem}.dashboard-grid{grid-template-columns:1fr;grid-template-rows:1fr auto;padding:.4rem;gap:.4rem;overflow:hidden;width:100vw;max-width:100vw}.schematic-card{height:100%;min-height:0;width:100%}.side-panel{max-height:180px}.role-badge{display:none}}
