/* Device workspace: one responsive card grid, shared by admin and operators. */
.content.devices-content{max-width:none;padding:28px;min-height:calc(100vh - 78px)}
.devices-content .page-heading{margin-bottom:20px}
.devices-content h1{font-size:28px}
.device-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.device-stats:not(:has(> :nth-child(4))){grid-template-columns:repeat(3,minmax(0,1fr))}
.device-stats .stat{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.device-stats .stat strong{font-size:28px;margin:0}
.device-stats .stat span{display:flex;align-items:center;gap:7px}
.device-stats i,.device-status i,.auto-refresh i{display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}
.stat-online strong,.stat-online i{color:#178054}
.stat-offline strong,.stat-offline i{color:#c34747}
.device-board{min-height:max(380px,calc(100vh - 340px));display:flex;flex-direction:column}
.device-board .toolbar{padding:18px 22px}
.device-board .search{width:min(100%,460px);max-width:460px}
.auto-refresh{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);margin:6px 0 0;line-height:1.3}
.auto-refresh i{width:5px;height:5px;color:#27876b}
.device-board-body{padding:20px;flex:1;background:#f9fbfa}
.device-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;align-items:start}
.device-card{--status:#c34747;--status-bg:#fff0f0;background:#fff;border:1px solid #e0e8e3;border-radius:12px;padding:12px;min-width:0;box-shadow:0 2px 5px #18393603;transition:box-shadow .15s,border-color .15s}
.device-card:hover{border-color:#aecbbd;box-shadow:0 5px 18px #1839360b}
.device-card.is-online{--status:#178054;--status-bg:#eaf6ee}
.device-card.is-archived{--status:#73867b;--status-bg:#edf1ef}
.view-tabs{display:flex;gap:5px;align-items:center}
.view-tabs button{border:0;background:transparent;border-radius:6px;padding:7px 11px;color:var(--muted);font:inherit;cursor:pointer}
.view-tabs .selected{background:#e8f2eb;color:#164a3b;font-weight:650}
.text.danger{color:#b34949}
.device-card-top{display:flex;align-items:center;justify-content:space-between;gap:5px}
.device-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:650;color:var(--status);background:var(--status-bg);border-radius:20px;padding:5px 8px}
.device-kind{font-size:10px;color:#91a097}
.device-monitor{width:44px;height:44px;margin:7px auto 4px;color:var(--status)}
.device-monitor svg{display:block;width:100%;height:100%}
.device-card h3{font-size:13px;line-height:1.4;margin:0 0 3px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.device-location{font-size:11px;color:var(--muted);text-align:center;margin:0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.device-id{padding:7px 0;border-top:1px solid #edf1ef;border-bottom:1px solid #edf1ef;display:flex;align-items:center;justify-content:space-between;gap:6px}
.device-id span,.device-owner span{font-size:10px;color:var(--muted)}
.device-id strong{font-family:Consolas,monospace;font-size:12px;letter-spacing:.2px;font-weight:600;overflow-wrap:anywhere}
.device-owner{margin:7px 0 0;display:flex;align-items:center;justify-content:space-between;gap:8px;line-height:1.4}
.device-owner strong{font-size:11px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.device-card-actions{margin-top:9px}
.device-card .device-connect{width:100%;padding:7px 10px;display:flex;justify-content:center;gap:12px;font-size:12px;border-radius:7px}
.device-secondary-actions{display:flex;justify-content:center;gap:8px;margin-top:2px}
.device-secondary-actions .text{font-size:11px;padding:5px 2px;font-weight:500}
.device-last-seen{font-size:9px;color:#90a096;text-align:center;line-height:1.4;margin:1px 0 0;min-height:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.device-board .empty{padding-top:75px}
.device-board .empty-symbol svg{width:44px;height:44px}
.device-board .table-footer{margin-top:auto;background:white}
.devices-content .footnote{margin:13px 0 0;font-size:11px}
@media(min-width:1800px){.device-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:1199px){.device-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.content.devices-content{padding:24px}.device-stats .stat{padding:14px 12px}}
@media(max-width:850px){.device-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.device-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.device-stats .stat strong{font-size:24px}.device-board .toolbar{flex-wrap:wrap}.device-board .search{width:100%;max-width:none}}
@media(max-width:730px){.content.devices-content{padding:22px 16px}.device-board-body{padding:14px}.device-grid{gap:12px}.device-board .table-footer{gap:12px;flex-wrap:wrap}.devices-content h1{font-size:24px}}
@media(max-width:420px){.device-grid{grid-template-columns:1fr}.device-stats:not(:has(> :nth-child(4))){grid-template-columns:1fr}.device-card{padding:18px}.device-monitor{margin-top:10px}.device-card h3{font-size:16px}.device-card-actions{display:flex;align-items:center;gap:16px}.device-card .device-connect{width:auto;flex:1}.device-secondary-actions{margin:0}.device-kind{font-size:11px}}
