/* Device card: information on the left, preview on the right, actions below. */
.devices{grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr))}
.device{padding:20px}
.device-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.device-overview{display:grid;grid-template-columns:minmax(0,1fr) 116px;gap:16px;align-items:center;margin:16px 0}
.device-overview dl{display:grid;grid-template-columns:1fr;gap:2px;margin:0}
.device-overview dt{font-size:13px;color:var(--muted)}
.device-overview dd{margin:0 0 7px;text-align:left;font-weight:650;overflow-wrap:anywhere}
.device-preview{display:grid;place-items:center;min-height:92px;overflow:hidden;border:1px dashed #5d5748;border-radius:7px;background:linear-gradient(145deg,#202328,#121416);color:#d5d0c4;text-align:center;font-size:13px;line-height:1.35}
.device-preview-empty{padding:8px}.device-preview-image{display:none;width:100%;height:100%;min-height:92px;object-fit:cover}.device-preview.has-preview{border-style:solid}.device-preview.has-preview .device-preview-image{display:block}.device-preview.has-preview .device-preview-empty{display:none}
.device-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.device-actions button{min-width:0;padding:8px 7px;font-size:14px;line-height:1.25;overflow-wrap:anywhere}

/* Branded edit dialog and a short success acknowledgement. */
.troya-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:18px;background:rgba(2,4,6,.74);backdrop-filter:blur(3px)}
.troya-dialog{width:min(100%,460px);padding:24px;border:1px solid #514321;border-radius:14px;background:linear-gradient(145deg,#20242a,#13161a);box-shadow:0 24px 60px #000a}
.troya-dialog h2{margin:0 0 8px;color:#f3f0e9}.troya-dialog p{margin:0 0 18px}.troya-dialog form{gap:14px}.troya-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}.troya-dialog .dialog-actions button{min-width:112px}
.toast{position:fixed;right:22px;bottom:22px;z-index:1100;max-width:min(420px,calc(100vw - 44px));padding:12px 16px;border:1px solid #3f7748;border-radius:9px;background:#16251a;color:#b9efbd;box-shadow:0 12px 30px #0008;opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .2s,transform .2s}.toast.show{opacity:1;transform:translateY(0)}
.live-card{padding:12px;overflow:hidden}
.live-controls{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.live-controls label{min-width:220px;flex:1}
.live-controls select{width:100%;min-height:34px;color:#f4f3f0;background:#101215;border:1px solid #4a5058;border-radius:7px;font:inherit}
.live-video{display:block;width:100%;max-width:100%;max-height:min(72vh,760px);margin-top:8px;object-fit:contain;background:#060708;border-radius:10px;overflow:hidden;clip-path:inset(0 round 10px)}
@media(max-width:600px){.device-overview{grid-template-columns:minmax(0,1fr) 98px;gap:12px}.device-preview{min-height:82px}.device-actions{grid-template-columns:1fr}.troya-dialog{padding:20px}.troya-dialog .dialog-actions{flex-direction:column-reverse}.troya-dialog .dialog-actions button{width:100%}}
