:root{--ink: #0a0a0a;--ink-2: #27272a;--text: #18181b;--muted: #71717a;--subtle: #a1a1aa;--line: #e4e4e7;--line-2: #f0f0f1;--bg: #f4f4f5;--surface: #ffffff;--surface-2: #fafafa;--chip: #f4f4f5;--ok: #15803d;--ok-bg: #dcfce7;--warn: #b45309;--warn-bg: #fef3c7;--info: #1d4ed8;--info-bg: #dbeafe;--danger: #b91c1c;--danger-bg: #fee2e2;--r-sm: 10px;--r: 14px;--r-lg: 20px;--r-xl: 28px;--shadow-1: 0 1px 2px rgba(10, 10, 10, .04), 0 1px 1px rgba(10, 10, 10, .03);--shadow-2: 0 8px 24px rgba(10, 10, 10, .08), 0 2px 6px rgba(10, 10, 10, .05);--shadow-3: 0 24px 48px rgba(10, 10, 10, .18);--gutter: 16px;--tap: 44px;--nav-h: 64px;--header-h: 60px;--safe-t: env(safe-area-inset-top, 0px);--safe-b: env(safe-area-inset-bottom, 0px);--safe-l: env(safe-area-inset-left, 0px);--safe-r: env(safe-area-inset-right, 0px);--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;--ease: cubic-bezier(.2, .8, .2, 1)}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{margin:0;font-family:var(--font);font-size:15px;line-height:1.45;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;border:0;background:none;padding:0;touch-action:manipulation}button:disabled{cursor:not-allowed;opacity:.45}:focus-visible{outline:2px solid var(--ink);outline-offset:2px}p{margin:0}strong{font-weight:600}.i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}html,body{height:100%;overflow:hidden}.app{max-width:560px;margin:0 auto;height:100vh;height:100dvh;display:flex;flex-direction:column;background:var(--bg)}.header{position:relative;z-index:50;flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:calc(var(--header-h) + var(--safe-t));padding:calc(10px + var(--safe-t)) calc(var(--gutter) + var(--safe-r)) 10px calc(var(--gutter) + var(--safe-l));background:#f4f4f5db;-webkit-backdrop-filter:saturate(180%) blur(14px);backdrop-filter:saturate(180%) blur(14px);border-bottom:1px solid transparent}.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-mark{display:grid;place-items:center;flex:none;color:var(--ink)}.logo{fill:currentColor;stroke:none;display:block}.brand-mark .logo{width:50px;height:34px}.brand-icon{width:38px;height:38px;display:block}.brand-text{min-width:0}.brand-text h1{margin:0;font-size:16px;font-weight:700;letter-spacing:-.01em;line-height:1.15;white-space:nowrap}.brand-sub{display:block;font-size:12px;color:var(--muted);white-space:nowrap}.status-bar{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:12px;font-weight:600;color:var(--ink-2);white-space:nowrap;flex:none}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--subtle);flex:none}.status-dot.pulse{animation:dot-pulse 2s ease-in-out infinite}.content{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px calc(var(--gutter) + var(--safe-r)) calc(var(--nav-h) + var(--safe-b) + 14px) calc(var(--gutter) + var(--safe-l))}.tab-panel{display:none}.tab-panel.active{display:block}.page-head{margin:18px 2px 14px}.section-title{font-size:22px;font-weight:700;letter-spacing:-.02em;line-height:1.2}.section-subtitle{margin-top:2px;font-size:13px;color:var(--muted)}.list-title{margin:22px 2px 10px;font-size:13px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.system-selector{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:12px 0 4px;padding:4px;border-radius:14px;background:#e8e8ea}.system-pill{height:40px;border-radius:10px;font-size:14px;font-weight:600;color:var(--muted);transition:background .2s var(--ease),color .2s var(--ease),box-shadow .2s var(--ease)}.system-pill.active{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-1)}.motion-ready .system-selector:before{content:"";position:absolute;top:4px;bottom:4px;left:4px;width:calc(50% - 6px);border-radius:10px;background:var(--surface);box-shadow:var(--shadow-1);transition:transform .32s cubic-bezier(.3,1.25,.5,1)}.motion-ready .system-selector[data-active=B]:before{transform:translate(calc(100% + 4px))}.motion-ready .system-pill{position:relative;z-index:1}.motion-ready .system-pill.active{background:transparent;box-shadow:none}.zone-content,.zone-content-flex{display:none}.zone-content.active{display:block}.zone-content-flex.active{display:flex;flex-direction:column;gap:12px;margin-top:12px}.control-card,.node-card,.settings-group,.stats-card,.info-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow-1)}.control-card{position:relative;padding:16px}.control-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.control-card-title{font-size:17px;font-weight:700;letter-spacing:-.01em}.control-card-sub{font-size:12px;color:var(--muted);margin-top:1px}.control-status-badge,.node-status{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:600;background:var(--chip);color:var(--muted);white-space:nowrap;flex:none}.node-status-dot{width:7px;height:7px;border-radius:50%;background:var(--subtle);flex:none}.control-status-badge.online,.node-status.online{background:var(--ok-bg);color:var(--ok)}.control-status-badge.online .node-status-dot,.node-status.online .node-status-dot{background:var(--ok)}.control-button-area{display:flex;flex-direction:column;align-items:center;gap:14px;margin-top:10px}.power-ring-container{position:relative;width:min(68vw,236px);aspect-ratio:1;display:grid;place-items:center}.power-ring-progress,.power-ring-progress svg{position:absolute;inset:0;width:100%;height:100%}.power-ring-progress svg{transform:rotate(-90deg)}.power-ring-bg{fill:none;stroke:var(--line-2);stroke-width:6}.power-ring-fill{fill:none;stroke:var(--ink);stroke-width:6;stroke-linecap:round;stroke-dasharray:578;stroke-dashoffset:578;transition:stroke-dashoffset .4s linear,stroke .3s}.power-ring-container.active .power-ring-fill{stroke:var(--ok)}.power-button{position:relative;z-index:1;width:78%;aspect-ratio:1;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:var(--surface);border:1px solid var(--line);box-shadow:0 10px 30px #0a0a0a14,inset 0 -2px #0a0a0a08;color:var(--ink);transition:transform .15s var(--ease),background .25s var(--ease),color .25s var(--ease),box-shadow .25s var(--ease)}.power-button:active{transform:scale(.97)}.power-button-icon{width:38px;height:38px;stroke-width:1.8}.power-button-status{font-size:13px;font-weight:700;letter-spacing:.14em}.power-button.active{background:var(--ink);color:#fff;border-color:var(--ink);box-shadow:0 16px 36px #0a0a0a47}.power-button.pending .power-button-status{animation:blink 1.2s ease-in-out infinite}.power-button.disabled{opacity:.5}.time-display{text-align:center}.time-display-value{font-size:34px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums;line-height:1.1}.time-display-value.inactive{color:var(--subtle)}.time-display-label{margin-top:2px;font-size:12px;color:var(--muted);font-weight:500}.info-cards-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.info-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--r)}.info-card-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--chip);color:var(--ink);flex:none}.info-card-value{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.1}.info-card-label{font-size:12px;color:var(--muted);line-height:1.25}.irrigation-banner{display:flex;align-items:center;gap:12px;padding:12px 12px 12px 14px;border-radius:var(--r);background:var(--ink);color:#fff;border:1px solid var(--ink)}.irrigation-banner-icon{width:34px;height:34px;border-radius:10px;flex:none;display:grid;place-items:center;background:#27272a;color:#fff}.irrigation-banner .btn-secondary-small{background:#fff;color:var(--ink);border-color:#fff}.irrigation-banner-body{flex:1;min-width:0}.irrigation-banner-text{font-size:13px;font-weight:600;line-height:1.3}.irrigation-banner-sub{font-size:12px;color:#f87171;margin-top:2px}.irrigation-banner-sub:empty{display:none}.valves-alert{display:flex;gap:12px;align-items:flex-start;margin-bottom:12px;padding:12px 14px;border-radius:var(--r);background:var(--warn-bg);color:var(--warn);border:1px solid #fde68a}.valves-alert-icon{flex:none;padding-top:1px}.valves-alert-title{font-size:13px;font-weight:700}.valves-alert-text{font-size:12px;line-height:1.4;color:#92400e}.zone-content>.node-card+.node-card{margin-top:10px}.node-card{overflow:hidden;border-radius:var(--r-lg)}.node-header-row{display:flex;align-items:center;gap:12px;min-height:68px;padding:12px 12px 12px 16px;cursor:pointer;user-select:none}.node-info{flex:1;min-width:0}.node-header{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:700;letter-spacing:-.01em}.node-valve-count{font-size:11px;font-weight:600;color:var(--muted);padding:2px 8px;border-radius:999px;background:var(--chip)}.node-subtitle{font-size:12px;color:var(--muted);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.node-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:4px;font-size:11.5px;color:var(--muted)}.meta-item{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.meta-item .i{width:14px;height:14px}.meta-item.low{color:var(--danger)}.node-expand-arrow{width:32px;height:32px;border-radius:10px;flex:none;display:grid;place-items:center;color:var(--muted);transition:transform .25s var(--ease),background .2s}.node-card:not(.collapsed) .node-expand-arrow{transform:rotate(180deg);background:var(--chip);color:var(--ink)}.node-body{display:grid;grid-template-rows:1fr;border-top:1px solid var(--line-2);padding:6px;transition:grid-template-rows .3s var(--ease),padding .3s var(--ease),border-color .3s}.node-body>.valve-list{min-height:0;overflow:hidden;transition:opacity .22s var(--ease)}.node-card.collapsed .node-body{grid-template-rows:0fr;padding-top:0;padding-bottom:0;border-top-color:transparent}.node-card.collapsed .node-body>.valve-list{opacity:0}.valve-list{display:flex;flex-direction:column}.valve-item{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;padding:10px 10px 10px 12px;border-radius:14px;transition:background .2s}.valve-item+.valve-item{border-top:1px solid var(--line-2);border-radius:0 0 14px 14px}.valve-info{min-width:0}.valve-name{font-size:15px;font-weight:600}.valve-meta{display:flex;align-items:center;gap:8px;margin-top:4px;flex-wrap:wrap}.valve-status-text{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:999px;font-size:11.5px;font-weight:600;background:var(--chip);color:var(--muted);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valve-item.active .valve-status-text{background:var(--ok-bg);color:var(--ok)}.valve-item.pending .valve-status-text{background:var(--warn-bg);color:var(--warn)}.valve-item.pending.sent .valve-status-text{background:var(--info-bg);color:var(--info)}.valve-schedule-btn{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 9px;border-radius:999px;border:1px solid var(--line);font-size:11.5px;font-weight:600;color:var(--ink-2);background:var(--surface)}.valve-schedule-btn .i{width:14px;height:14px}.toggle{position:relative;flex:none;width:52px;height:32px;border-radius:999px;background:#d4d4d8;transition:background .22s var(--ease)}.toggle:after{content:"";position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #00000038;transition:transform .22s var(--ease)}.toggle.active{background:var(--ink)}.toggle.active:after{transform:translate(20px)}.toggle.pending{animation:blink 1.2s ease-in-out infinite}.toggle-lg{width:56px;height:34px}.toggle-lg:after{width:28px;height:28px}.toggle-lg.active:after{transform:translate(22px)}.schedule-option-list{display:flex;flex-direction:column;gap:10px}.schedule-option-item{display:flex;align-items:center;gap:14px;width:100%;min-height:72px;padding:14px 12px 14px 14px;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow-1);transition:transform .12s var(--ease)}.schedule-option-item:active{transform:scale(.985)}.schedule-option-icon{width:44px;height:44px;border-radius:13px;flex:none;display:grid;place-items:center;background:var(--chip);color:var(--ink)}.schedule-option-item:first-child .schedule-option-icon{background:var(--ink);color:#fff}.schedule-option-content{flex:1;min-width:0}.schedule-option-title{font-size:15px;font-weight:600}.schedule-option-subtitle{font-size:12.5px;color:var(--muted);margin-top:1px}.schedule-option-subtitle b{color:var(--ink-2);font-weight:600}.schedule-option-arrow{color:var(--subtle);flex:none}#scheduleList{display:flex;flex-direction:column;gap:8px}.schedule-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 10px 12px 14px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.schedule-time{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}.schedule-duration{font-size:12px;color:var(--muted);margin-top:2px}.schedule-actions{display:flex;align-items:center;gap:4px;flex:none}.icon-btn{width:var(--tap);height:var(--tap);border-radius:12px;display:grid;place-items:center;color:var(--ink-2)}.icon-btn:active{background:var(--chip)}.icon-btn.danger{color:var(--danger)}.schedule-toggle{position:relative;width:46px;height:28px;border-radius:999px;background:#d4d4d8;margin-left:4px;transition:background .2s}.schedule-toggle:after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #00000038;transition:transform .2s var(--ease)}.schedule-toggle.active{background:var(--ink)}.schedule-toggle.active:after{transform:translate(18px)}.empty-state,.setting-description.empty{padding:28px 12px;text-align:center;color:var(--muted);font-size:13px}.settings-group{overflow:hidden;margin-bottom:14px}.setting-item{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px 14px}.setting-item+.setting-item{border-top:1px solid var(--line-2)}.setting-icon{width:36px;height:36px;border-radius:11px;flex:none;display:grid;place-items:center;background:var(--chip);color:var(--ink)}.setting-icon .i{width:18px;height:18px}.setting-text{flex:1;min-width:0}.setting-label{font-size:15px;font-weight:600}.setting-description{font-size:12px;color:var(--muted);margin-top:1px}.setting-value{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px;flex:none}.setting-input{width:72px;height:40px;padding:0 10px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface-2);font-size:16px;font-weight:600;text-align:center;color:var(--ink);font-variant-numeric:tabular-nums}.setting-input:focus{outline:none;border-color:var(--ink);background:#fff}.setting-tag{font-size:12px;font-weight:600;color:var(--muted);background:var(--chip);padding:4px 9px;border-radius:999px;flex:none}.stats-card{padding:18px;background:var(--ink);border-color:var(--ink);color:#fff}.stats-label{font-size:12px;color:#a1a1aa;font-weight:500}.stats-main{font-size:34px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums;margin-top:2px}.history-list{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden;box-shadow:var(--shadow-1)}.history-list>.setting-description{padding:28px 16px;text-align:center}.history-item{display:flex;align-items:flex-start;gap:12px;padding:12px 14px}.history-item+.history-item{border-top:1px solid var(--line-2)}.history-indicator{width:8px;height:8px;border-radius:50%;margin-top:7px;flex:none;background:var(--subtle)}.history-indicator.on{background:var(--ok)}.history-content{flex:1;min-width:0}.history-time{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.history-action{font-size:13.5px;line-height:1.35}.history-duration{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;padding-top:2px;flex:none}.nav-bottom{position:fixed;left:50%;bottom:0;z-index:60;transform:translate(-50%);width:100%;max-width:560px;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);height:calc(var(--nav-h) + var(--safe-b));padding:6px calc(6px + var(--safe-r)) calc(6px + var(--safe-b)) calc(6px + var(--safe-l));background:#fffffff0;-webkit-backdrop-filter:saturate(180%) blur(14px);backdrop-filter:saturate(180%) blur(14px);border-top:1px solid var(--line)}.nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:12px;color:var(--subtle);transition:color .2s}.nav-icon{width:46px;height:28px;padding:4px 13px;border-radius:999px;box-sizing:border-box;stroke-width:2;transition:background .2s var(--ease),color .2s}.nav-label{font-size:11px;font-weight:600;letter-spacing:.01em}.nav-item.active{color:var(--ink)}.nav-item.active .nav-icon{background:var(--ink);color:#fff}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 18px;border-radius:var(--r);font-size:15px;font-weight:600;transition:transform .12s var(--ease),background .2s,opacity .2s}.btn:active{transform:scale(.98)}.btn .i{width:18px;height:18px}.btn-primary{background:var(--ink);color:#fff}.btn-secondary{background:var(--chip);color:var(--ink)}.btn-danger{background:var(--danger);color:#fff}.btn-warning{background:var(--warn);color:#fff}.btn-danger-outline{background:transparent;color:var(--danger);border:1px solid #fecaca}.btn-full{width:100%}.btn-lg{height:52px;font-size:16px}.btn-secondary-small{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 14px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:13px;font-weight:600;color:var(--ink);flex:none}.btn-muted{color:var(--muted)}.button-group{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}.button-group>.btn:only-child{grid-column:1 / -1}#deleteScheduleButton{margin-top:10px}.form-group{margin-top:18px}.form-label{display:block;margin-bottom:8px;font-size:13px;font-weight:600;color:var(--ink-2)}.form-input{width:100%;height:50px;padding:0 14px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface-2);font-size:16px;color:var(--ink);-webkit-appearance:none;appearance:none;transition:border-color .15s,background .15s,box-shadow .15s}.form-input:focus{outline:none;border-color:var(--ink);background:#fff;box-shadow:0 0 0 3px #0a0a0a0f}select.form-input{padding-right:40px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:18px}.form-input-xl{height:60px;font-size:26px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}.form-hint{margin-top:6px;font-size:12px;color:var(--muted)}.form-row{display:flex;gap:10px;align-items:center}.time-row .form-input{text-align:center;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}.time-sep{font-size:22px;font-weight:700;color:var(--subtle)}.time-input.invalid{border-color:var(--danger);background:var(--danger-bg);color:var(--danger)}.time-unit{font-size:15px;font-weight:600;color:var(--muted);min-width:30px}.duration-row .time-unit:first-of-type{margin-right:4px}.time-hint{margin-top:6px;font-size:12px;color:var(--muted);text-align:center;min-height:16px}.time-hint.error{color:var(--danger)}.label-tag{display:inline-flex;align-items:center;height:18px;padding:0 7px;margin-left:6px;border-radius:999px;background:var(--chip);color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.02em;vertical-align:1px}.field-unit{flex:1}.field-unit-label{display:block;margin-top:4px;text-align:center;font-size:11px;color:var(--muted)}.calculated-time{margin-top:10px;padding:10px 12px;border-radius:var(--r-sm);background:var(--chip);font-size:13px;font-weight:600;text-align:center}.radio-group{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin-bottom:14px;border-radius:12px;background:#e8e8ea}.auto-mode-option{height:38px;border-radius:9px;font-size:13px;font-weight:600;color:var(--muted)}.auto-mode-option.active{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-1)}.days-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.day-toggle{height:44px;border-radius:12px;font-size:11.5px;font-weight:700;letter-spacing:.02em;background:var(--chip);color:var(--muted);transition:background .15s,color .15s}.day-toggle.active{background:var(--ink);color:#fff}.modal{position:fixed;inset:0;z-index:1000;display:none;align-items:flex-end;justify-content:center;background:#0a0a0a6b}.modal.active{display:flex;animation:fade-in .2s ease}.modal.closing{animation:fade-out .19s ease forwards;pointer-events:none}.modal.closing .modal-content{animation:sheet-down .19s cubic-bezier(.4,0,1,1) forwards}.modal-top{z-index:1010}.modal-content{width:100%;max-width:560px;max-height:calc(100dvh - 24px - var(--safe-t));overflow-y:auto;overscroll-behavior:contain;padding:8px calc(20px + var(--safe-r)) calc(20px + var(--safe-b)) calc(20px + var(--safe-l));background:var(--surface);border-radius:var(--r-xl) var(--r-xl) 0 0;box-shadow:var(--shadow-3);animation:sheet-up .34s cubic-bezier(.32,.72,0,1)}.modal-content:before{content:"";display:block;width:40px;height:5px;border-radius:999px;background:var(--line);margin:4px auto 10px}.modal-header{position:sticky;top:-8px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 -4px;padding:6px 4px 8px;background:var(--surface)}.modal-title{display:flex;align-items:center;gap:8px;margin:0;font-size:19px;font-weight:700;letter-spacing:-.01em}.modal-title.tone-danger{color:var(--danger)}.modal-title.tone-warn{color:var(--warn)}.modal-close{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--chip);color:var(--ink-2);flex:none}.modal-text{font-size:14.5px;line-height:1.5;color:var(--ink-2);margin-top:10px}.alert-body{display:flex;gap:12px;align-items:flex-start;margin-top:8px}.alert-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--chip);color:var(--ink);flex:none}#systemAlertMessage{font-size:14.5px;line-height:1.5;color:var(--ink-2);white-space:pre-line;padding-top:8px}.swap-bar{margin-top:16px}.swap-btn{width:100%;height:42px}.is-hidden{display:none!important}.valve-duration-list{display:flex;flex-direction:column;gap:8px}.valve-duration-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 10px 10px 12px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);transition:border-color .15s,background .15s}.valve-duration-row.has-time{border-color:var(--ink);background:var(--surface-2)}.valve-duration-info{display:flex;align-items:center;gap:10px;min-width:0}.valve-number-badge,.ordered-valve-badge{min-width:34px;height:34px;padding:0 6px;border-radius:10px;display:grid;place-items:center;background:var(--chip);font-size:14px;font-weight:700;color:var(--ink)}.valve-duration-row.has-time .valve-number-badge{background:var(--ink);color:#fff}.valve-duration-label{font-size:14px;font-weight:600}.valve-duration-sublabel{font-size:11.5px;color:var(--muted)}.valve-duration-controls{display:flex;align-items:center;gap:6px;flex:none}.duration-btn{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--chip);color:var(--ink)}.duration-btn .i{width:18px;height:18px}.duration-input{width:60px;height:40px;border:1px solid var(--line);border-radius:12px;text-align:center;font-size:16px;font-weight:700;background:#fff;font-variant-numeric:tabular-nums}.duration-input:focus{outline:none;border-color:var(--ink)}.irrigation-summary-badge{display:flex;align-items:center;gap:8px;margin-top:10px;padding:10px 12px;border-radius:var(--r-sm);background:var(--chip);font-size:13px;color:var(--ink-2)}.irrigation-summary-badge .i{width:16px;height:16px}.order-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.order-header .form-label{margin:0}.order-mode-toggle{display:flex;gap:3px;padding:3px;border-radius:10px;background:#e8e8ea}.mode-btn{height:32px;padding:0 12px;border-radius:8px;font-size:12.5px;font-weight:600;color:var(--muted)}.mode-btn.active{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-1)}.available-label{font-size:12px;color:var(--muted);font-weight:600;margin-bottom:8px}.available-valves-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:8px;margin-bottom:12px}.available-valve-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;height:60px;border-radius:var(--r);border:1px dashed #c4c4c8;background:var(--surface)}.valve-num{font-size:17px;font-weight:700}.valve-time{font-size:11px;color:var(--muted)}.ordered-valves-list{display:flex;flex-direction:column;gap:8px}.empty-order-state{display:flex;justify-content:center;padding:20px 12px;border:1px dashed var(--line);border-radius:var(--r);color:var(--muted);font-size:13px;text-align:center}.ordered-valve-item{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.ordered-valve-item.dragging{opacity:.5}.ordered-valve-item.drag-over{border-color:var(--ink)}.order-number{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--ink);color:#fff;font-size:12px;font-weight:700;flex:none}.ordered-valve-info{flex:1;min-width:0}.ordered-valve-header{display:flex;align-items:center;gap:8px}.ordered-valve-badge{min-width:28px;height:28px;font-size:12px}.ordered-valve-name{font-size:14px;font-weight:600}.ordered-valve-meta{font-size:11.5px;color:var(--muted);margin-top:2px}.ordered-valve-controls{display:flex;gap:4px;flex:none}.order-control-btn{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--chip);color:var(--ink)}.order-control-btn .i{width:18px;height:18px}.remove-btn{color:var(--danger);background:var(--danger-bg)}.drag-handle{color:var(--subtle);display:grid;place-items:center}.order-preview-compact{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px;padding:10px 12px;border-radius:var(--r-sm);background:var(--chip)}.preview-label{font-size:12px;font-weight:600;color:var(--muted);margin-right:2px}.preview-sequence{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px}.preview-valve{font-size:12px;font-weight:700;padding:2px 7px;border-radius:7px;background:#fff}.preview-arrow{display:inline-flex;color:var(--subtle)}.preview-arrow .i{width:14px;height:14px}.order-actions{display:flex;gap:8px;margin-top:12px}.irrigation-footer{position:sticky;bottom:calc(-20px - var(--safe-b));z-index:2;margin:18px -20px calc(-20px - var(--safe-b));padding:14px 20px calc(16px + var(--safe-b));background:var(--surface);border-top:1px solid var(--line)}.irrigation-footer .button-group{margin-top:12px}.irrigation-summary{display:flex;align-items:center;justify-content:center;gap:18px}.summary-item{display:flex;align-items:baseline;gap:6px}.summary-value{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}.summary-label{font-size:13px;color:var(--muted)}.summary-divider{width:1px;height:22px;background:var(--line)}#toastHost{position:fixed;left:0;right:0;z-index:1100;bottom:calc(var(--nav-h) + var(--safe-b) + 12px);display:flex;flex-direction:column;align-items:center;gap:8px;padding:0 var(--gutter);pointer-events:none}.toast{display:flex;align-items:center;gap:10px;max-width:520px;width:fit-content;padding:11px 14px;border-radius:var(--r);background:var(--ink);color:#fff;font-size:13.5px;font-weight:500;line-height:1.35;box-shadow:var(--shadow-2);pointer-events:auto;transform:translateY(8px);opacity:0;transition:transform .22s var(--ease),opacity .22s var(--ease)}.toast{transform:translateY(12px) scale(.96);transition:transform .3s cubic-bezier(.3,1.3,.5,1),opacity .2s var(--ease)}.toast.show{transform:translateY(0) scale(1);opacity:1}.toast .i{width:18px;height:18px;flex:none}.toast-success .i{color:#4ade80}.toast-danger .i{color:#f87171}.toast-warning .i{color:#fbbf24}.toast-info .i{color:#93c5fd}.login-panel{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:calc(24px + var(--safe-t)) calc(var(--gutter) + var(--safe-r)) calc(24px + var(--safe-b)) calc(var(--gutter) + var(--safe-l));background:var(--bg);overflow-y:auto}.login-panel[hidden]{display:none}body.login-open{overflow:hidden}.login-card{width:100%;max-width:400px;padding:28px 22px 22px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-xl);box-shadow:var(--shadow-2)}.login-brand{text-align:center;margin-bottom:8px}.login-logo{display:flex;justify-content:center;margin:0 auto 16px;color:var(--ink)}.login-logo .logo{width:104px;height:71px}.login-logo img{width:220px;max-width:80%;height:auto;display:block}.login-title{margin:0;font-size:22px;font-weight:700;letter-spacing:-.02em}.login-subtitle{margin-top:3px;font-size:13px;color:var(--muted)}.login-password{position:relative}.login-password .form-input{padding-right:52px}.login-toggle{position:absolute;top:50%;right:4px;transform:translateY(-50%);width:44px;height:44px;border-radius:12px;display:grid;place-items:center;color:var(--muted)}.login-error{min-height:20px;margin:12px 0 6px;font-size:13px;color:var(--danger);text-align:center}.login-error:empty{margin:8px 0 4px}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes sheet-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes sheet-down{0%{transform:translateY(0)}to{transform:translateY(40%);opacity:0}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes blink{0%,to{opacity:1}50%{opacity:.45}}@keyframes dot-pulse{0%{box-shadow:0 0 #15803d73}70%{box-shadow:0 0 0 7px #15803d00}to{box-shadow:0 0 #15803d00}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}@media (max-width: 360px){:root{--gutter: 12px}.brand-sub{display:none}.status-bar{padding:0 9px}.info-card{padding:12px;gap:10px}.info-card-icon{width:34px;height:34px}.day-toggle{font-size:10.5px}.time-display-value{font-size:30px}}@media (min-width: 640px){.modal{align-items:center;padding:24px}.modal-content{border-radius:var(--r-xl);max-height:calc(100dvh - 48px);padding-bottom:22px}.modal-content:before{display:none}.modal-header{top:-8px;padding-top:10px}.irrigation-footer{bottom:-22px;margin-bottom:-22px;padding-bottom:18px}.nav-bottom{bottom:12px;border:1px solid var(--line);border-radius:20px;width:calc(100% - 24px);box-shadow:var(--shadow-2);height:var(--nav-h);padding:6px}.content{padding-bottom:calc(var(--nav-h) + 48px)}#toastHost{bottom:calc(var(--nav-h) + 28px)}}@media (hover: hover){.schedule-option-item:hover,.node-header-row:hover{background:var(--surface-2)}.btn-secondary-small:hover,.valve-schedule-btn:hover,.icon-btn:hover{background:var(--chip)}}.preview-valve.later{opacity:.55;outline:1px dashed var(--subtle)}.order-hint{margin:10px 2px 0;font-size:12px;line-height:1.4;color:var(--warn)}.manual-btn{position:absolute;right:14px;bottom:14px;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--chip);color:var(--ink-2)}.manual-btn .i{width:18px;height:18px}.manual-btn:active{transform:scale(.98)}.manual-btn:disabled{opacity:.4}.manual-badge{display:inline-flex;align-items:center;height:20px;padding:0 8px;margin-left:4px;border-radius:999px;background:var(--warn-bg);color:var(--warn);font-size:11px;font-weight:700;letter-spacing:.04em;vertical-align:2px}.manual-badge[hidden],.manual-hint[hidden]{display:none}.manual-hint{display:flex;gap:8px;align-items:flex-start;margin-top:12px;padding:10px 12px;border-radius:var(--r-sm);background:var(--warn-bg);color:var(--warn);font-size:13px;line-height:1.35}.manual-hint .i{width:16px;height:16px;flex:none;margin-top:1px}.pin-input{letter-spacing:.5em;padding-left:.5em;margin-top:4px}.pin-input.invalid{border-color:var(--danger);background:var(--danger-bg);color:var(--danger)}.pin-error{min-height:18px;margin-top:8px;font-size:13px;color:var(--danger);text-align:center}.setting-input[readonly]{background:var(--chip);color:var(--muted);border-color:transparent}.setting-lock.unlocked .setting-icon{background:var(--ok-bg);color:var(--ok)}.setting-lock.unlocked .setting-description{color:var(--ok)}.m-enter{animation:m-enter .32s cubic-bezier(.2,.8,.2,1) both;animation-delay:var(--enter-delay, 0ms)}@keyframes m-enter{0%{opacity:0;transform:translate3d(var(--enter-x, 0px),8px,0)}to{opacity:1;transform:none}}.btn,.btn-secondary-small,.manual-btn,.icon-btn,.modal-close,.system-pill,.nav-item,.schedule-option-item,.day-toggle,.duration-btn,.order-control-btn,.available-valve-btn,.mode-btn,.auto-mode-option,.valve-schedule-btn,.toggle,.schedule-toggle{transition-property:transform,background,color,opacity,box-shadow,border-color;transition-duration:.28s;transition-timing-function:cubic-bezier(.3,1.4,.5,1)}.btn:active,.btn-secondary-small:active,.manual-btn:active,.icon-btn:active,.modal-close:active,.day-toggle:active,.duration-btn:active,.order-control-btn:active,.available-valve-btn:active,.mode-btn:active,.auto-mode-option:active,.valve-schedule-btn:active{transform:scale(.95);transition-duration:.08s}.schedule-option-item:active{transform:scale(.98);transition-duration:.08s}.node-header-row{transition:background .2s}.node-header-row:active{background:var(--surface-2)}.toggle:after{transition:transform .3s cubic-bezier(.3,1.3,.5,1),width .2s var(--ease)}.toggle:active:after{width:32px}.toggle.active:active:after{transform:translate(14px)}.toggle-lg:active:after{width:34px}.toggle-lg.active:active:after{transform:translate(16px)}.nav-item:active{transform:scale(.92);transition-duration:.08s}.nav-item.active .nav-icon{animation:nav-pop .36s cubic-bezier(.3,1.5,.5,1)}@keyframes nav-pop{0%{transform:scale(.7)}to{transform:scale(1)}}.power-button{transition:transform .35s cubic-bezier(.3,1.4,.5,1),background .35s var(--ease),color .35s var(--ease),box-shadow .35s var(--ease),border-color .35s}.power-button:active{transform:scale(.94);transition-duration:.1s}.power-button:after{content:"";position:absolute;inset:-1px;border-radius:50%;box-shadow:0 0 #0a0a0a2e;opacity:0;pointer-events:none}.power-button.active:after{animation:halo 2.6s ease-out infinite}@keyframes halo{0%{opacity:1;box-shadow:0 0 #0a0a0a29}70%,to{opacity:0;box-shadow:0 0 0 18px #0a0a0a00}}.power-button-icon,.power-button-status{transition:transform .35s cubic-bezier(.3,1.4,.5,1)}.power-button.active .power-button-icon{transform:scale(1.06)}.power-ring-fill{transition:stroke-dashoffset .6s var(--ease),stroke .4s var(--ease)}.control-status-badge,.node-status,.valve-status-text,.node-status-dot,.status-dot,.valve-item,.setting-input,.setting-icon,.time-display-value{transition:background-color .3s var(--ease),color .3s var(--ease),border-color .3s var(--ease)}.manual-badge:not([hidden]),.irrigation-banner,.valves-alert,.manual-hint:not([hidden]){animation:m-enter .3s cubic-bezier(.2,.8,.2,1) both}.m-settle{animation:settle .6s var(--ease)}@keyframes settle{0%{background:var(--chip)}to{background:transparent}}.m-shake{animation:shake .36s cubic-bezier(.36,.07,.19,.97)}@keyframes shake{20%,60%{transform:translate(-6px)}40%,80%{transform:translate(6px)}}.header{transition:border-color .25s var(--ease),box-shadow .25s var(--ease)}.header.scrolled{border-bottom-color:var(--line)}.toast:not(.show){transition-duration:.2s}.login-card{animation:m-enter .4s cubic-bezier(.2,.8,.2,1) both}body:has(.modal.active) #toastHost{top:calc(12px + var(--safe-t));bottom:auto}body:has(.modal.active) .toast:not(.show){transform:translateY(-12px) scale(.96)}body:not(.can-admin) [data-perm=admin],body:not(.can-schedulesEdit) [data-perm=schedulesEdit],body:not(.can-schedulesView) [data-perm=schedulesView],body:not(.can-settingsView) [data-perm=settingsView],body:not(.can-admin) .manual-btn{display:none!important}body:not(.can-control) .power-button,body:not(.can-control) .valve-toggle,body:not(.can-control) .irrigation-banner .btn-secondary-small{pointer-events:none!important}body:not(.can-control) .power-button{cursor:default;box-shadow:none}body:not(.can-control) .control-card-title:after{content:"Solo consulta";margin-left:8px;padding:2px 8px;border-radius:999px;vertical-align:2px;background:var(--chip);color:var(--muted);font-size:11px;font-weight:700;letter-spacing:0}body:not(.can-control) .valve-toggle{opacity:.55}body:not(.can-control) .irrigation-banner .btn-secondary-small{display:none}body:not(.can-schedulesEdit) .valve-schedule-btn{display:none}.header-logout{display:none}body:not(.can-settingsView) .header-logout{display:inline-grid;margin-left:auto;margin-right:6px}body.single-zone .system-selector,body.single-zone #controlZoneB,body.single-zone #valvesZoneB,body.single-zone #scheduleZoneB{display:none!important}body.single-zone .control-card-sub{display:none}.role-badge{display:none!important;height:26px;padding:0 10px;display:inline-flex;align-items:center;border-radius:999px;background:var(--info-bg);color:var(--info);font-size:11.5px;font-weight:700;margin-left:auto;margin-right:6px}.role-badge[hidden]{display:none}.users-list{display:flex;flex-direction:column;gap:8px;margin-top:6px}.user-row{display:flex;align-items:center;gap:12px;padding:10px 6px 10px 12px;border:1px solid var(--line);border-radius:var(--r)}.user-row.inactive{opacity:.55}.user-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--chip);font-weight:700;flex:none}.user-info{flex:1;min-width:0}.user-name{font-weight:600;font-size:14.5px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}.user-meta{font-size:12px;color:var(--muted);margin-top:1px}.role-chip{font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--chip);color:var(--muted)}.role-chip.role-admin{background:var(--ink);color:#fff}.role-chip.role-operador{background:var(--info-bg);color:var(--info)}.role-chip.role-regador{background:var(--ok-bg);color:var(--ok)}#auditList{margin-top:8px;max-height:65dvh;overflow-y:auto}.uc-all{display:flex;align-items:center;gap:8px;margin:12px 0 6px;font-size:14px;font-weight:600}.uc-list{display:flex;flex-direction:column;gap:8px;max-height:42vh;overflow-y:auto;margin-bottom:14px}.uc-row{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r);cursor:pointer}.uc-row input{margin-top:3px}.uc-main{flex:1;min-width:0}.uc-name{font-weight:600;font-size:14.5px;display:flex;gap:6px;align-items:center;flex-wrap:wrap}.uc-sub{font-size:12.5px;color:var(--muted);margin-top:2px;line-height:1.45}.uc-chip{font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--chip);color:var(--muted)}.uc-chip.ok{background:#34c75924;color:#1f8a3c}.uc-chip.wait{background:#ff9f0a29;color:#a35c00}.uc-chip.off{background:#ff3b301f;color:#c0392b}.uc-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.uc-fields .form-input{text-align:center}.uc-fields .form-hint{display:block;text-align:center;margin-top:2px}*{scrollbar-width:none;-ms-overflow-style:none}*::-webkit-scrollbar{display:none;width:0;height:0}.dev-credit{margin:18px 0 0;text-align:center;font-size:11.5px;line-height:1.5;color:var(--muted);opacity:.75;letter-spacing:.02em}.dev-credit b{font-weight:700;letter-spacing:.08em}
