/* Мобильный СКУД ПЕГАС. © ООО «СпецТехСервис ГРУПП», Республика Беларусь. */
.scud-view{padding-bottom:calc(116px + env(safe-area-inset-bottom))}.scud-content{display:grid;gap:12px;margin-top:10px;color:var(--text,#f7f8fb)}
.scud-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.scud-toolbar p{flex:1 0 100%;margin:0;color:var(--muted,#b7becb);font-size:12px;line-height:1.4}.scud-favorites-mode{display:flex;align-items:center;gap:8px;min-height:44px;padding:7px 10px;border:1px solid color-mix(in srgb,var(--accent,#ff8a00) 55%,transparent);border-radius:15px;background:color-mix(in srgb,var(--accent,#ff8a00) 12%,var(--surface,#151922));color:var(--text,#fff);font:inherit}.scud-favorites-mode span{color:#ffae35;font-size:20px}.scud-favorites-mode b{font-size:12px;letter-spacing:.05em}.scud-favorites-mode i{display:grid;place-items:center;min-width:28px;height:28px;border-radius:10px;background:var(--accent,#ff8a00);color:#241300;font-size:11px;font-style:normal;font-weight:900}.scud-favorites-mode.active{background:color-mix(in srgb,var(--accent,#ff8a00) 24%,var(--surface,#151922))}
.scud-layout-switch{display:grid;grid-template-columns:1fr 1fr;flex:1 1 190px;min-height:44px;padding:3px;border:1px solid var(--border,rgba(255,255,255,.12));border-radius:15px;background:var(--surface,#151922)}.scud-layout-switch button{display:flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:12px;background:transparent;color:var(--muted,#b7becb);font:inherit;font-size:11px;font-weight:900}.scud-layout-switch button[aria-pressed="true"]{background:linear-gradient(145deg,#ff9d28,#db5b00);color:#fff}.scud-settings-button{display:flex;align-items:center;gap:5px;min-height:44px;padding:6px 10px;border:1px solid var(--border,rgba(255,255,255,.12));border-radius:15px;background:var(--surface,#151922);color:var(--text,#fff)}.scud-settings-button.active{border-color:#ff8a00}.scud-settings-button b{font-size:10px}.scud-settings-panel{display:grid;flex:1 0 100%;gap:0;padding:4px 13px;border:1px solid var(--border,rgba(255,255,255,.12));border-radius:18px;background:var(--surface,#151922)}.scud-settings-panel>label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:12px 0;border-bottom:1px solid var(--border,rgba(255,255,255,.1));color:var(--text,#fff);text-transform:none}.scud-settings-panel>label span{display:grid;gap:2px}.scud-settings-panel>label b{font-size:12px}.scud-settings-panel>label small{color:var(--muted,#b7becb);font-size:10px;font-weight:500}.scud-settings-panel .ios-switch{flex:0 0 auto}.scud-radius{margin:0;padding:11px 0 13px;border:0}.scud-radius legend{padding:0;color:var(--muted,#b7becb);font-size:10px;font-weight:800}.scud-radius>div{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:8px}.scud-radius button{min-height:36px;border:1px solid var(--border,rgba(255,255,255,.12));border-radius:11px;background:var(--surface-soft,#222733);color:var(--text,#fff);font-size:11px;font-weight:850}.scud-radius button[aria-pressed="true"]{border-color:#ff8a00;background:#e56b00;color:#fff}.scud-radius:disabled{opacity:.45}
.scud-repeat-interval{border-top:1px solid var(--border,rgba(255,255,255,.1))}.scud-repeat-interval>div{grid-template-columns:repeat(3,1fr)}
.scud-group{padding:13px;border:1px solid var(--border,rgba(255,255,255,.12));border-radius:20px;background:var(--surface,#151922)}.scud-group>header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.scud-group h2{margin:0;font-size:17px}.scud-group header strong{display:grid;place-items:center;min-width:30px;height:30px;border-radius:11px;background:color-mix(in srgb,var(--accent,#ff8a00) 18%,var(--surface-soft,#222733));font-size:12px}.scud-group>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.scud-point{display:flex;min-width:0;aspect-ratio:1;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:7px;border:1px solid var(--border,rgba(255,255,255,.12));border-radius:17px;background:var(--surface-soft,#222733);color:var(--text,#fff);font:inherit;text-align:center;box-shadow:0 8px 18px rgba(0,0,0,.12);touch-action:manipulation}.scud-point.favorite{border-color:#ff9a1f;background:linear-gradient(145deg,color-mix(in srgb,#ff8a1f 22%,var(--surface-soft,#222733)),var(--surface-soft,#222733))}.scud-point-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:15px;background:linear-gradient(145deg,#ff9d28,#db5b00);color:#fff;box-shadow:0 7px 15px rgba(229,98,0,.24)}.scud-point-icon svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.scud-point>b{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.15}.scud-point>small{font-size:9px;color:var(--muted,#b7becb)}.scud-point>i{font-size:9px;font-style:normal;font-weight:900;color:#27a966}.scud-point.pending{opacity:.82}.scud-point.opened{border-color:#22b66f;background:linear-gradient(145deg,#168b58,#075c3a);color:#fff;box-shadow:0 0 0 2px rgba(34,182,111,.18),0 10px 24px rgba(8,105,65,.28)}.scud-point.opened .scud-point-icon{background:#fff;color:#087247}.scud-point.opened small,.scud-point.opened i{color:#fff}.scud-point.denied,.scud-point.failed{border-color:#cf5261}.scud-point.offline{opacity:.62}.scud-point.favorite-select{position:relative;cursor:pointer}.scud-point.favorite-select::after{content:'☆';position:absolute;right:7px;top:4px;color:#ffad32;font-size:20px}.scud-point.favorite-select.favorite::after{content:'★'}
.scud-home-favorites{display:block;margin:2px 0 8px;padding:9px;border:1px solid color-mix(in srgb,#ff8a00 55%,transparent);border-radius:18px;background:linear-gradient(135deg,color-mix(in srgb,#ff8a00 19%,var(--surface,#151922)),var(--surface,#151922));box-shadow:0 10px 24px rgba(218,91,0,.14)}.scud-home-favorites[hidden]{display:none}.scud-home-favorites>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.scud-home-point{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:94px;padding:8px 5px;border:1px solid color-mix(in srgb,#ff9a22 35%,transparent);border-radius:15px;background:color-mix(in srgb,#ff8a00 13%,var(--surface-soft,#222733));color:var(--text,#fff);font:inherit;text-align:center}.scud-home-point>span{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:#e86b00;color:#fff}.scud-home-point svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.scud-home-point b{display:-webkit-box;overflow:hidden;min-height:24px;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:11px;line-height:1.08}.scud-home-point small{color:#ffb756;font-size:9px;font-weight:800}.scud-home-point.opened{border-color:#18a963;background:#087046}.scud-home-point.opened small{color:#fff}.scud-home-point:disabled{opacity:.58}
.scud-map-shell{position:relative;overflow:hidden;min-height:470px;border:1px solid var(--border,rgba(255,255,255,.12));border-radius:22px;background:#10151e;touch-action:pan-x pan-y}.scud-map-host{position:absolute;inset:0 0 88px}.scud-map-host::after{content:'';position:absolute;inset:0;z-index:2;background:rgba(4,17,32,.28);pointer-events:none}.scud-map-host canvas{filter:brightness(.72) saturate(.82) contrast(.96)}.scud-map-loading{position:absolute;inset:0;display:grid;place-items:center;padding:22px;background:#10151e;color:#fff;font-size:12px;text-align:center}.scud-map-loading.error{gap:12px}.scud-map-loading button{min-height:40px;padding:0 15px;border:0;border-radius:12px;background:#e86b00;color:#fff;font-weight:800}.scud-map-marker{display:grid;place-items:center;width:48px;height:48px;border:3px solid #fff;border-radius:16px;background:linear-gradient(145deg,#ff9d28,#d95900);color:#fff;box-shadow:0 9px 22px rgba(0,0,0,.38);transform:translate(-50%,-100%)}.scud-map-marker svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.scud-map-marker.opened{background:#07804b}.scud-map-user{display:grid;place-items:center;width:38px;height:38px;border:4px solid #fff;border-radius:50% 50% 50% 12px;background:#4b8df8;color:#fff;box-shadow:0 7px 18px rgba(0,0,0,.35);transform:translate(-50%,-100%) rotate(-45deg)}.scud-map-user span{transform:rotate(45deg);font-size:19px}.scud-map-selection{position:absolute;z-index:4;left:8px;right:8px;bottom:8px;display:grid;grid-template-columns:47px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:72px;padding:8px;border:1px solid rgba(255,255,255,.15);border-radius:17px;background:rgba(14,20,29,.92);color:#fff;box-shadow:0 12px 26px rgba(0,0,0,.3);backdrop-filter:blur(12px)}.scud-map-selection.empty{display:flex;justify-content:center;color:#b7becb;font-size:11px}.scud-map-selection-icon{display:grid;place-items:center;width:47px;height:47px;border-radius:14px;background:#e86b00}.scud-map-selection-icon svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:1.8}.scud-map-selection>span:nth-child(2){display:grid;min-width:0}.scud-map-selection small{color:#ffab45;font-size:8px;font-weight:900}.scud-map-selection b,.scud-map-selection i{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scud-map-selection b{font-size:12px}.scud-map-selection i{color:#b7becb;font-size:9px;font-style:normal}.scud-map-selection button{min-height:42px;padding:0 10px;border:0;border-radius:12px;background:#e86b00;color:#fff;font-size:9px;font-weight:900}.scud-map-selection button:disabled{background:#555d68;color:#d4d7dc}
body[data-theme="light"] .scud-content{color:#18202b}body[data-theme="light"] .scud-group{background:#fff;color:#18202b}body[data-theme="light"] .scud-point{background:#f4f6f9;color:#18202b}body[data-theme="light"] .scud-point>small,body[data-theme="light"] .scud-toolbar p{color:#4f5f71}body[data-theme="light"] .scud-home-favorites{background:linear-gradient(135deg,#fff3e2,#fff)}body[data-theme="light"] .scud-home-point{background:#fff4e3;color:#17202b}
body[data-theme="light"] .scud-layout-switch,body[data-theme="light"] .scud-settings-button,body[data-theme="light"] .scud-settings-panel{background:#fff;color:#18202b}body[data-theme="light"] .scud-settings-panel>label,body[data-theme="light"] .scud-radius button{color:#18202b}body[data-theme="light"] .scud-radius button{background:#f3f5f8}
body[data-theme="vision"] .scud-group,body[data-theme="vision"] .scud-point,body[data-theme="vision"] .scud-home-favorites{border-width:2px}body[data-theme="vision"] .scud-point>small,body[data-theme="vision"] .scud-toolbar p{color:#fff}
@media(max-width:370px){.scud-group{padding:10px}.scud-point{padding:5px}.scud-point-icon{width:40px;height:40px}.scud-point-icon svg{width:27px;height:27px}.scud-home-favorites{padding:7px}.scud-home-favorites>div{gap:6px}.scud-home-point{min-height:90px;padding:6px 4px}.scud-home-point>span{width:39px;height:39px}.scud-home-point svg{width:27px;height:27px}.scud-home-point b{font-size:10px}}
@media(prefers-reduced-motion:no-preference){.scud-point{transition:background .2s ease,border-color .2s ease,transform .16s ease}.scud-point.can-open:active,.scud-home-point:active{transform:scale(.96)}.scud-point.pending .scud-point-icon{animation:scud-pulse .85s ease-in-out infinite alternate}}@keyframes scud-pulse{to{transform:scale(.91);opacity:.72}}

/* Семантика статусов едина на главной и в СКУД: ожидание — оранжевое, доступ — зелёный, ошибка — красная. */
.scud-point.view-only>i{color:#df861c}.scud-point.can-open>i{color:#27a966}.scud-point.denied>i,.scud-point.failed>i,.scud-point.offline>i{color:#cf5261}.scud-home-point.connecting small{color:#df861c}.scud-home-point.available small{color:#27a966}.scud-home-point.offline small{color:#cf5261}

/* После команды блокируем только выбранную точку: успех виден 5 секунд, ошибка — 10 секунд. */
.scud-point.cooldown,.scud-home-point.cooldown{cursor:wait;opacity:.9;box-shadow:0 0 0 2px rgba(255,151,31,.2),0 10px 24px rgba(218,91,0,.18)}.scud-point.cooldown .scud-point-icon,.scud-home-point.cooldown>span{animation:scud-cooldown 1s ease-in-out infinite alternate}.scud-point.cooldown>i,.scud-home-point.cooldown small{color:#ffad3d}.scud-map-selection.cooldown button{background:#a95b12;color:#fff;cursor:wait}@keyframes scud-cooldown{to{filter:saturate(.72);transform:scale(.93)}}

/* Явное добавление и удаление избранного: вся плитка является кнопкой. */
.scud-point.favorite-select{border-style:dashed}.scud-point.favorite-select>i{min-width:70px;padding:4px 7px;border-radius:9px;background:rgba(255,138,0,.14);color:#ffae35}.scud-point.favorite-select.favorite>i{background:#e56b00;color:#fff}

/* Итог команды фиксируется цветом на самой кнопке. */
.scud-point.denied,.scud-point.failed{border-color:#e64b5d;background:linear-gradient(145deg,#a92d3d,#701c29);color:#fff;box-shadow:0 0 0 2px rgba(230,75,93,.16),0 10px 24px rgba(112,28,41,.28)}
.scud-point.denied .scud-point-icon,.scud-point.failed .scud-point-icon{background:#fff;color:#b3263a}
.scud-point.denied small,.scud-point.denied i,.scud-point.failed small,.scud-point.failed i{color:#fff}
.scud-home-point.failed,.scud-home-point.denied,.scud-home-point.offline{border-color:#e64b5d;background:#8f2635;color:#fff}
.scud-home-point.failed small,.scud-home-point.denied small,.scud-home-point.offline small{color:#fff}
.scud-map-selection.opened button{background:#087046;color:#fff}
.scud-map-selection.failed button,.scud-map-selection.denied button,.scud-map-selection.offline button{background:#a92d3d;color:#fff}
.scud-map-selection button:disabled{opacity:1}
