/* Shared look for the portal pages. Every page that has the new look marks its page
   container with .operational-view (Oversikt and Oppdrag while mounted, Systemstatus and
   Min konto in index.html); page-specific rules live in organization-dashboard.css and
   organization-operations.css.

   Every selector here starts with .operational-view:not(#_). The :not(#_) matches every
   element (nothing has id="_") but adds the specificity of an ID, so these rules keep the
   weight (1,1,0) they had when they were bound to #organization-overview-page. Without it,
   ID and body[data-theme] rules in style.css would silently win. A test enforces the pattern. */

/* Keyboard focus and in-page scrolling never end up hidden under the sticky top bar. */
html:has(.operational-view:not(#_):not([hidden])){scroll-padding-top:108px}

/* Layout rhythm: one gap between all top-level sections. */
.operational-view:not(#_){display:flex;flex-direction:column;gap:24px;padding-bottom:48px}
/* Direct children lose their margins, except modal dialogs, which centre with margin:auto. */
.operational-view:not(#_)>:not(dialog){margin:0}

/* Header: title on the left, live status and actions grouped on the right. */
.operational-view:not(#_) .operational-hero{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px 24px;min-height:0;padding:28px 0 20px;border-bottom:1px solid var(--line)}
.operational-view:not(#_) .operational-hero>div:first-child{flex:1 1 320px;min-width:0}
.operational-view:not(#_) .operational-hero .eyebrow{margin:0 0 8px}
.operational-view:not(#_) .operational-hero h1{margin:0;font-family:Sora,Arial,sans-serif;font-size:clamp(24px,2.4vw,32px);font-weight:600;line-height:1.2;letter-spacing:-.02em;text-transform:none}
.operational-view:not(#_) .operational-hero-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:12px 16px}
.operational-view:not(#_) .operational-status{display:inline-flex;align-items:center;gap:8px;margin:0;color:var(--muted);font-size:13px;line-height:1.4;font-variant-numeric:tabular-nums}
.operational-view:not(#_) .operational-refresh{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:auto;min-height:40px;padding:8px 16px;font-size:14px}
.operational-view:not(#_) .operational-refresh::before{content:"";width:16px;height:16px;flex:0 0 16px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-2.6-6.4L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-2.6-6.4L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3C/svg%3E") center/contain no-repeat}

/* Typography: eyebrow (small caps label) > panel title > group title > supporting text. */
.operational-view:not(#_) .eyebrow{font-size:11px;font-weight:700;letter-spacing:.12em}
.operational-view:not(#_) .panel{min-height:0;margin:0;padding:20px 24px 24px}
.operational-view:not(#_) .panel-head .eyebrow{margin:0 0 6px}
.operational-view:not(#_) .panel h2{font-size:18px;font-weight:600;line-height:1.3;letter-spacing:-.01em;text-transform:none}
.operational-view:not(#_) .operational-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:3px 9px;font-size:12px;font-weight:600;text-align:center;font-variant-numeric:tabular-nums}

/* KPI cards: icon + muted label, large value, tone stripe (overview and operation detail). */
.operational-view:not(#_) .operational-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;border:0;background:none}
.operational-view:not(#_) .operational-kpi{--kpi-accent:var(--tertiary);--kpi-ink:var(--muted);--kpi-soft:color-mix(in srgb,var(--ink) 7%,transparent);position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"icon label" "value value";align-items:center;gap:14px 10px;min-height:0;padding:18px 20px 20px;border:1px solid var(--line);background:var(--panel);overflow:hidden}
.operational-view:not(#_) .operational-kpi::before{content:"";position:absolute;top:0;bottom:0;left:0;width:3px;background:var(--kpi-accent)}
.operational-view:not(#_) .operational-kpi.is-total{--kpi-accent:var(--muted);--kpi-ink:var(--ink)}
.operational-view:not(#_) .operational-kpi.is-online{--kpi-accent:var(--success);--kpi-ink:var(--success-ink);--kpi-soft:var(--success-soft)}
.operational-view:not(#_) .operational-kpi.is-mapped{--kpi-accent:var(--primary);--kpi-ink:var(--link);--kpi-soft:var(--primary-soft)}
.operational-view:not(#_) .operational-kpi-icon{grid-area:icon;display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:var(--kpi-soft);color:var(--kpi-ink)}
.operational-view:not(#_) .operational-kpi-label{grid-area:label;color:var(--muted);font-size:13px;font-weight:500;letter-spacing:0;line-height:1.3;text-transform:none}
.operational-view:not(#_) .operational-kpi-value{grid-area:value;margin:0;color:var(--ink);font-family:Sora,Arial,sans-serif;font-size:34px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums}
.operational-view:not(#_) .operational-kpi.is-warning{--kpi-accent:var(--warning);--kpi-ink:var(--warning-ink);--kpi-soft:var(--warning-soft)}
.operational-view:not(#_) .operational-kpi.is-critical{--kpi-accent:var(--error);--kpi-ink:var(--error-ink);--kpi-soft:var(--error-soft)}
@media(max-width:1000px){
 .operational-view:not(#_) .operational-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
 .operational-view:not(#_) .operational-kpi{gap:10px 8px;padding:14px 14px 16px}
 .operational-view:not(#_) .operational-kpi-value{font-size:28px}
}

/* Live status dot: neutral while loading, green when fresh, red only on real failures. */
.operational-view:not(#_) .operational-status::before{content:"";flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:var(--tertiary)}
.operational-view:not(#_) .operational-status[data-state="ok"]::before{background:var(--success)}
.operational-view:not(#_) .operational-status[data-state="error"]{color:var(--error-ink)}
.operational-view:not(#_) .operational-status[data-state="error"]::before{background:var(--error)}

/* Status pills: offline is a normal resting state, so it is neutral (hollow dot);
   online is green (filled dot). The text label always carries the meaning. */
.operational-view:not(#_) .pill.online,.operational-view:not(#_) .pill.offline{display:inline-flex;align-items:center;gap:6px;font-weight:600}
.operational-view:not(#_) .pill.online::before,.operational-view:not(#_) .pill.offline::before{content:"";flex:0 0 7px;width:7px;height:7px;border-radius:50%;box-sizing:border-box}
.operational-view:not(#_) .pill.online::before{background:currentColor}
.operational-view:not(#_) .pill.offline{border-color:var(--line);background:transparent;color:var(--muted)}
.operational-view:not(#_) .pill.offline::before{border:1.5px solid currentColor}

/* Card surfaces shared by fleet cards and operation cards. */
.operational-view:not(#_) :is(.dashboard-resource-row .device,.operation-row .operation-card){border:1px solid var(--line);background:var(--panel2);color:var(--ink)}
.operational-view:not(#_) :is(.dashboard-resource-row .device,.operation-row .operation-card):hover{border-color:color-mix(in srgb,var(--primary) 55%,var(--line));background:color-mix(in srgb,var(--panel2) 92%,var(--primary) 8%);color:var(--ink)}
.operational-view:not(#_) :is(.dashboard-resource-row .device,.operation-row .operation-card).active{border-color:var(--primary);background:var(--primary-soft);color:var(--ink);box-shadow:inset 3px 0 0 var(--primary)}

/* Smaller screens. */
@media(max-width:850px){
 .operational-view:not(#_) .operational-hero{flex-direction:column;align-items:stretch;gap:14px}
 .operational-view:not(#_) .operational-hero>div:first-child{flex:none}
 .operational-view:not(#_) .operational-hero-actions{justify-content:space-between}
}
@media(max-width:700px){
 .operational-view:not(#_){gap:16px}
 .operational-view:not(#_) .operational-hero{padding:20px 0 16px}
 .operational-view:not(#_) .panel{padding:16px}
}
@media(max-width:420px){
 .operational-view:not(#_) .operational-hero-actions{flex-direction:column;align-items:stretch}
 .operational-view:not(#_) .operational-hero-actions>button{width:100%}
}

/* Wide screens (>=1280px): fill the window up to --page-max (portal-shell.css). The top bar gets the same
   side margin, so header and content line up and nothing jumps between pages. */
@media(min-width:1280px){
 .operational-view:not(#_){width:min(var(--page-max),calc(100% - 2*var(--page-gutter)));margin-bottom:0;padding-bottom:24px}
 .app-view:has(>.operational-view:not(#_):not([hidden])) .topbar{padding-inline:var(--page-inline)}
}

/* Form controls: one dark/light-aware style with a clear focus ring, no native white widgets.
   :where(:not(.gm-style *)) keeps Google Maps' own controls out of it without adding weight. */
.operational-view:not(#_) :is(select,textarea,input:is([type="text"],[type="search"],[type="number"],[type="password"],[type="email"],[type="tel"],[type="url"],[type="date"],[type="time"],[type="datetime-local"],:not([type]))):where(:not(.gm-style *)){min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background-color:var(--panel2);color:var(--ink);font:inherit;font-size:14px;line-height:1.3}
.operational-view:not(#_) select:where(:not(.gm-style *)){appearance:none;-webkit-appearance:none;padding-right:36px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a9099' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px;cursor:pointer}
.operational-view:not(#_) select:where(:not(.gm-style *)) option{background:var(--panel);color:var(--ink)}
.operational-view:not(#_) :is(select,input):where(:not(.gm-style *)):hover:not(:disabled){border-color:color-mix(in srgb,var(--primary) 45%,var(--line))}
.operational-view:not(#_) :is(select,input,button,summary,a):where(:not(.gm-style *)):focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.operational-view:not(#_) input[type="checkbox"]:where(:not(.gm-style *)){appearance:none;-webkit-appearance:none;display:inline-grid;place-items:center;flex:0 0 18px;width:18px;height:18px;min-height:0;margin:0;padding:0;border:1.5px solid var(--muted);border-radius:4px;background:var(--panel2);cursor:pointer}
.operational-view:not(#_) input[type="checkbox"]:where(:not(.gm-style *)):checked{border-color:var(--primary);background:var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat}
.operational-view:not(#_) :is(select,input):where(:not(.gm-style *)):disabled{border-style:dashed;color:var(--muted);opacity:1;cursor:not-allowed}
/* Disabled buttons stay readable (muted text, not the 38% tertiary) but clearly inactive. */
.operational-view:not(#_) button:where(:not(.gm-style *)):disabled{border-color:var(--line);border-style:dashed;background:transparent;color:var(--muted);opacity:1;cursor:not-allowed;box-shadow:none}

/* Multi-line text: same frame as the other fields, sized like the operation editor's notes. */
.operational-view:not(#_) textarea:where(:not(.gm-style *)){min-height:96px;line-height:1.45;resize:vertical}

/* Status badge: four tones on the .pill shape. The text always carries the meaning and the
   dot repeats it; red (error) is only for real faults, resting states are neutral. */
.operational-view:not(#_) .status-badge{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-weight:600}
.operational-view:not(#_) .status-badge::before{content:"";flex:0 0 7px;width:7px;height:7px;border-radius:50%;box-sizing:border-box;background:currentColor}
.operational-view:not(#_) .status-badge[data-tone="success"]{border-color:var(--success-border);background:var(--success-soft);color:var(--success-ink)}
.operational-view:not(#_) .status-badge[data-tone="neutral"]{border-color:var(--line);background:transparent;color:var(--muted)}
.operational-view:not(#_) .status-badge[data-tone="neutral"]::before{background:none;border:1.5px solid currentColor}
.operational-view:not(#_) .status-badge[data-tone="warning"]{border-color:var(--warning-border);background:var(--warning-soft);color:var(--warning-ink)}
.operational-view:not(#_) .status-badge[data-tone="error"]{border-color:var(--error-border);background:var(--error-soft);color:var(--error-ink)}

/* Empty and error states in a list or section: the same dashed box as Oppdrag's empty lists. */
.operational-view:not(#_) .view-state{display:grid;place-items:center;gap:8px;margin:0;padding:20px 16px;border:1px dashed var(--line);border-radius:10px;background:transparent;color:var(--muted);font-size:13px;line-height:1.45;text-align:center}
.operational-view:not(#_) .view-state[data-state="error"]{color:var(--ink)}

/* File picker: the same frame as the other fields, with the picker button as a secondary button. */
.operational-view:not(#_) input[type="file"]:where(:not(.gm-style *)){width:100%;min-height:40px;padding:5px 12px 5px 5px;border:1px dashed var(--line);border-radius:8px;background:var(--panel2);color:var(--muted);font:inherit;font-size:14px;cursor:pointer}
.operational-view:not(#_) input[type="file"]:where(:not(.gm-style *))::file-selector-button{min-height:30px;margin:0 12px 0 0;padding:4px 14px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--ink);font-family:Sora,Arial,sans-serif;font-size:13px;font-weight:600;cursor:pointer}
.operational-view:not(#_) input[type="file"]:where(:not(.gm-style *)):hover::file-selector-button{border-color:var(--primary);background:var(--primary-soft)}
.operational-view:not(#_) input[type="file"]:where(:not(.gm-style *)):focus-visible{outline:2px solid var(--primary);outline-offset:2px}

/* Section card: a titled block of content, the same card as the sections in Oppdrag's detail view.
   As a <fieldset> its <legend> is the card title, inside the card rather than on its border. */
.operational-view:not(#_) .section-card{min-width:0;margin:0;padding:16px 20px 20px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--ink)}
.operational-view:not(#_) :is(.section-card>legend,.section-card-title){margin:0 0 14px;padding:0;color:var(--ink);font-family:Sora,Arial,sans-serif;font-size:16px;font-weight:600;line-height:1.3;letter-spacing:-.01em;text-transform:none}
.operational-view:not(#_) .section-card>legend{float:left;width:100%}
.operational-view:not(#_) .section-card .panel-head .section-card-title{margin:0}
.operational-view:not(#_) .section-card .panel-head{align-items:flex-start;margin:0 0 12px}
.operational-view:not(#_) .section-card>.panel-head:not(:first-child){margin-top:20px}
/* Fields in a card sit on the page panel colour, so they stand out from the card around them. */
.operational-view:not(#_) .section-card :is(select,textarea,input:not([type="checkbox"],[type="radio"])):where(:not(.gm-style *)){background-color:var(--panel)}
.operational-view:not(#_) .section-card>legend+*{clear:both}
.operational-view:not(#_) .section-card>p{margin:0 0 8px;color:var(--muted);font-size:14px;line-height:1.5}
.operational-view:not(#_) .section-card>p+.form-grid{margin-top:12px}
/* A card that summarises the page's subject (for example the operation a draft belongs to). */
.operational-view:not(#_) .section-card.is-context{border-left:3px solid var(--primary)}

/* Form grid: labelled fields in two columns, one column when the card is narrow (<520px).
   .form-full spans both columns. Labels sit above their field, like Min konto. */
.operational-view:not(#_) :is(.section-card,.panel):has(>.form-grid){container-type:inline-size}
.operational-view:not(#_) .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;align-items:start}
.operational-view:not(#_) .form-grid>.form-full{grid-column:1/-1}
.operational-view:not(#_) .form-grid label{display:grid;gap:6px;min-width:0;margin:0;color:var(--ink);font-size:13px;font-weight:600;line-height:1.35}
/* A field whose label has company (an info tip): the label and the tip on one line, the field below. */
.operational-view:not(#_) .form-grid .form-field{display:grid;gap:6px;min-width:0}
.operational-view:not(#_) .form-grid :is(input:not([type="checkbox"],[type="radio"]),select,textarea):where(:not(.gm-style *)){width:100%;margin:0}
/* A checkbox label: the box first, then its text on the same line. */
.operational-view:not(#_) .form-grid label:has(>input[type="checkbox"]){display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:10px}
/* Help text between fields, and a fieldset that groups fields without a frame of its own. */
.operational-view:not(#_) .form-grid>p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.operational-view:not(#_) .form-grid>fieldset{display:grid;gap:8px;min-width:0;margin:0;padding:0;border:0}
.operational-view:not(#_) .form-grid>fieldset>legend{margin:0 0 8px;padding:0;color:var(--ink);font-size:13px;font-weight:600}
.operational-view:not(#_) .form-grid>fieldset>p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
@container (max-width:519.98px){
 .operational-view:not(#_) .form-grid{grid-template-columns:minmax(0,1fr)}
}
/* A row of buttons in a card or under a form: wraps, aligned to the end, primary action last. */
.operational-view:not(#_) .form-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px 10px;margin:0}
.operational-view:not(#_) .form-actions.is-start{justify-content:flex-start}
.operational-view:not(#_) .form-actions>button{min-height:40px;margin:0;padding:8px 18px;font-size:14px;font-weight:600}

/* Info tip: a small "i" next to a label; its text (aria-label) shows on hover and keyboard focus.
   Hidden tips take no room, so they never widen the page on small screens. */
.operational-view:not(#_) .info-tip{position:relative;display:inline-grid;place-items:center;flex:0 0 18px;width:18px;height:18px;border:1.5px solid currentColor;border-radius:50%;color:var(--muted);font-family:Sora,Arial,sans-serif;font-size:11px;font-weight:700;line-height:1;cursor:help}
.operational-view:not(#_) .info-tip:is(:hover,:focus){color:var(--primary)}
.operational-view:not(#_) .info-tip:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.operational-view:not(#_) .info-tip::after{content:attr(aria-label);position:absolute;z-index:20;top:calc(100% + 8px);left:50%;display:none;width:max-content;max-width:min(280px,calc(100vw - 32px));padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);box-shadow:var(--popover-shadow);font-family:Archivo,Arial,sans-serif;font-size:13px;font-weight:500;line-height:1.4;text-align:left;white-space:normal;transform:translateX(-50%)}
/* :focus (not only :focus-visible) so a tap on a touch screen opens the tip too. */
.operational-view:not(#_) .info-tip:is(:hover,:focus)::after{display:block}
.operational-view:not(#_) .label-with-tip{display:inline-flex;align-items:center;gap:6px}
/* On touch screens the tip answers to a 44px area around the 18px icon, without changing its look. */
@media(pointer:coarse){
 .operational-view:not(#_) .info-tip::before{content:"";position:absolute;inset:-13px;border-radius:50%}
}

/* Code block: monospace text the user copies (generated messages, identifiers, logs). */
.operational-view:not(#_) .code-block{margin:0;padding:14px 16px;overflow:auto;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;tab-size:2}

/* Inline variant of the empty/error state: left-aligned, for a status sentence next to a form.
   As a list (.is-list), each child is one message with a dot; red dots for errors. */
.operational-view:not(#_) .view-state.is-inline{display:block;padding:10px 14px;text-align:left}
.operational-view:not(#_) .view-state.is-list{display:grid;gap:6px;place-items:stretch}
.operational-view:not(#_) .view-state.is-list>*{display:flex;align-items:baseline;gap:8px}
.operational-view:not(#_) .view-state.is-list>*::before{content:"";flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:var(--tertiary);transform:translateY(-1px)}
.operational-view:not(#_) .view-state.is-list[data-state="error"]>*::before{background:var(--error)}
.operational-view:not(#_) .view-state:empty{display:none}

/* Data table: a plain table from 768px; below that every row becomes a card and each cell
   is named by its data-label, so nothing scrolls sideways. Cell roles a page can set:
   .data-table-primary (card title, top left), .data-table-status (top right) and
   .data-table-actions (last, right-aligned). Long values wrap instead of widening the table. */
.operational-view:not(#_) .data-table-wrap{min-width:0}
.operational-view:not(#_) .data-table{width:100%;min-width:0;border-collapse:collapse;color:var(--ink);font-size:13px;line-height:1.4}
.operational-view:not(#_) .data-table th{padding:10px 12px;border-bottom:1px solid var(--line);color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.08em;line-height:1.3;text-align:left;text-transform:uppercase;white-space:nowrap}
.operational-view:not(#_) .data-table td{padding:14px 12px;border-bottom:1px solid var(--line);vertical-align:middle;white-space:normal;overflow-wrap:anywhere}
.operational-view:not(#_) .data-table td.data-table-actions{text-align:right;white-space:nowrap}
/* Text buttons in the action cell ("Rediger"): 40px, 44px on phones, side by side. */
.operational-view:not(#_) .data-table td.data-table-actions>button:not(.row-action){min-height:40px;margin:0;padding:8px 16px;font-size:13px;font-weight:600;white-space:nowrap}
.operational-view:not(#_) .data-table td.data-table-actions>button+button{margin-left:8px}
/* A row holding only an empty or error state (.view-state) shows just that box. */
.operational-view:not(#_) .data-table tr.data-table-empty td{padding:16px 0;border:0}
@media(max-width:767.98px){
 .operational-view:not(#_) :is(.data-table,.data-table tbody,.data-table tr,.data-table td){display:block;width:auto}
 .operational-view:not(#_) .data-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .operational-view:not(#_) .data-table tbody{display:grid;gap:8px}
 .operational-view:not(#_) .data-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)}
 .operational-view:not(#_) .data-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}
 .operational-view:not(#_) .data-table td::before{content:attr(data-label);color:var(--muted);font-size:12px;font-weight:600;line-height:1.4}
 .operational-view:not(#_) .data-table td>*{grid-column:2;min-width:0}
 .operational-view:not(#_) .data-table td:empty{display:none}
 .operational-view:not(#_) .data-table td:is(.data-table-primary,.data-table-status,.data-table-actions,:not([data-label])){display:block}
 .operational-view:not(#_) .data-table td:is(.data-table-primary,.data-table-status,.data-table-actions,:not([data-label]))::before{content:none}
 .operational-view:not(#_) .data-table td.data-table-primary{grid-column:1;grid-row:1;min-width:0}
 .operational-view:not(#_) .data-table td.data-table-status{grid-column:2;grid-row:1;justify-self:end}
 .operational-view:not(#_) .data-table td.data-table-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
 .operational-view:not(#_) .data-table td.data-table-actions:empty{display:none}
 .operational-view:not(#_) .data-table td.data-table-actions>button:not(.row-action){min-height:44px}
 .operational-view:not(#_) .data-table td.data-table-actions>button+button{margin-left:0}
 .operational-view:not(#_) .data-table tbody tr.data-table-empty{display:block;padding:0;border:0;background:none}
 .operational-view:not(#_) .data-table tbody tr.data-table-empty td{padding:0}
}

/* Filter bar: labelled search and select fields above a list. One column on phones, two
   from 600px (search across both), one row from 1024px with the search widest. */
.operational-view:not(#_) .filter-bar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:0}
.operational-view:not(#_) .filter-bar>label{display:grid;gap:6px;min-width:0;margin:0}
.operational-view:not(#_) .filter-bar>label>span{color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.08em;line-height:1.3;text-transform:uppercase}
.operational-view:not(#_) .filter-bar :is(input,select):where(:not(.gm-style *)){width:100%;margin:0}
@media(min-width:600px){
 .operational-view:not(#_) .filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}
 .operational-view:not(#_) .filter-bar>label:has(input[type="search"]):where(:not(.gm-style *)){grid-column:1/-1}
}
@media(min-width:1024px){
 .operational-view:not(#_) .filter-bar{grid-template-columns:minmax(0,3fr);grid-auto-columns:minmax(160px,1fr);grid-auto-flow:column}
 .operational-view:not(#_) .filter-bar>label:has(input[type="search"]):where(:not(.gm-style *)){grid-column:auto}
}

/* List row: one item per line with its value or badge at the end, divided by a rule. */
.operational-view:not(#_) .list-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin:0;padding:12px 0;border-top:1px solid var(--line);color:var(--ink);font-size:13px;line-height:1.4}
.operational-view:not(#_) .list-row code{font-size:12px;overflow-wrap:anywhere}
.operational-view:not(#_) .list-row>button{min-height:40px;margin:0;padding:6px 14px;font-size:13px;font-weight:600}
@media(max-width:767.98px){.operational-view:not(#_) .list-row>button{min-height:44px}}

/* Row action: an icon-only button in a table or list row, 40px (44px on phones). The page
   gives each one an aria-label and a title, which is shown as the tooltip. */
.operational-view:not(#_) .row-action{display:inline-grid;place-items:center;flex:none;width:40px;height:40px;min-height:0;padding:0;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--ink);font-size:16px;line-height:1;box-shadow:none}
.operational-view:not(#_) .row-action:hover:not(:disabled){border-color:color-mix(in srgb,var(--primary) 55%,var(--line));background:var(--primary-soft);color:var(--ink)}
@media(max-width:767.98px){.operational-view:not(#_) .row-action{width:44px;height:44px}}

/* Text kept for screen readers (and copy) but not shown. */
.operational-view:not(#_) .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

/* Overlays: every dialog and popover on the operational pages shares one frame. */
.operational-view:not(#_){--overlay-radius:14px;--overlay-shadow:0 24px 60px rgb(0 0 0 / .45);--popover-shadow:0 12px 32px rgb(0 0 0 / .32)}
.operational-view:not(#_) dialog:is(.admin-editor-dialog,.operation-photo-viewer){width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 48px);margin:auto;padding:24px;overflow:auto;border:1px solid var(--line);border-radius:var(--overlay-radius);background:var(--panel);color:var(--ink);box-shadow:var(--overlay-shadow)}
.operational-view:not(#_) dialog:is(.admin-editor-dialog,.operation-photo-viewer)::backdrop{background:rgb(4 8 14 / .62);backdrop-filter:blur(3px)}
.operational-view:not(#_) dialog.admin-editor-dialog>.panel{min-height:0;margin:0;padding:0;border:0;background:none}
.operational-view:not(#_) dialog .panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 6px}
.operational-view:not(#_) dialog h2{margin:0;color:var(--ink);font-family:Sora,Arial,sans-serif;font-size:18px;font-weight:600;line-height:1.3;text-transform:none}
.operational-view:not(#_) dialog .panel-head>button.ghost,.operational-view:not(#_) .operation-photo-viewer-close{min-height:34px;padding:6px 12px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--muted);font-size:13px;font-weight:600;box-shadow:none}
.operational-view:not(#_) dialog .panel-head>button.ghost:hover,.operational-view:not(#_) .operation-photo-viewer-close:hover{background:color-mix(in srgb,var(--ink) 8%,transparent);color:var(--ink)}
.operational-view:not(#_) dialog :is(label){color:var(--ink);font-size:13px;font-weight:600}
/* Footer: always visible at the bottom of the dialog, secondary actions left of the primary one. */
.operational-view:not(#_) dialog .dialog-actions{order:99;position:sticky;bottom:-24px;z-index:1;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;margin:20px -24px -24px;padding:14px 24px;border-top:1px solid var(--line);background:var(--panel)}
.operational-view:not(#_) dialog .dialog-actions button,.operational-view:not(#_) dialog .dialog-actions a{min-width:0;min-height:40px;padding:8px 18px;border-radius:999px;font-size:14px;font-weight:600}
.operational-view:not(#_) dialog .dialog-actions :is(.ghost,.secondary){border:1px solid var(--line);background:transparent;color:var(--ink)}
.operational-view:not(#_) dialog .dialog-actions :is(.ghost,.secondary):hover:not(:disabled){border-color:var(--primary);background:var(--primary-soft);color:var(--ink)}
.operational-view:not(#_) dialog .dialog-actions .danger-button{margin-right:auto;border:1px solid var(--error-border);background:var(--error-soft);color:var(--error-ink)}
.operational-view:not(#_) dialog .dialog-actions .danger-button:hover:not(:disabled){border-color:var(--error);background:var(--error);color:#fff}
.operational-view:not(#_) dialog .dialog-actions :is(.primary,[type="submit"]):not(.danger-button){order:10;border:1px solid var(--primary);background:var(--primary);color:#fff}
/* Popovers anchored to toolbar buttons. */
.operational-view:not(#_) :is(.operation-map-tool-panel,.operation-laser-panel){border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink);box-shadow:var(--popover-shadow)}
.operational-view:not(#_) :is(.operation-map-tool-panel,.operation-laser-panel)>strong:first-child{color:var(--muted);font-family:Sora,Arial,sans-serif;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
@media(max-width:600px){
 .operational-view:not(#_) dialog:is(.admin-editor-dialog,.operation-photo-viewer){width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px}
 .operational-view:not(#_) dialog .dialog-actions{bottom:-16px;margin:16px -16px -16px;padding:12px 16px}
}

/* ==== Sideoverskrift – design/login-og-layout (2026-10) ====
   Eyebrow, tittel, undertekst, status og knapper har samme mål på alle sider med .operational-hero
   (Oversikt, Oppdrag, NOTAM, Enheter). Beredskap følger de samme målene i beredskap.css. */
.operational-view:not(#_) .operational-hero h1+p{margin:8px 0 0;font-size:14px;line-height:1.45}
@media(max-width:767.98px){.operational-view:not(#_) .operational-hero-actions>button{min-height:44px}}

/* Systemstatus: API-versjonen fra /manage/api/v1/system/status, under underteksten. */
.operational-view:not(#_) .operational-hero .system-version{margin:4px 0 0;font-size:13px;line-height:1.45;font-variant-numeric:tabular-nums}
