/* Editor compacto de dispositivos e monitores — 0.6.27 */
.modal:has(.device-editor-form){padding:12px}
.modal:has(.device-editor-form) .modal-card{width:min(1540px,calc(100vw - 24px));height:calc(100vh - 24px);max-height:calc(100vh - 24px)}
.modal:has(.device-editor-form) .modal-card>header{min-height:66px;padding:12px 18px}
.modal:has(.device-editor-form) .modal-body{padding:12px 16px}
.modal:has(.device-editor-form) .modal-footer{min-height:62px;padding:10px 18px}
.device-editor-form{margin:-12px -16px}
.device-editor-shell{grid-template-columns:176px minmax(0,1fr);min-height:calc(100vh - 176px)}
.device-editor-tabs{padding:8px 0}
.device-editor-tabs button{min-height:42px;padding:0 14px;font-size:9px}
.device-editor-content{max-height:calc(100vh - 176px)}
.device-editor-panel{padding:15px 20px}
.device-editor-heading{margin-bottom:11px}
.device-editor-heading h3{font-size:15px}
.device-active-template{display:flex;align-items:center;gap:9px;margin-bottom:8px;padding:8px 11px;border:1px solid #cce5dc;border-radius:7px;background:#f0faf6;color:#287b66}
.device-active-template>svg{width:20px;height:20px}
.device-active-template>span{display:grid;gap:1px}.device-active-template small{font-size:6px;letter-spacing:.7px}.device-active-template b{color:#2f493f;font-size:9px}.device-active-template em{margin-left:auto;color:#7b8d86;font-size:7px;font-style:normal}
.device-active-monitor-toolbar{position:sticky;top:0;z-index:2;margin-bottom:6px;padding:7px 9px;border-radius:6px}
.device-active-monitor-toolbar .button{min-height:30px;padding:0 9px;font-size:8px}
.device-active-monitor-list{max-height:calc(100vh - 310px);overflow:auto;border-radius:6px}
.device-active-monitor-row{min-height:43px;grid-template-columns:21px 27px minmax(0,1fr) auto 27px;gap:7px;padding:4px 9px}
.device-active-monitor-select input{width:14px;height:14px}
.device-active-monitor-icon{width:26px;height:26px}.device-active-monitor-icon svg,.device-active-monitor-icon img{max-width:24px;max-height:24px}
.device-active-monitor-row>div{display:flex;align-items:center;gap:8px}.device-active-monitor-row>div>b{min-width:220px;font-size:9px}.device-active-monitor-row>div>small{flex:1;font-size:7px}.device-active-monitor-row>div>em{white-space:nowrap}
.device-active-monitor-row>.icon-button{width:25px;height:25px}
.template-monitor-list{max-height:calc(100vh - 365px)}
.template-monitor-row{min-height:43px!important;padding:5px 10px!important}
.template-monitor-icon{width:25px;height:25px;flex-basis:25px}.template-monitor-row b{font-size:9px}.template-monitor-row small{font-size:7px}
.template-picker-head{padding:8px 10px}.template-native-result{margin:7px 10px;padding:8px}
@media(max-width:850px){.device-editor-shell{grid-template-columns:1fr}.device-active-monitor-row>div{display:grid}.device-active-monitor-row>div>b{min-width:0}.device-active-template{align-items:flex-start;flex-wrap:wrap}.device-active-template em{width:100%;margin-left:29px}}

/* 0.6.28 — contenção dos cartões e lista compacta única para monitores */
.device-card-grid.compact{grid-template-columns:repeat(auto-fill,minmax(230px,280px));align-items:start}
.device-card.compact{width:100%;max-width:100%;min-width:0;overflow:hidden}
.device-card.compact>header,.device-card.compact .device-card-foot{min-width:0;max-width:100%;box-sizing:border-box}
.device-card.compact .device-card-title{flex:1 1 0;max-width:calc(100% - 18px)}
.device-card.compact .device-card-title>span,.device-card.compact .device-card-title b,.device-card.compact .device-card-title small{max-width:100%}
.device-card.compact .device-card-foot{gap:4px;padding-right:7px}
.device-card.compact .device-card-logo{width:38px;height:38px;flex:0 0 38px;overflow:hidden}
.device-card.compact .device-card-logo svg,.device-card.compact .device-card-logo img{max-width:36px;max-height:36px}
.device-card.compact .row-actions{min-width:0;max-width:calc(100% - 42px);flex:0 1 auto;justify-content:flex-end;overflow:hidden}
.device-card.compact .row-actions button,.device-card.compact .row-actions a{width:25px;height:25px;flex:0 0 25px}
.device-card-tooltip{display:none!important}

.monitor-compact-table{width:100%;table-layout:fixed}
.monitor-compact-table th,.monitor-compact-table td{height:42px;padding:4px 8px;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}
.monitor-compact-table th{height:32px;font-size:7.5px;white-space:nowrap}
.monitor-compact-table .name-cell{min-width:0;gap:7px}
.monitor-compact-table .name-cell>span:last-child{min-width:0;overflow:hidden}
.monitor-compact-table .name-cell b,.monitor-compact-table .name-cell small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.monitor-compact-table .device-icon{width:27px;height:27px;min-width:27px;border-radius:5px}
.monitor-compact-table .device-icon svg,.monitor-compact-table .device-icon img{max-width:22px;max-height:22px}
.monitor-compact-table .tag,.monitor-compact-table .badge{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.monitor-compact-table .value-main{font-size:9px}.monitor-compact-table .value-unit{font-size:7px}
.monitor-compact-table .monitor-error-inline{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.monitor-compact-table .row-actions{display:flex;justify-content:flex-end;gap:2px;min-width:0;overflow:hidden}
.monitor-compact-table .row-actions button,.monitor-compact-table .row-actions a{width:25px;height:25px;flex:0 0 25px}
.monitor-compact-table th:first-child,.monitor-compact-table td:first-child{width:31%}
.monitor-compact-table th:nth-last-child(1),.monitor-compact-table td:nth-last-child(1){width:142px}
.template-apply-rows,.template-monitor-list,.device-active-monitor-list{scrollbar-gutter:stable}
.template-apply-row{min-height:43px!important;padding:5px 9px!important;gap:7px!important}
.template-apply-row .template-monitor-icon{width:25px;height:25px;flex-basis:25px}
.template-apply-copy b{font-size:9px}.template-apply-copy small,.template-metric-chips{font-size:7px}

@media(max-width:900px){
  .monitor-compact-table{min-width:720px}
  .device-card-grid.compact{grid-template-columns:repeat(auto-fill,minmax(215px,1fr))}
}
