/* Enheter page. Shared page chrome (full width, header, typography, status badges,
   data table, filter bar, dialogs) comes from operational-view.css; this file holds only
   what is specific to the fleet list, scoped to .devices-view. */

/* Header: "Godkjenning" sits after "Oppdater" and has the same size. The count badge is
   amber while devices wait for approval and red only when the list could not be fetched. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-trigger{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:auto;min-height:40px;padding:8px 16px;font-size:14px;white-space:nowrap}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-bell{display:inline-flex;align-items:center}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-bell svg{width:16px;height:16px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-trigger.has-pending .device-approval-bell{color:var(--warning-ink)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-trigger.has-error .device-approval-bell{color:var(--error-ink)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-badge{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--warning);color:#171717;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-trigger.has-error .device-approval-badge{border:1px solid var(--error-border);background:var(--error-soft);color:var(--error-ink)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-badge[hidden]{display:none}

/* Fleet table (shared .data-table): fixed column widths so the groups line up. A drone and
   its controller form a group; the controller row is indented under a connector line, and
   group borders separate aircraft. Selectors name .device-table td so they outweigh the
   shared cell rules. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-management-panel{display:grid;gap:16px}
/* While the list loads the panel is empty; the header status says "Henter oversikt …". */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-management-panel:empty{display:none}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table{table-layout:fixed}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(1){width:22%}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(2){width:9%}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(3){width:13%}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(4){width:21%}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(5){width:12%}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(6){width:9%}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(7){width:10%}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.device-row.is-parent td{border-top:1px solid var(--line)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.device-row.is-child td{background:color-mix(in srgb,var(--panel2) 50%,transparent)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.device-group-gap td{height:12px;padding:0;border:0}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.device-name-cell{position:relative;padding-left:52px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.is-child td.device-name-cell{padding-left:84px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-name{display:inline-block;min-height:0;margin:-11px 0;padding:11px 0;border:0;border-radius:0;background:none;color:var(--ink);font-family:Sora,Arial,sans-serif;font-size:14px;font-weight:600;line-height:1.35;text-align:left;overflow-wrap:anywhere;cursor:pointer}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-name:hover{background:none;text-decoration:underline}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-name-cell small{display:block;margin-top:4px;color:var(--muted);font-size:12px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-group-toggle{position:absolute;top:50%;left:6px;background:var(--panel2);transform:translateY(-50%)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-group-connector{position:absolute;top:0;bottom:50%;left:32px;width:24px;border-bottom:1px solid var(--line);border-left:1px solid var(--line);border-bottom-left-radius:8px;color:transparent;overflow:hidden}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-model{display:grid;justify-items:start;gap:3px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-serial-cell{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
/* Copy: no frame at rest, so the serial and not the button is what the column shows; the frame
   comes back on hover and focus. The hit area stays 40px (44px on phones). */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-serial-copy{margin-left:-8px;border-color:transparent;color:var(--muted);font-size:14px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-serial-number{min-width:0;color:var(--ink);font-size:12px;overflow-wrap:anywhere}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-seen{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);overflow-wrap:normal}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky{display:flex;align-items:center;gap:6px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-cell small{display:block;margin-top:4px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}

/* SafeSky switch: "På" is green and "Av" neutral, both with their mark and word visible.
   A missing name only warns (amber) while SafeSky is on. Without devices.update the
   switch stays disabled and reads as a plain indicator: no frame, no hover, no pointer. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:4px 12px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--muted);font-size:12px;font-weight:600;line-height:1.2;cursor:pointer}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-mark{font-size:14px;line-height:1}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon.is-enabled{border-color:var(--success-border);background:var(--success-soft);color:var(--success-ink)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon:not(:disabled):hover{border-color:color-mix(in srgb,var(--primary) 55%,var(--line))}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon:disabled{padding-right:0;padding-left:0;border-color:transparent;border-style:solid;background:transparent;cursor:default}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon.is-enabled:disabled{color:var(--success-ink)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon.is-disabled:disabled{color:var(--muted)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-identity.is-missing{color:var(--warning-ink);font-weight:600}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.data-table-status{white-space:nowrap}

/* Type under the model: a quiet second line in sentence case, not a tag, so the only marks
   in a row are its status and SafeSky. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-tag{display:block;padding:0;border:0;background:none;color:var(--muted);font-size:12px;line-height:1.35;white-space:nowrap}

/* Tablets (768-1023px): the same columns, tighter. */
@media(min-width:768px) and (max-width:1023.98px){
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table :is(th,td){padding-right:8px;padding-left:8px}
 /* The name column gets the most room, so names break between words. */
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(1){width:22%}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(2){width:9%}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(3){width:13%}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(4){width:21%}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(5){width:12%}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(6){width:9%}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(7){width:10%}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.device-name-cell{padding-left:44px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.is-child td.device-name-cell{padding-left:72px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-group-toggle{left:2px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-group-connector{left:24px}
}

/* Cards below 768px: the group's controller card is indented, groups get extra space,
   and the toggle sits left of the name. */
@media(max-width:767.98px){
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table{table-layout:auto}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.device-group-gap{display:none}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.device-row.is-parent td:not(.data-table-actions){border-top:0}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.device-row.is-child td{background:none}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.device-row.is-parent:not(:first-child){margin-top:8px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.device-row.is-child{margin-left:24px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.device-name-cell,:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.is-child td.device-name-cell{padding-left:0}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr:has(.device-group-toggle) td.device-name-cell{padding-left:56px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-group-toggle{top:0;left:0;transform:none}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-group-connector{display:none}
}

/* Device dialogs use the shared dialog frame, fields and footer from operational-view.css.
   Device details: label and value side by side, stacked on phones. */
/* "Lukk" in the dialog head: 40px like the other buttons here (the shared rule gives 34px). */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) dialog .panel-head>button.ghost{min-height:40px;padding:8px 14px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-dialog p[role="status"]{margin:0 0 16px;color:var(--muted);font-size:13px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-dialog .organization-operation-fields{display:grid;grid-template-columns:130px minmax(0,1fr);gap:10px 16px;margin:0}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-dialog .organization-operation-fields dt{color:var(--muted);font-size:13px;font-weight:600}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-dialog .organization-operation-fields dd{margin:0;color:var(--ink);font-size:14px;overflow-wrap:anywhere}

/* Edit form: sections with a small heading and rule, fields in the shared style. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-form{display:grid;gap:0}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-section{display:grid;gap:12px;padding:20px 0;border-top:1px solid var(--line)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-section h3{display:flex;align-items:center;gap:12px;margin:0;color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-section h3::after{content:"";flex:1;height:1px;background:var(--line)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-section>label{display:grid;gap:6px;margin:0}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-form .device-editor-help{margin:-6px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-form .device-editor-detected{margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-size:12px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-effective{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:8px;background:var(--primary-soft);color:var(--muted);font-size:12px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-effective strong{color:var(--link);overflow-wrap:anywhere}
/* "Vis i SafeSky" is a switch, not a tick box: the whole row is its label. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-section .device-editor-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-switch small{display:block;margin-top:4px;color:var(--muted);font-size:12px;font-weight:400}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-switch input[type="checkbox"]{position:relative;display:block;flex:0 0 44px;width:44px;height:24px;min-height:0;margin:0;padding:0;border:0;border-radius:999px;background:var(--muted);cursor:pointer}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-switch input[type="checkbox"]::before{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .15s}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-switch input[type="checkbox"]:checked{background:var(--primary)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-switch input[type="checkbox"]:checked::before{transform:translateX(20px)}

/* Approval dialog: request cards with a status badge, decisions as the shared buttons,
   handled requests and registered controllers in folding lists. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-dialog .device-approval-help{margin:0 0 16px;color:var(--muted);font-size:13px;line-height:1.5}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approvals-panel{display:grid;gap:12px;margin:0}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approvals-panel>p[role="status"]{margin:0;color:var(--muted);font-size:13px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approvals-panel>p[role="status"]:empty{display:none}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approvals-panel>.operational-refresh{justify-self:start}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-list{display:grid;gap:12px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card{display:grid;justify-items:start;gap:8px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card h3{margin:0;color:var(--ink);font-size:14px;font-weight:600;letter-spacing:0;text-transform:none;overflow-wrap:anywhere}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card p{margin:0;color:var(--muted);font-size:13px;overflow-wrap:anywhere}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card p.status-badge{font-size:12px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card-actions button{min-height:40px;padding:8px 18px;border-radius:999px;font-size:14px;font-weight:600}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card-actions .ghost{border:1px solid var(--line);background:transparent;color:var(--ink)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card-actions button[hidden]{display:none}
/* Two-step confirmation text under Godkjenn / Avvis. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card p.device-approval-confirm{margin:0;color:var(--ink)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-card p.device-approval-confirm:empty{display:none}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-dialog details{border-top:1px solid var(--line)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-dialog summary{display:flex;align-items:center;min-height:40px;color:var(--ink);font-size:13px;font-weight:600;cursor:pointer}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-dialog details .device-approval-card{margin-bottom:8px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-dialog summary::-webkit-details-marker{display:none}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-dialog summary::before{content:"";flex:none;width:7px;height:7px;margin:0 12px 0 2px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-dialog details[open]>summary::before{transform:rotate(45deg)}
@media(max-width:600px){
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-dialog .organization-operation-fields{grid-template-columns:minmax(0,1fr);gap:2px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-editor-dialog .organization-operation-fields dd{margin-bottom:10px}
}

/* Touch targets: at least 44px below 768px on Enheter, its dialogs included (40px above,
   like the rest of the portal). The name link keeps its text size and grows its hit area. */
@media(max-width:767.98px){
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) :is(button,select,input:not([type="checkbox"],[type="radio"])):not(.device-name){min-height:44px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-name{margin:-13px 0;padding:13px 0}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-approval-dialog summary{display:flex;align-items:center;min-height:44px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) dialog .panel-head>button.ghost{min-height:44px}
}

/* ==== Rediger-knapp – design/login-og-layout (2026-10) ====
   Samme blyant-ikon som på Oppdrag (mapToolIcon 'edit'); teksten «Rediger <navn>» er bare for skjermleser. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-row-edit{display:inline-grid;place-items:center;width:40px;height:40px;min-width:40px;padding:0;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--ink)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-row-edit:hover{border-color:var(--primary);background:var(--primary-soft)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-row-edit .operation-map-tool-icon{display:grid;place-items:center}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-row-edit .operation-map-tool-icon svg{display:block;width:18px;height:18px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-row-edit .operation-map-tool-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:767.98px){:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-row-edit{width:44px;height:44px;min-width:44px}}

/* ==== Enheter – design/enheter (2026-10) ==== */
/* A unit without a name: "Uten navn" in the muted ink, so it reads as missing, not as a name. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-name.is-unnamed{color:var(--muted)}
/* Drone and controller: the drone is the group's title (15px), its controller sits under it one
   size smaller, with "Kontroller for <drone>" below. The LN number has its own column. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.is-parent .device-name{font-size:15px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.is-child .device-name{font-size:13px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-name-cell small.device-registration{color:var(--ink);font-variant-numeric:tabular-nums;letter-spacing:.02em}
/* Under the filters: the count for the current view and "Nullstill filter" while a filter is on. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-filter-summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;min-height:40px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-filter-summary p{margin:0;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-filter-reset{min-height:40px;padding:6px 14px;font-size:13px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-filter-reset[hidden]{display:none}
/* Phones: Enhetstype and Status share one row under the search, so the first card starts higher,
   and Rediger sits in the card's lower right corner instead of a row of its own. */
@media(max-width:767.98px){
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .filter-bar>label:has(input[type="search"]){grid-column:1/-1}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.device-row{position:relative}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.device-row td.data-table-actions{position:absolute;right:16px;bottom:14px;padding:0;border:0}
 /* Sist sett is the last row on a card without SafeSky: 44px tall, so Rediger beside it never meets the copy button above. */
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.device-row td[data-label="Sist sett"]{min-height:44px}
}
/* Tablets: the drone name stays at 14px in the narrower name column. */
@media(min-width:768px) and (max-width:1023.98px){:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.is-parent .device-name{font-size:14px}}

/* The list is also mounted inside Administration. Keep the same compact controls there. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table th:nth-child(8){width:52px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.device-registration{white-space:nowrap;font-variant-numeric:tabular-nums;font-size:13px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table :is(th,td){padding-right:8px;padding-left:8px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon{min-height:44px;padding:0;gap:8px;border:0;border-radius:0;background:transparent;color:var(--ink);white-space:nowrap}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-mark{position:relative;display:block;flex:none;width:36px;height:20px;border-radius:999px;background:var(--muted)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-mark::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .15s}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon.is-enabled .device-safesky-mark{background:var(--primary)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon.is-enabled .device-safesky-mark::after{transform:translateX(16px)}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-safesky-status-icon.is-enabled{background:transparent;color:var(--ink)}

/* Use available list width, including the administration sidebar, for card layout. */
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view){container-type:inline-size;container-name:fleet}
@container fleet (max-width:850px){
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) :is(.device-table,.device-table tbody,.device-table tr,.device-table td){display:block;width:auto}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody{display:grid;gap:8px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td{display:grid;grid-column:1/-1;grid-template-columns:minmax(88px,32%) minmax(0,1fr);align-items:center;gap:12px;padding:0;border:0}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td::before{content:attr(data-label);color:var(--muted);font-size:12px;font-weight:600;line-height:1.4}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td>*{grid-column:2;min-width:0}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td:empty{display:none}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td:is(.data-table-primary,.data-table-status,.data-table-actions,:not([data-label])){display:block}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td:is(.data-table-primary,.data-table-status,.data-table-actions,:not([data-label]))::before{content:none}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.data-table-primary{grid-column:1;grid-row:1;min-width:0}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.data-table-status{grid-column:2;grid-row:1;justify-self:end}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.data-table-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.data-table-actions:empty{display:none}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.data-table-actions>button:not(.row-action){min-height:44px}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.data-table-actions>button+button{margin-left:0}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.data-table-empty{display:block;padding:0;border:0;background:none}
 :is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.data-table-empty td{padding:0}
}
@container fleet (max-width:850px){
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table td.device-name-cell,:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.is-child td.device-name-cell{padding-left:0}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr:has(.device-group-toggle) td.device-name-cell{padding-left:48px}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-group-toggle{top:0;left:0;transform:none}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-group-connector{display:none}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tbody tr.device-row td.data-table-actions{position:static;grid-column:1/-1;padding:0;border:0}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.device-row.is-parent td{border-top:0}
:is(#organization-overview-page.devices-view,#organization-overview-page .devices-view) .device-table tr.device-row.is-child td{background:none}
}
