.v9 .nav #automation-submenu{padding:2px 0 7px 26px;display:grid;gap:3px}.v9 .nav #automation-submenu[hidden]{display:none}.v9 .nav #automation-submenu button{font-size:14px;line-height:1.4;min-height:34px;padding:8px 10px;margin:0;border:0;border-radius:7px;text-align:left;color:#b9cbed;white-space:normal}.v9 .nav #automation-submenu button.selected{background:#ffffff12;color:#fff;border-left:2px solid #3384ff}
.automation-page{color:#1b2438;min-width:0}.automation-page h2{font-size:25px;margin:0 0 8px;font-weight:600}.automation-page h3{font-size:18px;margin:0;font-weight:600}.a-heading,.a-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.a-heading{margin-bottom:20px}.a-heading p,.a-muted{color:#7a8395;font-size:15px;line-height:1.6;margin:6px 0 16px}.a-card{background:white;border:1px solid #e1e3e8;border-radius:12px;padding:18px;min-width:0}.a-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}.a-stats>.a-card{height:78px;min-height:78px;padding:9px 11px;border-radius:12px;overflow:hidden}.a-stats strong{display:block;font-size:23px;line-height:1;font-weight:600;margin-bottom:4px}.a-stats span{display:block;font-size:13px;line-height:1.2;color:#4f5b72}.a-stats small{display:block;color:#718099;font-size:11px;line-height:1.2;min-height:12px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.a-kpi{appearance:none;-webkit-appearance:none;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease,transform .15s ease}.a-kpi:hover{border-color:#b8c9f4;box-shadow:0 5px 16px rgba(15,71,241,.07)}.a-kpi:focus-visible{outline:2px solid #0f47f1;outline-offset:2px}.a-kpi.active{border-color:#0f47f1;background:#f4f7ff;box-shadow:inset 0 0 0 1px rgba(15,71,241,.08)}.a-kpi.active strong{color:#0f47f1}.a-filters{display:flex;gap:10px;margin-bottom:24px;flex-wrap:wrap}.a-filters input,.a-filters select{padding:11px 12px;background:white;border:1px solid #e1e3e8;border-radius:8px;font-size:15px;color:#6b7280;min-width:0}.a-filters input{flex:1;min-width:200px}.a-device-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);gap:20px;align-items:start}.a-device-list{padding:10px;display:grid;gap:8px}.a-device-row{display:grid;grid-template-columns:minmax(0,1fr) 160px minmax(170px,.8fr);gap:18px;align-items:center;width:100%;border:1px solid #e1e3e8;border-radius:9px;padding:13px;text-align:left;font-size:15px;background:white}.a-device-row strong{font-size:17px;font-weight:600;overflow-wrap:anywhere}.a-device-row small{display:block;font-size:14px;color:#7a8395;margin-top:5px}.a-device-row.selected{background:#edf2ff;border-color:#5573ff}.a-device-row:hover{border-color:#879fff}.a-table-head{border:0;font-size:14px;color:#6c7488;padding:4px 12px 8px}.a-badge{font-size:14px;display:inline-block;padding:5px 12px;border-radius:18px;width:fit-content;white-space:nowrap}.a-badge.online{background:#e5faf0;color:#07814c}.a-badge.offline{background:#fcebeb;color:#bb3232}.a-badge.warning{background:#fff6df;color:#9b6700}.a-badge.error{background:#fff0f0;color:#a83232}.a-badge.standalone{background:#eef1f6;color:#536078}.a-device-location{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#536078;font-size:13px}.a-detail{margin-top:55px;position:sticky;top:18px}.a-detail>h2{margin-top:18px}.a-info{display:grid;gap:18px;margin:24px 0 28px}.a-info>div{display:grid;grid-template-columns:1fr 1.2fr;gap:12px}.a-info dt{font-size:14px;color:#7a8395}.a-info dd{font-size:15px;margin:0;overflow-wrap:anywhere}.a-signals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.a-signals>div,.a-scene-actions>div{border:1px solid #e1e3e8;border-radius:8px;background:#f6f7fa;padding:12px}.a-signals .enabled{background:#e5faf0;border-color:#e5faf0}.a-signals span,.a-scene-actions span{display:block;font-size:14px;color:#7a8395;margin-bottom:8px}.a-signals strong,.a-scene-actions strong{display:block;font-size:15px;font-weight:500}.a-signals .enabled strong{color:#07814c}.a-demo{font-size:14px;color:#8a92a2;line-height:1.7;margin-top:22px}.a-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.a-actions.end{justify-content:flex-end}.a-actions button{min-height:36px}.a-channels{display:grid;gap:8px;margin:15px 0 20px}.a-channels>div{display:grid;grid-template-columns:1fr 62px 62px;align-items:center;border:1px solid #e1e3e8;border-radius:8px;padding:5px;gap:5px;font-size:14px}.a-channels span{padding:4px}.a-channels button{padding:9px 6px;border:1px solid #e1e3e8;border-radius:6px;font-size:13px;background:white}.a-channels button[aria-pressed=true]{background:#edf2ff;border-color:#6381f7;color:#2348c0}.a-channels button:disabled{opacity:.4}.a-temperature{display:flex;align-items:end;gap:10px;margin-bottom:22px}.a-temperature label{display:grid;gap:8px;font-size:14px;flex:1}.a-temperature input{width:100%;min-width:0;padding:9px;border:1px solid #dee0ec;border-radius:8px}.a-lock-state{padding:20px;background:#f6f7fa;border-radius:8px;margin:14px 0}.a-scenario-layout{display:grid;grid-template-columns:minmax(250px,1fr) minmax(0,1.7fr);gap:20px;align-items:start}.a-scenario-list{display:grid;gap:12px;margin-top:14px}.a-scenario-list button{text-align:left;width:100%;padding:16px}.a-scenario-list .selected{background:#eeedff;border-color:#2348c0}.a-scenario-list strong{font-size:17px}.a-scenario-list p{font-size:15px;color:#7a8395;margin:9px 0 16px}.a-scenario-list small{color:#2348c0;font-size:14px}.a-scene-detail h2{margin-top:16px}.a-scene-detail h3{margin-top:16px}.a-scene-detail>.a-row h3{margin:0}.a-condition{border:1px solid #e1e3e8;background:#f8fafc;border-radius:9px;padding:16px;font-size:16px;line-height:1.6;margin:12px 0 20px}.a-scene-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0 24px}.a-assign{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.a-scenario-targets{align-items:start}.a-scenario-targets fieldset:last-child{grid-column:1/-1}.a-target-scroll{max-height:150px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:3px}.a-scenario-targets label{min-width:0}.a-scenario-targets label>small{max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.a-scenario-filters{margin-bottom:10px}.a-assign fieldset{padding:14px;border:1px solid #e1e3e8;border-radius:9px;min-width:0}.a-assign legend{font-size:15px;font-weight:600;padding:0 4px}.a-assign label{display:flex;align-items:center;gap:8px;font-size:15px;padding:7px 0}.a-assign small{margin-left:auto;color:#7a8395}.a-assign input,.a-check input{accent-color:#2348c0}.a-room-scroll{max-height:190px;overflow:auto}.a-assignment-count{padding:15px;background:#eeedff;color:#2348c0;font-size:15px;border-radius:9px}.g-modal .a-assignment-count{margin-bottom:15px}.g-modal:has(#a-scene-form) h3{margin:20px 0 12px}.g-modal .form-grid{margin:15px 0}.a-check{display:flex;align-items:center;gap:10px;margin:16px 0;font-size:15px}.a-schedule-fields[hidden],.a-check[hidden]{display:none}.a-error{font-size:15px;color:#bb3232;margin:15px 0}.a-log{max-height:55vh;overflow:auto}.a-log article{display:grid;gap:6px;padding:14px 0;border-bottom:1px solid #e1e3e8}.a-log time{color:#8a92a2;font-size:13px}.a-result p{margin:10px 0 22px}.a-empty{padding:40px;text-align:center;color:#7a8395}.automation-page :focus-visible{outline:3px solid #90b4ff;outline-offset:2px}
@media(max-width:1100px){.a-device-row{grid-template-columns:minmax(0,1fr) 145px minmax(130px,.7fr);gap:12px;padding:11px 9px}.a-device-row .a-badge{padding:5px 8px}.a-scene-actions{grid-template-columns:1fr 1fr}.a-scenario-layout{grid-template-columns:minmax(230px,1fr) minmax(0,1.5fr)}}@media(max-width:760px){.a-device-layout,.a-scenario-layout{grid-template-columns:1fr}.a-detail{margin-top:0;position:static}.a-stats{grid-template-columns:1fr 1fr}.a-stats>.a-card{height:auto;min-height:78px;padding:10px 11px}.a-stats small{white-space:normal}.a-heading{align-items:flex-start}.a-filters input{flex-basis:100%}.a-scenario-list{grid-template-columns:1fr 1fr}.a-scenario-list .a-row{align-items:flex-start}.a-scenario-list .a-badge{font-size:13px}.a-card{padding:15px}}@media(max-width:460px){.a-assign,.a-scenario-list{grid-template-columns:1fr}.a-device-row{grid-template-columns:minmax(0,1fr) 125px minmax(90px,.75fr);gap:8px;font-size:13px}.a-device-row strong{font-size:15px}.a-device-row small{font-size:13px}.a-device-row .a-badge{font-size:12px;padding:4px 6px}.a-filters select{flex:1}.a-stats strong{font-size:26px}.a-detail .a-info>div{grid-template-columns:1fr 1fr}.a-channels>div{grid-template-columns:1fr 55px 55px}}


/* Automation Action Log: standalone diagnostics workspace. */
.a-log-filters{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin:0 0 14px;align-items:end}
.a-log-filter{display:grid;gap:6px;min-width:0;color:#7a8395;font-size:13px}
.a-log-filter select,.a-log-filter input{width:100%;min-width:0;min-height:40px;padding:9px 11px;border:1px solid #dee0ec;border-radius:9px;background:#fff;color:#26344f;font:14px/1.35 inherit}
.a-log-search{grid-column:span 2}
.a-log-reset{min-height:40px;align-self:end}
.a-log-shell{padding:0;overflow:hidden;display:flex;flex-direction:column;min-height:0}
.a-log-count{display:flex;align-items:center;gap:8px;padding:11px 15px;border-bottom:1px solid #eceef4;color:#7a8395;font-size:13px}
.a-log-count strong{font-size:18px;color:#1b2438}
.a-log-table-wrap{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.a-log-table{width:100%;min-width:1080px;border-collapse:collapse;font-size:14px}
.a-log-table th,.a-log-table td{padding:11px 12px;border-bottom:1px solid #eceef4;text-align:left;vertical-align:middle}
.a-log-table th{position:sticky;top:0;z-index:2;background:#f8faff;color:#6f7a90;font-size:13px;font-weight:600;white-space:nowrap}
.a-log-table tbody tr:hover td{background:#fbfcff}
.a-log-time{min-width:185px;white-space:nowrap}
.a-log-time strong{display:block;font-size:13px;font-weight:600;color:#27344d}
.a-log-time small{display:block;margin-top:4px;color:#7c6a18;font-size:11px;white-space:normal}
.a-log-device-link{padding:0;color:#0f47f1;font:600 14px/1.4 inherit;text-align:left;text-decoration:none}
.a-log-device-link:hover{text-decoration:underline}
.a-log-details{max-width:280px;overflow-wrap:anywhere;color:#536078}
.a-severity{display:inline-flex;align-items:center;justify-content:center;min-width:66px;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:500;white-space:nowrap}
.a-severity.info{background:#edf3ff;color:#315aa8}
.a-severity.warning{background:#fff6df;color:#9b6700}
.a-severity.error{background:#fff0f0;color:#a83232}

@media(min-width:901px){
 .automation-log-workspace{height:100dvh;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
 .figma-section .automation-log-workspace .dashboard-header{margin-bottom:0}
 .automation-log-workspace>.automation-page{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding-top:10px;padding-bottom:8px}
 .automation-log-workspace>.automation-page>.form-note{display:none}
 .automation-log-workspace>.dashboard-footer{padding:8px 18px;min-height:34px}
 .automation-log-workspace .a-heading{flex:0 0 auto;margin-bottom:10px}
 .automation-log-workspace .a-heading p{margin:4px 0 0}
 .automation-log-workspace .a-log-filters{flex:0 0 auto}
 .automation-log-workspace .a-log-shell{flex:1 1 auto;min-height:0}
 .automation-log-workspace .a-log-table-wrap{flex:1 1 auto;min-height:0}
}
@media(max-width:1200px){.a-log-filters{grid-template-columns:repeat(3,minmax(145px,1fr))}.a-log-search{grid-column:span 2}}
@media(max-width:900px){.a-log-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.a-log-table-wrap{max-height:62vh}.a-log-search{grid-column:span 2}}
@media(max-width:560px){.a-log-filters{grid-template-columns:1fr}.a-log-search{grid-column:auto}.a-log-table-wrap{max-height:58vh}.a-log-reset{width:100%}}


/* TASK 3 — unified Automation desktop workbench, aligned with Guests / Reservations / Rooms. */
@media(min-width:901px){
 .automation-workspace{
  height:100dvh;
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
 }
 .figma-section .automation-workspace .dashboard-header{margin-bottom:0}
 .automation-workspace>.automation-page{
  height:100%;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  padding-top:10px;
  padding-bottom:8px;
 }
 .automation-workspace>.automation-page>.form-note{display:none}
 .automation-workspace>.dashboard-footer{
  padding:8px 18px;
  min-height:34px;
 }
 .automation-workspace .a-heading{
  flex:0 0 auto;
  margin-bottom:10px;
 }
 .automation-workspace .a-heading p{
  margin:4px 0 0;
 }
 .automation-workspace .a-stats{
  flex:0 0 auto;
  margin-bottom:10px;
 }
 .automation-workspace .a-filters{
  flex:0 0 auto;
  gap:8px;
  margin:0 0 10px;
 }

 /* Shared master/detail proportion used by Guest Profile and Reservations. */
 .automation-workspace .a-device-layout,
 .automation-workspace .a-scenario-layout{
  grid-template-columns:minmax(0,1.7fr) minmax(310px,1fr);
  gap:14px;
  align-items:stretch;
  flex:1 1 auto;
  min-height:0;
  height:auto;
  overflow:hidden;
 }

 /* Left/master rails keep headers fixed and scroll only their working list. */
 .automation-workspace .a-device-layout>section:first-child,
 .automation-workspace .a-scenario-layout>section:first-child{
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
 }
 .automation-workspace .a-device-layout>section:first-child>h3,
 .automation-workspace .a-device-layout>section:first-child>.a-muted,
 .automation-workspace .a-scenario-layout>section:first-child>h3{
  flex:0 0 auto;
 }
 .automation-workspace .a-device-layout>section:first-child>.a-muted{
  margin:4px 0 8px;
 }
 .automation-workspace .a-device-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  align-content:start;
 }
 .automation-workspace .a-device-list .a-table-head{
  position:sticky;
  top:0;
  z-index:3;
  background:#fff;
 }
 .automation-workspace .a-scenario-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  margin-top:10px;
  padding-right:3px;
  align-content:start;
 }

 /* Shared right/detail rail: same visual width and independent scroll behavior. */
 .automation-workspace .a-detail,
 .automation-workspace .a-scene-detail{
  position:static;
  margin-top:0;
  min-height:0;
  height:100%;
  max-height:none;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
 }

 /* Action Log follows the same fixed viewport shell; its table owns the scroll. */
 .automation-workspace .a-log-filters{
  flex:0 0 auto;
  margin-bottom:10px;
 }
 .automation-workspace .a-log-shell{
  flex:1 1 auto;
  min-height:0;
 }
 .automation-workspace .a-log-table-wrap{
  flex:1 1 auto;
  min-height:0;
 }
}
@media(min-width:901px) and (max-width:1150px){
 .automation-workspace .a-device-layout,
 .automation-workspace .a-scenario-layout{
  grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);
  gap:12px;
 }
}
@media(max-width:900px){
 .a-device-layout,
 .a-scenario-layout{
  grid-template-columns:1fr;
 }
 .a-detail,
 .a-scene-detail{
  position:static;
  margin-top:0;
  max-height:none;
 }
}


/* Scenario editor refinement: aligned columns, compact target selectors and one full-screen edit surface. */
.a-scenario-master,
.a-scenario-detail-column{
  min-width:0;
}
.a-scenario-master>h3,
.a-scenario-detail-column>h3{
  margin:0 0 10px;
  min-height:24px;
  display:flex;
  align-items:center;
}
.a-scenario-detail-column{
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.a-scenario-detail-column>.a-scene-detail{
  flex:1 1 auto;
  min-height:0;
  height:auto!important;
  overflow:auto;
}
.a-scene-detail>.a-row:first-child h2{
  margin:0;
}
.a-scope-summary{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
  margin:12px 0 18px;
}
.a-scope-summary>div{
  min-width:0;
  padding:11px 10px;
  border:1px solid #e4e8f0;
  border-radius:9px;
  background:#f8faff;
}
.a-scope-summary span{
  display:block;
  color:#78849a;
  font-size:12px;
  line-height:1.25;
  margin-bottom:5px;
  overflow-wrap:anywhere;
}
.a-scope-summary strong{
  display:block;
  font-size:15px;
  line-height:1.2;
  color:#24324d;
  overflow-wrap:anywhere;
}

/* The scenario form uses the shared dialog, but becomes a near full-screen work surface. */
dialog:has(#a-scene-form){
  width:calc(100vw - 28px);
  max-width:1180px;
  height:calc(100dvh - 28px);
  max-height:none;
  margin:auto;
  border-radius:16px;
  overflow:hidden;
}
dialog:has(#a-scene-form) .dialog-inner{
  height:100%;
  min-height:0;
  padding:0;
  display:flex;
  flex-direction:column;
}
dialog:has(#a-scene-form) .dialog-head{
  flex:0 0 auto;
  margin:0;
  padding:16px 22px;
  border-bottom:1px solid #e8ecf3;
  background:#fff;
}
dialog:has(#a-scene-form) #dialog-body{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:18px 22px 0;
  background:#f9fbff;
}
dialog:has(#a-scene-form) .g-modal{
  min-height:100%;
}
.a-scenario-editor-form{
  width:min(1080px,100%);
  min-height:100%;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.a-scenario-editor-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(330px,.9fr);
  gap:14px;
}
.a-editor-section{
  border:1px solid #dee4ef;
  border-radius:12px;
  background:#fff;
  padding:16px;
  min-width:0;
}
.a-editor-section>h3,
.a-editor-section-head h3{
  margin:0 0 13px!important;
}
.a-editor-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.a-editor-section-head .a-muted{
  margin:3px 0 0;
}
.a-editor-targets{
  flex:1 1 auto;
}
.a-target-editor{
  display:grid;
  gap:12px;
}
.a-target-dropdowns{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
  align-items:start;
}
.a-multi-select{
  position:relative;
  min-width:0;
}
.a-multi-select>summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:42px;
  padding:9px 11px;
  border:1px solid #dce2ed;
  border-radius:9px;
  background:#fff;
  cursor:pointer;
  font-size:13px;
  color:#536078;
}
.a-multi-select>summary::-webkit-details-marker{display:none}
.a-multi-select>summary::after{
  content:"▾";
  margin-left:auto;
  color:#7e899c;
  font-size:11px;
}
.a-multi-select[open]>summary{
  border-color:#91aaf1;
  box-shadow:0 0 0 2px rgba(15,71,241,.07);
}
.a-multi-select>summary span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.a-multi-select>summary strong{
  flex:0 0 auto;
  font-size:12px;
  font-weight:600;
  color:#0f47f1;
  white-space:nowrap;
}
.a-multi-panel{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 5px);
  z-index:25;
  min-width:230px;
  max-height:310px;
  display:flex;
  flex-direction:column;
  padding:8px;
  border:1px solid #dce2ed;
  border-radius:10px;
  background:#fff;
  box-shadow:0 14px 34px rgba(28,47,91,.16);
}
.a-multi-all{
  flex:0 0 auto;
  width:100%;
  text-align:left;
  padding:8px 9px;
  margin-bottom:5px;
  border-radius:7px;
  color:#0f47f1;
  background:#f3f6ff;
  font-size:13px;
  font-weight:600;
}
.a-multi-all:hover{background:#e9efff}
.a-multi-options{
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.a-multi-options>label{
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  padding:7px 6px;
  border-radius:6px;
  cursor:pointer;
  font-size:13px;
}
.a-multi-options>label:hover{background:#f8faff}
.a-multi-options>label[hidden]{display:none}
.a-multi-options input{
  width:15px;
  height:15px;
  margin:0;
  accent-color:#0f47f1;
}
.a-multi-options span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.a-multi-options small{
  color:#8791a3;
  font-size:11px;
  white-space:nowrap;
}
.a-target-editor .a-assignment-count{
  margin:0;
  padding:11px 13px;
}
.a-scenario-editor-footer{
  position:sticky;
  bottom:0;
  z-index:10;
  margin-top:auto;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:13px 0 16px;
  background:linear-gradient(to bottom,rgba(249,251,255,0),#f9fbff 22%);
}
.a-scenario-editor-footer>*{
  min-width:130px;
}

/* Obsolete always-open target grids are no longer used in the scenario detail panel. */
#a-scene-form .a-assign,
.a-scene-detail form#a-assignment{
  display:none;
}

@media(max-width:1100px){
  .a-scope-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .a-target-dropdowns{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  dialog:has(#a-scene-form){
    width:calc(100vw - 12px);
    height:calc(100dvh - 12px);
    border-radius:12px;
  }
  dialog:has(#a-scene-form) #dialog-body{padding:12px 12px 0}
  dialog:has(#a-scene-form) .dialog-head{padding:13px 14px}
  .a-scenario-editor-top{grid-template-columns:1fr}
  .a-target-dropdowns{grid-template-columns:1fr 1fr}
  .a-scope-summary{grid-template-columns:1fr 1fr}
  .a-multi-panel{position:fixed;left:12px;right:12px;top:auto;bottom:14px;max-height:52dvh}
}
@media(max-width:520px){
  .a-target-dropdowns{grid-template-columns:1fr}
  .a-scope-summary{grid-template-columns:1fr 1fr}
  .a-scenario-editor-footer>*{min-width:0;flex:1}
}


/* Scenario target lists v2: persistent four-column editor and exact master/detail top alignment. */
.automation-workspace .a-scenario-master .a-scenario-list{
  margin-top:0;
}
.a-target-lists{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  min-height:clamp(300px,42vh,470px);
}
.a-target-list{
  min-width:0;
  min-height:0;
  margin:0;
  padding:0;
  border:1px solid #dfe5ef;
  border-radius:11px;
  background:#fff;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.a-target-list>legend{
  float:left;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:11px 12px 8px;
  font-size:14px;
  font-weight:600;
  color:#263650;
}
.a-target-list>legend+*{
  clear:both;
}
.a-target-list>legend button{
  flex:0 0 auto;
  padding:5px 8px;
  border-radius:7px;
  background:#f1f5ff;
  color:#0f47f1;
  font-size:12px;
  font-weight:600;
}
.a-target-list>legend button:hover{
  background:#e6edff;
}
.a-target-list-count{
  flex:0 0 auto;
  padding:0 12px 8px;
  color:#8691a4;
  font-size:11px;
  border-bottom:1px solid #eef1f6;
}
.a-target-list-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding:6px;
}
.a-target-list-scroll>label{
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto;
  gap:7px;
  align-items:center;
  min-width:0;
  padding:7px 6px;
  border-radius:7px;
  cursor:pointer;
  font-size:13px;
}
.a-target-list-scroll>label:hover{
  background:#f7f9ff;
}
.a-target-list-scroll>label[hidden]{
  display:none;
}
.a-target-list-scroll input{
  width:15px;
  height:15px;
  margin:0;
  accent-color:#0f47f1;
}
.a-target-list-scroll span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.a-target-list-scroll small{
  color:#8791a3;
  font-size:11px;
  white-space:nowrap;
}
.a-editor-targets{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.a-editor-targets .a-target-editor{
  flex:1 1 auto;
  min-height:0;
}
.a-editor-targets .a-assignment-count{
  margin-top:10px;
}

/* Hide the previous dropdown implementation; persistent lists are the only target UI. */
#a-scene-form .a-target-dropdowns,
#a-scene-form .a-multi-select{
  display:none!important;
}

@media(max-width:1100px){
  .a-target-lists{
    grid-template-columns:repeat(2,minmax(0,1fr));
    min-height:520px;
  }
}
@media(max-width:700px){
  .a-target-lists{
    grid-template-columns:1fr;
    min-height:0;
  }
  .a-target-list{
    min-height:230px;
  }
}


/* TASK 6 — operational Device Control panels. */
.a-control-layout{
  align-items:stretch;
}
.a-control-master{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.a-control-master>.a-device-list{
  flex:1 1 auto;
  min-height:0;
  margin:0;
}
.a-control-panel{
  min-width:0;
  min-height:0;
  height:100%;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding:16px;
}
.a-control-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:13px;
  border-bottom:1px solid #edf0f5;
}
.a-control-head>div{
  min-width:0;
}
.a-control-head>div>span{
  display:block;
  color:#7a8395;
  font-size:12px;
  margin-bottom:5px;
}
.a-control-head h2{
  margin:0 0 5px;
  font-size:21px;
  line-height:1.2;
  overflow-wrap:anywhere;
}
.a-control-head p{
  margin:0;
  color:#7a8395;
  font-size:13px;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.a-control-panel>.a-info{
  gap:10px;
  margin:14px 0 18px;
  padding:12px;
  border-radius:10px;
  background:#f8faff;
}
.a-control-panel>.a-info>div{
  padding-bottom:7px;
  border-bottom:1px solid #e9edf5;
}
.a-control-panel>.a-info>div:last-child{
  padding-bottom:0;
  border-bottom:0;
}
.a-control-section{
  margin-top:16px;
}
.a-control-section>h3{
  margin:0 0 10px;
  font-size:15px;
  color:#273650;
}
.a-control-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.a-control-switch{
  min-width:0;
  padding:10px;
  border:1px solid #e2e6ee;
  border-radius:10px;
  background:#fff;
}
.a-control-switch>div:first-child{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.a-control-switch span{
  color:#69758a;
  font-size:12px;
  line-height:1.3;
}
.a-control-switch strong{
  font-size:12px;
  color:#273650;
  white-space:nowrap;
}
.a-control-switch-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
}
.a-control-switch-actions button{
  min-height:30px;
  padding:6px;
  border:1px solid #dce2ed;
  border-radius:7px;
  background:#fff;
  color:#536078;
  font-size:11px;
}
.a-control-switch-actions button[aria-pressed=true]{
  border-color:#6f8bf1;
  background:#edf2ff;
  color:#244ac2;
}
.a-control-switch-actions button:disabled{
  opacity:.4;
  cursor:not-allowed;
}
.a-control-temperature{
  margin:10px 0 0;
}
.a-input-status{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.a-input-status>div{
  padding:10px;
  border:1px solid #e2e6ee;
  border-radius:9px;
  background:#f8faff;
}
.a-input-status span{
  display:block;
  color:#7a8395;
  font-size:12px;
  margin-bottom:5px;
}
.a-input-status strong{
  display:block;
  font-size:13px;
  font-weight:600;
  color:#273650;
}
.a-control-footer{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}
.a-control-footer>*{
  flex:1 1 120px;
}
.a-lock-control{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:8px;
}
.a-lock-main,
.a-lock-battery{
  padding:13px;
  border:1px solid #e2e6ee;
  border-radius:10px;
  background:#f8faff;
}
.a-lock-main span,
.a-lock-battery span{
  display:block;
  color:#7a8395;
  font-size:12px;
  margin-bottom:6px;
}
.a-lock-main strong,
.a-lock-battery strong{
  font-size:16px;
  color:#273650;
}
.a-control-note{
  margin:10px 0 0;
  padding:10px 12px;
  border-radius:9px;
  background:#f4f6f9;
  color:#69758a;
  font-size:13px;
  line-height:1.5;
}
.a-gateway-summary{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.a-gateway-summary>div{
  padding:11px;
  border:1px solid #e2e6ee;
  border-radius:9px;
  background:#f8faff;
}
.a-gateway-summary>div:last-child{
  grid-column:1/-1;
}
.a-gateway-summary span{
  display:block;
  color:#7a8395;
  font-size:12px;
  margin-bottom:5px;
}
.a-gateway-summary strong{
  font-size:14px;
  color:#273650;
}
.a-gateway-locks{
  display:grid;
  gap:6px;
  max-height:220px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.a-gateway-locks>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 9px;
  border:1px solid #e7eaf0;
  border-radius:9px;
}
.a-gateway-locks>div>span{
  min-width:0;
}
.a-gateway-locks strong,
.a-gateway-locks small{
  display:block;
}
.a-gateway-locks strong{
  font-size:12px;
  color:#273650;
}
.a-gateway-locks small{
  margin-top:3px;
  color:#7a8395;
  font-size:11px;
}
.a-gateway-locks .a-badge{
  flex:0 0 auto;
  font-size:11px;
  padding:4px 7px;
}
@media(min-width:901px){
  .automation-workspace .a-control-panel{
    height:100%;
  }
}
@media(max-width:1100px){
  .a-control-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:900px){
  .a-control-panel{
    height:auto;
    max-height:none;
  }
}
@media(max-width:520px){
  .a-input-status,
  .a-lock-control,
  .a-gateway-summary{
    grid-template-columns:1fr;
  }
  .a-gateway-summary>div:last-child{
    grid-column:auto;
  }
}


/* TASK 7 — Firmware & Configuration + Device Profiles. */
.a-ops-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 10px;
  padding:10px 12px;
  border:1px solid #e2e6ee;
  border-radius:10px;
  background:#fff;
}
.a-ops-actions>div:first-child{
  min-width:0;
}
.a-ops-actions>div:first-child strong{
  display:inline-block;
  margin-right:7px;
  font-size:18px;
  color:#25334e;
}
.a-ops-actions>div:first-child span{
  font-size:13px;
  color:#5e6a80;
}
.a-ops-actions>div:first-child small{
  display:block;
  margin-top:3px;
  color:#8a94a5;
  font-size:11px;
}
.a-ops-actions>div:last-child{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.a-ops-actions button:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.a-firmware-shell{
  min-height:0;
  padding:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.a-firmware-table-wrap{
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.a-firmware-table{
  width:100%;
  min-width:980px;
  border-collapse:collapse;
  font-size:13px;
}
.a-firmware-table th,
.a-firmware-table td{
  padding:11px 12px;
  border-bottom:1px solid #eceff4;
  text-align:left;
  vertical-align:middle;
}
.a-firmware-table th{
  position:sticky;
  top:0;
  z-index:3;
  background:#f8faff;
  color:#68758c;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}
.a-firmware-table tbody tr:hover td{
  background:#fbfcff;
}
.a-firmware-table td:first-child strong,
.a-firmware-table td:first-child small{
  display:block;
}
.a-firmware-table td:first-child small{
  margin-top:4px;
  color:#8590a3;
  font-size:11px;
}
.a-version-cell span{
  display:block;
  font-weight:600;
}
.a-version-cell small{
  display:block;
  margin-top:3px;
  color:#7c879a;
  font-size:11px;
}
.a-version-current{
  color:#25724d;
}
.a-version-old{
  color:#9b6700;
}
.a-update-chips{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}
.a-update-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  white-space:nowrap;
}
.a-update-chip.online{
  background:#e8f7ef;
  color:#157347;
}
.a-update-chip.warning{
  background:#fff5dd;
  color:#956200;
}
.a-update-chip.error{
  background:#fff0f0;
  color:#ab3434;
}

.a-profile-layout{
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(0,1.7fr);
  gap:14px;
  min-height:0;
  overflow:hidden;
}
.a-profile-master{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.a-profile-master>h3{
  flex:0 0 auto;
  margin:0 0 10px;
}
.a-profile-list{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  align-content:start;
  gap:9px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding-right:3px;
}
.a-profile-list>button{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  text-align:left;
  padding:13px;
}
.a-profile-list>button.selected{
  border-color:#5573ff;
  background:#edf2ff;
}
.a-profile-list>button>div{
  min-width:0;
}
.a-profile-list strong,
.a-profile-list small{
  display:block;
}
.a-profile-list strong{
  font-size:15px;
  color:#25334e;
  overflow-wrap:anywhere;
}
.a-profile-list small{
  margin-top:4px;
  color:#7e899d;
  font-size:11px;
}
.a-profile-list>button>span{
  flex:0 0 auto;
  font-size:12px;
  color:#3156b8;
}
.a-profile-detail{
  min-width:0;
  min-height:0;
  height:100%;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.a-profile-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:13px;
  border-bottom:1px solid #edf0f5;
}
.a-profile-head>div{
  min-width:0;
}
.a-profile-head>div>span{
  display:block;
  margin-bottom:5px;
  color:#7d889b;
  font-size:12px;
}
.a-profile-head h2{
  margin:0 0 5px;
  font-size:21px;
}
.a-profile-head p{
  margin:0;
  color:#52617b;
  font-size:13px;
}
.a-profile-types{
  margin:14px 0;
  padding:11px 12px;
  border-radius:9px;
  background:#f7f9fd;
}
.a-profile-types span,
.a-profile-types strong{
  display:block;
}
.a-profile-types span{
  margin-bottom:5px;
  color:#7d889b;
  font-size:12px;
}
.a-profile-types strong{
  color:#273650;
  font-size:13px;
  line-height:1.45;
}
.a-profile-detail>h3{
  margin:16px 0 9px;
  font-size:15px;
}
.a-profile-io{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.a-profile-io>div{
  min-width:0;
  padding:11px;
  border:1px solid #e3e7ef;
  border-radius:10px;
  background:#fff;
}
.a-profile-io>div>strong{
  display:block;
  margin-bottom:7px;
  color:#506078;
  font-size:12px;
}
.a-profile-io p{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0;
  padding:7px 0;
  border-bottom:1px solid #eef1f5;
}
.a-profile-io p:last-child{
  border-bottom:0;
}
.a-profile-io p span{
  color:#7b8799;
  font-size:12px;
}
.a-profile-io p b{
  color:#26364f;
  font-size:12px;
  font-weight:600;
  text-align:right;
}
.a-profile-logic{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.a-profile-logic>div{
  padding:10px;
  border:1px solid #e3e7ef;
  border-radius:9px;
  background:#f8faff;
}
.a-profile-logic span,
.a-profile-logic strong{
  display:block;
}
.a-profile-logic span{
  margin-bottom:5px;
  color:#7d889b;
  font-size:11px;
}
.a-profile-logic strong{
  color:#273650;
  font-size:13px;
}
.a-profile-target-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:16px;
  padding:12px;
  border-radius:10px;
  background:#f1f5ff;
}
.a-profile-target-summary>div:first-child{
  min-width:0;
}
.a-profile-target-summary span,
.a-profile-target-summary strong,
.a-profile-target-summary small{
  display:block;
}
.a-profile-target-summary span{
  color:#65728a;
  font-size:11px;
}
.a-profile-target-summary strong{
  margin-top:4px;
  color:#254bbd;
  font-size:15px;
}
.a-profile-target-summary small{
  margin-top:4px;
  color:#7b8798;
  font-size:11px;
  line-height:1.4;
}
.a-profile-target-summary>div:last-child{
  display:flex;
  gap:8px;
  flex:0 0 auto;
}
.a-profile-target-summary button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

dialog:has(#a-profile-form){
  width:calc(100vw - 42px);
  max-width:980px;
  max-height:calc(100dvh - 34px);
}
dialog:has(#a-profile-form) #dialog-body{
  max-height:calc(100dvh - 120px);
  overflow:auto;
}
.a-profile-form{
  display:grid;
  gap:14px;
}
.a-profile-types-editor{
  display:flex;
  flex-wrap:wrap;
  gap:7px 14px;
  padding:13px;
  border:1px solid #e1e5ed;
  border-radius:10px;
}
.a-profile-types-editor legend{
  padding:0 5px;
  font-size:13px;
  font-weight:600;
}
.a-profile-types-editor label{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:13px;
}
.a-profile-types-editor input{
  accent-color:#2348c0;
}
.a-profile-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.a-profile-form-grid>section,
.a-profile-form-logic{
  padding:13px;
  border:1px solid #e3e7ef;
  border-radius:10px;
  background:#fbfcff;
}
.a-profile-form-grid h3,
.a-profile-form-logic h3{
  margin:0 0 10px;
  font-size:14px;
}

@media(min-width:901px){
  .automation-firmware-workspace .a-firmware-shell{
    flex:1 1 auto;
    min-height:0;
  }
  .automation-firmware-workspace .a-firmware-table-wrap{
    flex:1 1 auto;
    min-height:0;
  }
  .automation-profiles-workspace .a-profile-layout{
    flex:1 1 auto;
    min-height:0;
  }
}
@media(max-width:1000px){
  .a-profile-layout{
    grid-template-columns:minmax(230px,.9fr) minmax(0,1.4fr);
  }
  .a-profile-logic{
    grid-template-columns:1fr;
  }
}
@media(max-width:760px){
  .a-ops-actions,
  .a-profile-target-summary{
    align-items:stretch;
    flex-direction:column;
  }
  .a-profile-layout{
    grid-template-columns:1fr;
    overflow:visible;
  }
  .a-profile-list{
    max-height:320px;
  }
  .a-profile-detail{
    height:auto;
    overflow:visible;
  }
  .a-profile-form-grid,
  .a-profile-io{
    grid-template-columns:1fr;
  }
}


/* TASK 7 refinement — standard master/detail rails for Firmware and Profiles. */
.a-firmware-layout,
.a-profile-layout{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(310px,1fr);
  gap:14px;
  align-items:stretch;
  min-height:0;
  overflow:hidden;
}
.a-firmware-master,
.a-firmware-detail-column,
.a-profile-master,
.a-profile-detail-column{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.a-firmware-master>h3,
.a-firmware-detail-column>h3,
.a-profile-master>h3,
.a-profile-detail-column>h3{
  flex:0 0 auto;
  min-height:24px;
  display:flex;
  align-items:center;
  margin:0 0 10px;
}
.a-firmware-master>.a-ops-device-list,
.a-profile-master>.a-profile-list{
  flex:1 1 auto;
  min-height:0;
}
.a-ops-device-list{
  margin:0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  align-content:start;
}
.a-ops-device-list .a-table-head{
  position:sticky;
  top:0;
  z-index:3;
  background:#fff;
}
.a-firmware-detail,
.a-profile-detail{
  flex:1 1 auto;
  min-height:0;
  height:auto!important;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.a-firmware-detail{
  padding:16px;
}
.a-firmware-detail-status{
  margin:13px 0 4px;
}
.a-firmware-detail-section{
  margin-top:14px;
  padding:12px;
  border:1px solid #e2e6ee;
  border-radius:10px;
  background:#fff;
}
.a-firmware-detail-section>h3{
  margin:0 0 10px;
  font-size:15px;
  color:#273650;
}
.a-firmware-version-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.a-firmware-version-grid>div{
  min-width:0;
  padding:10px;
  border-radius:8px;
  background:#f8faff;
}
.a-firmware-version-grid span,
.a-config-source span{
  display:block;
  color:#7b879a;
  font-size:11px;
  margin-bottom:5px;
}
.a-firmware-version-grid strong,
.a-config-source strong{
  display:block;
  color:#273650;
  font-size:13px;
  overflow-wrap:anywhere;
}
.a-config-source{
  margin-bottom:9px;
  padding:10px;
  border-radius:8px;
  background:#f3f6ff;
}
.a-config-source small{
  display:block;
  margin-top:4px;
  color:#7b879a;
  font-size:11px;
  line-height:1.35;
}
.a-full-action{
  width:100%;
  margin-top:9px;
}
.a-full-action:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.a-firmware-meta{
  margin:14px 0 0!important;
}
.a-profile-detail-column{
  min-width:0;
}
.a-profile-detail .a-profile-head>div>span{
  display:none;
}
.a-profile-detail .a-profile-io{
  grid-template-columns:1fr;
}
.a-profile-detail .a-profile-logic{
  grid-template-columns:1fr;
}
.a-profile-detail .a-profile-target-summary{
  align-items:stretch;
  flex-direction:column;
}
.a-profile-detail .a-profile-target-summary>div:last-child{
  width:100%;
}
.a-profile-detail .a-profile-target-summary>div:last-child>*{
  flex:1 1 0;
}
@media(min-width:901px){
  .automation-firmware-workspace .a-firmware-layout,
  .automation-profiles-workspace .a-profile-layout{
    flex:1 1 auto;
    min-height:0;
  }
}
@media(min-width:901px) and (max-width:1150px){
  .a-firmware-layout,
  .a-profile-layout{
    grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);
    gap:12px;
  }
}
@media(max-width:900px){
  .a-firmware-layout,
  .a-profile-layout{
    grid-template-columns:1fr;
    overflow:visible;
  }
  .a-firmware-master,
  .a-firmware-detail-column,
  .a-profile-master,
  .a-profile-detail-column{
    height:auto;
    overflow:visible;
  }
  .a-ops-device-list,
  .a-profile-list{
    max-height:360px;
  }
  .a-firmware-detail,
  .a-profile-detail{
    height:auto!important;
    overflow:visible;
  }
}
@media(max-width:520px){
  .a-firmware-version-grid{
    grid-template-columns:1fr;
  }
}
