:root {
  --primary-color: #00AA00;
  --secondary-color: #FF7F2B;
  --accent-color: #D40000;
  --text-on-dark: #ffffff;
  --text-strong: #1a1a1a;
  --text-body: #333333;
  --text-muted-strong: #444444;
  --border-muted: #e0e0e0;
  --border-soft: #f0f0f0;
  --bg: #f8f9fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.container {
  width: min(100% - 1.5rem, 1140px);
  margin-inline: auto;
}

/* Shared design-token utility classes for admin-managed HTML blocks */
.hm-color-primary { color: var(--primary-color) !important; }
.hm-color-secondary { color: var(--secondary-color) !important; }
.hm-color-accent { color: var(--accent-color) !important; }
.hm-color-on-dark { color: var(--text-on-dark) !important; }
.hm-color-strong { color: var(--text-strong) !important; }
.hm-color-body { color: var(--text-body) !important; }
.hm-color-muted-strong { color: var(--text-muted-strong) !important; }
.hm-company-name-dynamic { font-weight: 700; }

.hm-bg-surface { background: var(--surface) !important; }
.hm-border-muted { border-color: var(--border-muted) !important; }
.hm-border-soft { border-color: var(--border-soft) !important; }
.hm-spacing-bottom-large { margin-bottom: clamp(1.5rem, 3.5vw, 3.25rem) !important; }

/* Frontpage custom banner block (Boks 1) */
.hm-home-banner-content {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 920px;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hm-home-banner-eyebrow {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
}

.hm-home-banner-title {
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 0;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.hm-home-banner-spacer { height: 40px; }

/* Frontpage box under banner (Boks 2) */
.hm-home-types-section {
  padding: 50px 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 1100px;
}

.hm-home-types-header {
  margin-bottom: 45px;
  border-left: 5px solid var(--secondary-color);
  padding-left: 25px;
}

.hm-home-types-title {
  font-size: 2.2rem;
  margin: 0 0 12px;
  font-weight: 800;
}

.hm-home-types-intro {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 850px;
  margin: 0;
}

.hm-home-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.hm-home-types-card {
  background: var(--surface);
  border: 1px solid var(--border-muted);
  padding: 30px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hm-home-types-card-title {
  margin-top: 0;
  font-size: 1.4rem;
  border-bottom: 2px solid var(--border-soft);
  padding-bottom: 10px;
}

.hm-home-types-card-text {
  font-size: 1rem;
  line-height: 1.5;
}

.hm-home-types-card-link {
  display: inline-block;
  margin-top: 15px;
  text-decoration: none;
  font-weight: 700;
}

/* Fast oransje forsidesbanner (sekundærfarge, hvit tekst) – som referanseskjermbilde */
.hm-banner-solid-secondary {
  width: 100%;
  box-sizing: border-box;
  background: var(--secondary-color);
  color: #fff;
  padding: clamp(2.1rem, 5vw, 3.5rem) clamp(1.35rem, 4vw, 2.5rem);
  min-height: clamp(200px, 28vw, 300px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  border-radius: var(--radius);
}

.hm-banner-solid-secondary__eyebrow {
  margin: 0 0 0.85rem;
  font-size: clamp(0.88rem, 2.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.4;
}

.hm-banner-solid-secondary__title {
  margin: 0;
  font-size: clamp(1.5rem, 4.2vw, 2.35rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 22em;
}

.hero[data-home-banner].has-custom-banner-html .prosjekttype-banner-overlay {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.hero[data-home-banner].has-custom-banner-html .prosjekttype-banner-overlay .hm-banner-solid-secondary {
  flex: 1 1 auto;
}

/* Tekstblokk under banner: «Prosjekttyper» med oransje venstrekant */
.hm-prosjekttyper-intro-block {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 0.25rem;
  max-width: 1100px;
  margin-inline: auto;
}

.hm-prosjekttyper-intro-block__inner {
  border-left: 5px solid var(--secondary-color);
  padding-left: clamp(1.1rem, 3vw, 1.55rem);
}

.hm-prosjekttyper-intro-block h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.2;
}

.hm-prosjekttyper-intro-block p {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  line-height: 1.6;
  color: var(--text-body);
  max-width: 52rem;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 249, 251, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-height: 64px;
}

@media (max-width: 767px) {
  .header-row {
    flex-wrap: nowrap;
  }
}

/* Logo venstre; inviter-knapp + meny høyre (samme rad) */
.header-trailing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.hm-auth-nav-header {
  display: none;
  align-items: center;
  gap: 0.65rem;
  margin-right: 0.25rem;
}

.hm-auth-nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary-color, #0f172a);
  text-decoration: none;
  white-space: nowrap;
}

.hm-auth-nav-link:hover {
  text-decoration: underline;
}

.hm-auth-nav-menu-link {
  display: block;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  margin-top: 0.35rem;
}

@media (min-width: 720px) {
  .hm-auth-nav-header {
    display: inline-flex;
  }
}

@media (max-width: 719px) {
  .offcanvas-menu .hm-auth-nav-menu-link:first-of-type {
    margin-top: 0.75rem;
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--secondary-color);
}

.logo-image {
  width: auto;
  height: auto;
  max-height: 44px;
  max-width: min(58vw, 300px);
  object-fit: contain;
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.logo-image[src=""],
.logo-image:not([src]) {
  display: none;
}

.logo.has-logo-image {
  max-width: min(72vw, 360px);
  overflow: hidden;
  background: transparent;
}
.logo.has-logo-image [data-company-name] {
  display: none !important;
}


.menu-toggle,
.menu-close {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.offcanvas-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(82vw, 320px);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 0.22s ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
}

.offcanvas-menu a {
  text-decoration: none;
  padding: 0.8rem;
  border-radius: 10px;
}

.offcanvas-menu a:hover {
  background: #f3f4f6;
}

.offcanvas-menu.is-open {
  transform: translateX(0);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 25;
}

/* Lightbox (main.js): .hm-isolated-content og [data-lightbox-ignore] utelates fra auto-galleri; data-custom-group grupperer kun lenker med samme gruppenavn (aldri blandet med hovedgalleriet). */
/* Grouped lightbox for links using data-lightbox="group-name" */
.hm-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(2, 6, 23, 0.9);
}

.hm-gallery-shell {
  position: relative;
  width: min(96vw, 1360px);
  max-height: 92vh;
  display: grid;
  place-items: center;
}

.hm-gallery-stage {
  width: 100%;
  max-height: 92vh;
  display: grid;
  place-items: center;
}

.hm-gallery-image,
.hm-gallery-video {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  display: none;
}

.hm-gallery-pdf {
  width: min(96vw, 1200px);
  height: min(88vh, 900px);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  background: #fff;
  display: none;
}

.hm-gallery-close,
.hm-gallery-nav {
  position: absolute;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.hm-gallery-close {
  top: 0.5rem;
  right: 0.5rem;
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.hm-gallery-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.7rem;
  height: 2.7rem;
  font-size: 1.65rem;
  line-height: 1;
}

.hm-gallery-prev { left: 0.35rem; }
.hm-gallery-next { right: 0.35rem; }

.hm-gallery-counter {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.main-content {
  padding-block: 0 3rem;
  display: flex;
  flex-direction: column;
}

/* Partnerrollen alltid nederst i main, under alt annet innhold */
.partner-roll,
[data-partner-roll] {
  margin-top: auto;
  padding-top: 2.5rem;
}

.section-spaced {
  margin-top: 1.25rem;
}

/* Forside: to bokser nederst – 2/3 site survey, 1/3 kontakt, like høye */
.home-bottom-boxes {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 2rem;
}

.home-bottom-box {
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

/* Boks 1: mørk bakgrunn med utblåst bilde + tekst oppå */
.home-bottom-box--survey {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: none;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-bottom-box--survey::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--home-survey-bg-image, url("/uploads/site-media/see-the-root-cause-instantly_47739caad8a2.webp"));
  background-size: cover;
  background-position: center;
  filter: blur(5px);
  transform: scale(1.05);
  z-index: 0;
}

.home-bottom-box--survey::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.home-bottom-box--survey .home-bottom-box__content {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 850px;
  margin: 0 auto;
}

.home-bottom-box--survey .home-bottom-box__title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  line-height: 1.1;
  color: #ffffff;
}

.home-bottom-box--survey .home-bottom-box__text {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #cccccc;
}

.home-bottom-box--survey .hm-home-banner-cta {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

/* Innebygd site survey-skjema på forsiden: samme form-card / farger som /skjema */
.home-bottom-box--survey .home-survey-form-wrap {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.home-bottom-box--survey .home-survey-form.form-card {
  width: 100%;
  margin: 0;
}

.home-bottom-box--survey .home-survey-form .form-card-section-title {
  text-align: center;
}

/* Hvit knapp med grønn hover (forside survey-boks) */
.hm-btn-final {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #ffffff;
  color: #000000 !important;
  text-decoration: none;
  font-weight: 700;
  border-radius: 4px;
  border: 2px solid #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hm-btn-final:hover,
.hm-btn-final:focus-visible {
  background-color: var(--primary-color);
  color: #ffffff !important;
  border-color: var(--primary-color);
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.home-bottom-box__content {
  min-width: 0;
}

.home-bottom-box__title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--text-strong);
}

.home-bottom-box__text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.45;
}

.home-bottom-box__cta {
  display: inline-block;
}

@media (max-width: 768px) {
  .home-bottom-boxes {
    grid-template-columns: 1fr;
  }

  .home-bottom-box--survey .home-bottom-box__content {
    padding: 2rem 1.5rem;
  }
}

/* WiFi survey-troubleshooting: øverst kun CMS (heatmap / bilde 1) full bredde */
.home-bottom-boxes--wifi-survey-top {
  grid-template-columns: 1fr;
}

.home-bottom-box--survey-page .home-bottom-box__content--wifi-survey {
  text-align: left;
  max-width: none;
  margin: 0;
  width: 100%;
}

.home-bottom-box--survey-page .home-bottom-box__content--wifi-survey [data-box-two-html]:empty {
  min-height: 0;
}

/* Nederst: boks 3 + ev. CMS-bokser (1–4) først, deretter kontakt under (ikke side-om-side) */
.home-bottom-boxes--wifi-survey-cta {
  align-items: stretch;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Full bredde i kolonnen — unngår at align-self:center krymper boksen */
.home-bottom-boxes--wifi-survey-cta .survey-cta-box {
  align-self: stretch;
  min-height: 0;
  margin: 0;
}

.home-bottom-boxes--wifi-survey-cta .home-bottom-box--contact {
  min-width: 0;
  align-self: stretch;
  max-width: none;
  width: 100%;
}

@media (max-width: 768px) {
  .home-bottom-box--survey-page .home-bottom-box__content--wifi-survey {
    padding: 1.75rem 1.25rem;
  }
}

/* WiFi survey-troubleshooting: ingen tema-ramme/blur rundt limt CMS-innhold (box_two + boks 3) */
.home-bottom-boxes--wifi-survey-top .home-bottom-box--survey {
  position: static;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  display: block;
}

.home-bottom-boxes--wifi-survey-top .home-bottom-box--survey::before,
.home-bottom-boxes--wifi-survey-top .home-bottom-box--survey::after {
  display: none !important;
  content: none !important;
}

.home-bottom-boxes--wifi-survey-top .home-bottom-box--survey .home-bottom-box__content--wifi-survey {
  position: static;
  z-index: auto;
  padding: 0;
  max-width: none;
  margin: 0;
  text-align: inherit;
}

@media (max-width: 768px) {
  .home-bottom-boxes--wifi-survey-top .home-bottom-box--survey .home-bottom-box__content--wifi-survey {
    padding: 0;
  }
}

/* Nederste CTA: samme effektive bredde som øvrig innhold i .container */
.home-bottom-boxes--wifi-survey-cta .survey-cta-box {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #222;
  box-shadow: var(--shadow);
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/uploads/site-media/wifisurevy-bestilling_bbdfdee3aa7c.png");
  background-size: cover;
  background-position: center;
  filter: blur(6px);
  transform: scale(1.05);
  z-index: 0;
}

/* Ytre innholdsbeholder: ingen felles «innpakning» — hver CMS-boks styles for seg */
.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: clamp(1rem, 2vw, 1.25rem);
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.5rem;
  text-align: center;
  color: inherit;
  background: transparent;
}

/* Første innholdsboks: mørk gjennomsiktig panel (som før) */
.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry:first-of-type {
  max-width: 100%;
  margin-inline: 0;
  width: 100%;
  padding: clamp(1.2rem, 2.2vw, 1.5rem) clamp(1.15rem, 2vw, 1.5rem);
  box-sizing: border-box;
  color: #fff;
  background: var(--survey-cta-text-bg, rgba(0, 0, 0, 0.42));
  border-radius: 8px;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry:first-of-type h2,
.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry:first-of-type h3 {
  color: #fff;
  margin: 0 0 0.45rem;
  line-height: 1.25;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry:first-of-type p {
  margin: 0 0 0.65rem;
  color: #e0e0e0;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry:first-of-type p:last-child {
  margin-bottom: 0;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry:first-of-type a {
  color: #e0e0e0;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry:first-of-type a:hover {
  color: #fff;
}

/* Påfølgende bokser (f.eks. «Få et nettverk …»): egen ramme, ikke inni første panel */
.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry ~ .content-box-entry {
  max-width: 100%;
  margin-inline: 0;
  width: 100%;
  padding: clamp(1.25rem, 2.2vw, 1.5rem) clamp(1.15rem, 2vw, 1.5rem);
  box-sizing: border-box;
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  background: #fff;
  color: #111;
  box-shadow: var(--shadow);
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry ~ .content-box-entry h2,
.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry ~ .content-box-entry h3 {
  color: #111;
  margin: 0 0 0.45rem;
  line-height: 1.25;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry ~ .content-box-entry p {
  margin: 0 0 0.65rem;
  color: #333;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry ~ .content-box-entry p:last-child {
  margin-bottom: 0;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry ~ .content-box-entry a {
  color: var(--secondary-color, #ff7f2b);
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] > .content-box-entry ~ .content-box-entry a:hover {
  color: color-mix(in srgb, var(--secondary-color, #ff7f2b) 85%, #000);
}

/* WiFi survey: innhold limt inn fra admin bruker ofte .hm-home-types-header / .hm-prosjekttyper-intro-block__inner — oransje venstrekant der er tiltenkt forside/prosjekttyper, ikke denne siden */
.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] .hm-home-types-header,
.home-bottom-boxes--wifi-survey-cta .survey-cta-box [data-projecttype-box-three-html] .hm-prosjekttyper-intro-block__inner {
  border-left: 0;
  padding-left: 0;
}

/* WiFi survey-siden bruker nå standard boks 3 — nøytraliser gjenbruksklasser (oransje venstrekant) */
body[data-hm-page="wifi-survey-troubleshooting"] [data-projecttype-box-three-html] .hm-home-types-header,
body[data-hm-page="wifi-survey-troubleshooting"] [data-projecttype-box-three-html] .hm-prosjekttyper-intro-block__inner {
  border-left: 0;
  padding-left: 0;
}

/* WiFi survey: innholdsboks (alle CMS-id-er) – full bredde, midtstilt; tidligere kun id «4» */
.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry > div {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100%;
  gap: 1rem;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry > div > div:only-child {
  width: 100% !important;
  max-width: none !important;
  text-align: center;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry > div > div:first-child:not(:only-child) {
  width: 100% !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry > div > div:last-child:not(:only-child) {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  text-align: center;
}

/* Arv midtstilling til limt inn HTML (overskrifter, knapper) */
.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry > div > div {
  box-sizing: border-box;
}

/* WiFi survey: media_url / to-kolonne fra API skal ikke gi side-om-side her — én kolonne, midtstilt */
.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry.hm-content-box--has-media .hm-content-box-inner {
  flex-direction: column !important;
  align-items: center !important;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry .hm-content-box-media-column,
.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry .hm-content-box-html-column {
  width: 100% !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.home-bottom-boxes--wifi-survey-cta .survey-cta-box .content-box-entry .hm-content-box-html-column {
  text-align: center;
}

/* WiFi Survey Troubleshooting: boks i bunnen med utblåst bakgrunnsbilde */
.survey-cta-box {
  position: relative;
  overflow: hidden;
  background: #222;
  border-radius: var(--radius);
}

.survey-cta-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/uploads/site-media/wifisurevy-bestilling_bbdfdee3aa7c.png");
  background-size: cover;
  background-position: center;
  filter: blur(6px);
  transform: scale(1.05);
  z-index: 0;
}

.survey-cta-box::after {
  display: none;
}

/* CMS: ekstra bokser — delt bred (~2/3) + smal (~1/3), kontaktkort eller HTML i smal kolonne */
.hm-content-box--split-2-3 {
  margin: 0 0 1.25rem 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hm-content-box--split-2-3 .hm-content-box-split {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: clamp(1rem, 3vw, 2rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hm-content-box--split-2-3.hm-content-box-split--wide-right .hm-content-box-split {
  flex-direction: row-reverse; /* smal venstre, bred høyre */
}

.hm-content-box-split__wide {
  flex: 2 1 0;
  min-width: 0;
}

.hm-content-box-split__narrow {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 720px) {
  .hm-content-box--split-2-3 .hm-content-box-split,
  .hm-content-box--split-2-3.hm-content-box-split--wide-right .hm-content-box-split {
    flex-direction: column;
    align-items: stretch;
  }

  .hm-content-box-split__wide,
  .hm-content-box-split__narrow {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }
}

/* Delt boks uten smal kolonne (tom kontakt / tom smal HTML): bred tar full bredde */
.hm-content-box--split-2-3 .hm-content-box-split .hm-content-box-split__wide:only-child {
  flex: 1 1 100%;
  max-width: 100%;
}

.hm-split-contact-card {
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}

.hm-split-contact-card__title {
  margin: 0 0 0.85rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-strong);
}

.hm-split-contact-card__line {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-body);
}

.hm-split-contact-card__line:last-child {
  margin-bottom: 0;
}

.hm-split-contact-card__label {
  display: inline-block;
  min-width: 7.5rem;
  font-weight: 500;
  color: var(--muted);
}

.hm-split-contact-card__linkedin {
  font-weight: 500;
}

/*
 * CMS content-box uten media_url: inner er flex kolonne. Med align-items:flex-start krymper
 * .hm-content-box-html-column til ~innholdsbredden (smal venstrestripe). Stretch gir full bredde.
 * Gjelder både boks 3 og under-banner (API/HTML fra admin).
 */
section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .content-box-entry:not(.hm-content-box--has-media) .hm-content-box-inner,
section#projecttype-under-banner [data-projecttype-under-banner-html] .content-box-entry:not(.hm-content-box--has-media) .hm-content-box-inner {
  align-items: stretch !important;
}

/* Innholdsbokser (API): to kolonner med media + HTML — kun prosjekttyper-boks 3 / under-banner, ikke WiFi survey (.survey-cta-box) */
section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box--has-media .hm-content-box-inner,
section#projecttype-under-banner [data-projecttype-under-banner-html] .hm-content-box--has-media .hm-content-box-inner {
  width: 100%;
  box-sizing: border-box;
}

section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-media-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-media-frame img,
section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-media-frame video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-cta .hm-btn-final {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

/* Valgfri manuell to-kolonne i ren HTML (uten media_url i JSON) */
section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-4-split {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: clamp(1rem, 3vw, 2rem);
  width: 100%;
  box-sizing: border-box;
}

section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-4-split .hm-content-box-4-split__media {
  flex: 0 0 min(45%, 28rem);
  max-width: min(45%, 28rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-4-split .hm-content-box-4-split__body {
  flex: 1 1 50%;
  min-width: 0;
}

@media (max-width: 900px) {
  section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box--has-media .hm-content-box-inner {
    flex-direction: column !important;
  }

  section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-media-column {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }

  section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-4-split {
    flex-direction: column;
  }

  section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-content-box-4-split .hm-content-box-4-split__media {
    max-width: 100%;
  }
}

/* Kontorbygg: etter JS-split skal inner alltid være full bredde (unngå smal ~30% kolonne når inner ble satt til flex-row med ett barn) */
section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] section.content-box-entry[data-hm-kontor-box4-split="1"] .hm-content-box-inner,
section#projecttype-under-banner [data-projecttype-under-banner-html] section.content-box-entry[data-hm-kontor-box4-split="1"] .hm-content-box-inner {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  flex-direction: column !important;
  align-items: stretch !important;
}

/* Kontorbygg: tidligere «boks 4» to-kolonne — én kolonne, full bredde som øvrige CMS-bokser */
section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-kontorbygg-box4-row,
section#projecttype-under-banner [data-projecttype-under-banner-html] .hm-kontorbygg-box4-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(1rem, 3vw, 2rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  flex: 1 1 auto;
}

section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-kontorbygg-box4-media,
section#projecttype-under-banner [data-projecttype-under-banner-html] .hm-kontorbygg-box4-media {
  flex: 1 1 auto;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-kontorbygg-box4-media img,
section#projecttype-under-banner [data-projecttype-under-banner-html] .hm-kontorbygg-box4-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-kontorbygg-box4-points,
section#projecttype-under-banner [data-projecttype-under-banner-html] .hm-kontorbygg-box4-points {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] .hm-kontorbygg-box4-intro,
section#projecttype-under-banner [data-projecttype-under-banner-html] .hm-kontorbygg-box4-intro {
  width: 100%;
  box-sizing: border-box;
}

/* Prosjekttype kontorbygg: kontakt under innhold (ikke i banner) */
.contact-elements--kontorbygg-page {
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: #f0f0f0;
  border-radius: var(--radius);
  border: 1px solid var(--border-muted);
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

/* Kontorbygg: «Bestill verifisering» ligger i Hamina-boksen (ikke i kontaktboksen) — se .hm-kontor-hamina-box */

/* Kontorbygg: Hamina-boks — lik luft fra kant til overskrift/tekst og fra knapp til kant */
.detail-section-text .hm-kontor-hamina-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
  padding-block: 1.75rem;
  padding-inline: 1.25rem;
  min-height: 0;
}

/* Unngå at CMS-margin på første/siste element ødelegger symmetrien */
.detail-section-text .hm-kontor-hamina-box > :first-child {
  margin-block-start: 0;
}

.detail-section-text .hm-kontor-hamina-box > :last-child {
  margin-block-end: 0;
}

.detail-section-text .hm-kontor-hamina-box .contact-elements__cta-wrap {
  margin-block: 0;
}

.detail-section-text .hm-kontor-hamina-box .contact-elements__cta-wrap .hm-btn-final {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.contact-elements__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}
.contact-elements__row {
  margin: 0.5rem 0;
}

.contact-elements [data-contact-linkedin-label],
.contact-elements [data-company-linkedin-label] {
  font-weight: 700;
}

.contact-elements__linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.contact-elements__linkedin-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.contact-elements__linkedin-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  color: #0a66c2;
}

.contact-elements [data-contact-email][href=""],
.contact-elements [data-contact-phone][href=""],
.contact-elements [data-contact-linkedin][href=""],
.contact-elements [data-company-linkedin][href=""] {
  pointer-events: none;
}

/* Skjul hele LinkedIn-raden når lenken mangler (valgfritt i CMS / agentprofil). */
.contact-elements__row:has([data-contact-linkedin][href=""]),
.contact-elements__row:has([data-company-linkedin][href=""]) {
  display: none;
}

.home-under-banner-field {
  background: color-mix(in srgb, var(--secondary-color) 90%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--secondary-color) 70%, #ffffff);
  border-radius: 0;
  padding: 1rem 0;
}

[data-home-under-banner].home-under-banner-field {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0 !important;
  margin-bottom: 0;
  border-left: 0;
  border-right: 0;
}

[data-home-under-banner-html] {
  width: min(100% - 1.5rem, 1140px);
  margin-left: auto;
  margin-right: auto;
}

[data-home-under-banner-html] > :first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

[data-box-two-wrapper] {
  margin-top: 0 !important;
  display: block;
  clear: both;
}

[data-home-under-banner-html],
[data-box-two-html] {
  overflow-wrap: anywhere;
  word-break: break-word;
}

[data-home-under-banner-html] *,
[data-box-two-html] * {
  box-sizing: border-box;
  max-width: 100%;
}

[data-home-under-banner-html] img,
[data-home-under-banner-html] video,
[data-home-under-banner-html] iframe,
[data-box-two-html] img,
[data-box-two-html] video,
[data-box-two-html] iframe {
  max-width: 100% !important;
  height: auto;
}

.hero {
  background: var(--secondary-color);
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--secondary-color) 70%, #ffffff);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.1rem;
}

.hero[data-home-hero] {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -1px;
  border-radius: 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
  padding: 1.35rem 0;
}

.hero[data-home-hero].has-banner-media {
  padding: 0 !important;
  min-height: clamp(220px, 32vw, 460px);
}

/* Forsiden: banner 20 % lavere, bredden justeres med bildets proporsjoner */
.hero[data-home-banner].has-banner-media .hero-banner-media img,
.hero[data-home-banner].has-banner-media .hero-banner-media video {
  max-height: 68vh;
}

.hero[data-home-hero] > .home-hero-content {
  width: min(100% - 1.5rem, 1140px);
  margin-left: auto;
  margin-right: auto;
}

.hero[data-home-hero].has-banner-media > .home-hero-content {
  display: none;
}


.hero.has-banner-media {
  position: relative;
  overflow: hidden;
  color: #111827;
  border-color: transparent;
}

.hero.has-banner-media > * {
  position: relative;
  z-index: 2;
}

.hero-banner-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero[data-home-hero] > .hero-banner-media {
  width: 100%;
  left: 0;
  right: 0;
  transform: none;
}

/* Prosjekttype-banner: bilde i høyre hjørne; bildets høyde bestemmer bannerhøyden; fade fra secondary color, avslutter ca. 1/3 av bildebredden fra venstre */
.hero[data-prosjekttype-banner].has-banner-media {
  background: var(--secondary-color);
  min-height: 0;
  padding: 0;
  overflow: visible;
  display: block;
}

.hero[data-prosjekttype-banner] .hero-banner-media {
  position: relative;
  inset: auto;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 0 auto;
  padding: 0;
  display: block;
  z-index: 0;
}

/* WiFi survey: fullbredde video, tekst i sort, ingen gradient */
.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .hero-banner-media {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .hero-banner-media::after {
  background: transparent !important;
}

.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .hero-banner-media img,
.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .hero-banner-media video {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
}

.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .prosjekttype-banner-overlay .hm-home-banner-content,
.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .prosjekttype-banner-overlay .hm-home-banner-content .hm-home-banner-eyebrow,
.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .prosjekttype-banner-overlay .hm-home-banner-content .hm-home-banner-title,
.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .prosjekttype-banner-overlay .hm-home-banner-content .hm-home-banner-ingress,
.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .prosjekttype-banner-overlay .hm-home-banner-content p,
.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .prosjekttype-banner-overlay .hm-home-banner-content h1 {
  color: #111 !important;
}

.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .prosjekttype-banner-overlay .hm-home-banner-content a {
  color: #111;
}

/* Transparent boks bak teksten over video – bedre lesbarhet (gjelder overlay sitt innhold uansett wrapper-klasse) */
.hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"] .prosjekttype-banner-overlay > * {
  background: rgba(255, 255, 255, 0.6) !important;
  padding: 1rem 1.25rem !important;
  border-radius: 8px !important;
  width: fit-content !important;
  max-width: min(100%, 32rem) !important;
  box-sizing: border-box;
}

/* Smal skjerm: skjul video, vis kun bakgrunnsfarge fra branding (f.eks. orange) */
@media (max-width: 520px) {
  .hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"].has-banner-media .hero-banner-media {
    display: none;
  }

  .hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"].has-banner-media {
    background: var(--secondary-color);
    min-height: 220px;
    display: flex;
    align-items: center;
  }

  .hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"].has-banner-media .prosjekttype-banner-overlay {
    position: relative;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  /* Dropp transparent boks – kun bakgrunnsfarge */
  .hero[data-prosjekttype-banner][data-prosjekttype-banner-media="left"].has-banner-media .prosjekttype-banner-overlay > * {
    background: transparent !important;
  }
}

.hero[data-prosjekttype-banner] .hero-banner-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Feid fra venstre: heldekket sekundærfarge til venstre, gradient ca. 40–58 % */
.hero[data-prosjekttype-banner][data-prosjekttype-banner-fade="left"] .hero-banner-media::after,
.hero[data-prosjekttype-banner]:not([data-prosjekttype-banner-fade]) .hero-banner-media::after {
  background: linear-gradient(
    to right,
    var(--secondary-color) 0%,
    var(--secondary-color) 40%,
    transparent 58%
  );
}

/* Feid fra høyre: heldekket sekundærfarge til høyre, gradient ca. 42–60 % (målt fra høyre) */
.hero[data-prosjekttype-banner][data-prosjekttype-banner-fade="right"] .hero-banner-media::after {
  background: linear-gradient(
    to left,
    var(--secondary-color) 0%,
    var(--secondary-color) 40%,
    transparent 58%
  );
}

.hero[data-prosjekttype-banner] .hero-banner-media img,
.hero[data-prosjekttype-banner] .hero-banner-media video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  display: block;
  margin: 0;
  padding: 0;
  vertical-align: top;
}

.hero-banner-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
}

.hero[data-home-banner] .hero-banner-media::after {
  background: rgba(0, 0, 0, 0.2);
}

.hero-banner-media img,
.hero-banner-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-banner-media-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.hero.has-banner-media .eyebrow,
.hero.has-banner-media .inline-link,
.hero.has-banner-media a {
  color: #111827;
}

.hero.has-banner-media .cta-button,
.hero.has-banner-media .cta-button-secondary {
  color: #fff;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: color-mix(in srgb, #ffffff 88%, var(--primary-color));
  font-weight: 700;
}

.hero[data-home-hero] .eyebrow {
  margin-top: 0.25rem;
  margin-bottom: 0.2rem;
}

.hero[data-home-hero] .eyebrow,
.hero[data-home-hero] [data-banner-title],
.hero[data-home-hero] [data-banner-subtitle] {
  margin-left: 0;
  padding-left: 0;
}

.hero[data-home-hero] .eyebrow + h1 {
  margin-top: 0;
  margin-bottom: 0.55rem;
}

h1,
h2 {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.65rem, 4.6vw, 2.7rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.25rem, 3.6vw, 1.85rem);
  line-height: 1.2;
}

.hero p {
  max-width: 64ch;
}

.hero[data-prosjekttype-banner] {
  position: relative;
  min-height: clamp(260px, 34vw, 460px);
  display: block;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -1px;
  border-radius: 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
}

.hero[data-prosjekttype-banner].has-banner-media {
  padding: 0;
}

.hero[data-prosjekttype-banner].has-banner-media > [data-prosjekttype-banner-default] {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1.1rem;
  max-width: min(46%, 560px);
}

.hero[data-prosjekttype-banner].has-custom-banner-html > [data-prosjekttype-banner-default] {
  display: none !important;
}

/*
  Forside m/ CMS-html + banner-media: .hero[data-prosjekttype-banner].has-banner-media har min-height:0.
  Overlay er position:absolute — uten høyde på forelder blir «boksen» 0px og tekst forsvinner (overflow:hidden på .hero).
*/
.hero[data-prosjekttype-banner].has-custom-banner-html.has-banner-media {
  min-height: clamp(280px, 42vw, 560px);
  overflow: visible;
}

/* Samme når banner-bilde ikke er satt (X() returnerer tidlig) — ellers treffer ikke regelen over */
.hero[data-prosjekttype-banner].has-custom-banner-html:not(.has-banner-media) {
  min-height: clamp(280px, 42vw, 560px);
  overflow: visible;
}

/* Boks 1: overlay skal vises når den har innhold (banner_custom_html) */
.hero[data-prosjekttype-banner].has-custom-banner-html .prosjekttype-banner-overlay {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* CMS: hm-hero-transparent (forside) — sikre synlig blokk over banner-media */
.hero[data-prosjekttype-banner].has-custom-banner-html .prosjekttype-banner-overlay .hm-hero-transparent {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: min(260px, 45vh);
  box-sizing: border-box;
}

/* Boks 1 på kontakt m.m.: .hm-home-banner-content i overlay (uten .hm-home-banner-layout) */
.prosjekttype-banner-overlay .hm-home-banner-content {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  color: #fff;
  visibility: visible;
}

.prosjekttype-banner-overlay .hm-home-banner-content .hm-home-banner-eyebrow,
.prosjekttype-banner-overlay .hm-home-banner-content .hm-home-banner-title,
.prosjekttype-banner-overlay .hm-home-banner-content .hm-home-banner-ingress,
.prosjekttype-banner-overlay .hm-home-banner-content .hm-home-banner-cta,
.prosjekttype-banner-overlay .hm-home-banner-content p,
.prosjekttype-banner-overlay .hm-home-banner-content h1 {
  color: inherit;
  margin: 0;
}

.prosjekttype-banner-overlay .hm-home-banner-content a {
  color: #fff;
}

/* CTA i banner: knappestil og hover kommer fra systemet – ingen egen <style> i innhold */
.prosjekttype-banner-overlay .hm-home-banner-cta .cta-button,
.prosjekttype-banner-overlay .hm-home-banner-cta .hm-btn,
.prosjekttype-banner-overlay .hm-home-banner-cta .hm-btn-primary {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  font-weight: 600;
  margin-top: 0;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.prosjekttype-banner-overlay .hm-home-banner-cta .cta-button:hover,
.prosjekttype-banner-overlay .hm-home-banner-cta .cta-button:focus-visible,
.prosjekttype-banner-overlay .hm-home-banner-cta .hm-btn:hover,
.prosjekttype-banner-overlay .hm-home-banner-cta .hm-btn:focus-visible,
.prosjekttype-banner-overlay .hm-home-banner-cta .hm-btn-primary:hover,
.prosjekttype-banner-overlay .hm-home-banner-cta .hm-btn-primary:focus-visible {
  color: #fff;
  background: var(--primary-color);
  transform: scale(1.05);
  filter: brightness(0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.hero[data-prosjekttype-banner].has-banner-media[data-prosjekttype-banner-placement="right"] > [data-prosjekttype-banner-default] {
  margin-left: auto;
}

@media (max-width: 900px) {
  .hero[data-prosjekttype-banner].has-banner-media > [data-prosjekttype-banner-default] {
    max-width: min(100%, 560px);
  }
}

.prosjekttype-banner-overlay[hidden] {
  display: none;
}

.prosjekttype-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  /* Same horizontal line as .container content below banners */
  padding-inline: max(0.75rem, calc((100vw - 1140px) / 2));
  padding-top: clamp(1rem, 3vw, 2.4rem);
  padding-bottom: 0;
}

.hero.has-banner-media > .prosjekttype-banner-overlay {
  position: absolute;
  z-index: 3;
}

.prosjekttype-banner-overlay > * {
  width: 100%;
  max-width: none;
  margin: 0;
  color: #fff;
}

.hero[data-prosjekttype-banner-placement="right"] .prosjekttype-banner-overlay {
  justify-content: flex-end;
}

.hero[data-prosjekttype-banner-placement="right"] .prosjekttype-banner-overlay > * {
  margin-left: auto;
}

.hero[data-prosjekttype-banner].has-banner-media .eyebrow,
.hero[data-prosjekttype-banner].has-banner-media [data-banner-title],
.hero[data-prosjekttype-banner].has-banner-media [data-banner-subtitle],
.hero[data-prosjekttype-banner].has-banner-media .inline-link {
  color: #fff;
}

/* Banner HTML-boks: hm-home-banner-layout – kun tekst oppå, ingen hvit boks; fade fra secondary color inn i bildet håndteres av .hero-banner-media::after */
.prosjekttype-banner-overlay .hm-home-banner-layout {
  background: transparent !important;
  min-height: 0 !important;
  align-items: center;
  width: 100%;
}

.prosjekttype-banner-overlay .hm-home-banner-text-column {
  background: transparent !important;
  color: #fff;
}

.prosjekttype-banner-overlay .hm-home-banner-layout .hm-home-banner-title,
.prosjekttype-banner-overlay .hm-home-banner-layout .hm-color-strong,
.prosjekttype-banner-overlay .hm-home-banner-layout h1 {
  color: #fff !important;
}

.prosjekttype-banner-overlay .hm-home-banner-layout .hm-home-banner-description,
.prosjekttype-banner-overlay .hm-home-banner-layout .hm-color-body,
.prosjekttype-banner-overlay .hm-home-banner-layout p {
  color: rgba(255, 255, 255, 0.95) !important;
}

.prosjekttype-banner-overlay .hm-home-banner-layout .hm-home-banner-cta-container a {
  color: #fff !important;
}

/* Kontorbygg: kontakt + «Bestill verifisering» injisert i banner (ikke skjema) */
.prosjekttype-banner-overlay .hm-kontorbygg-hero-contact {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
  text-align: left;
  max-width: min(100%, 520px);
}

.prosjekttype-banner-overlay .hm-kontorbygg-hero-contact__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #fff;
}

.prosjekttype-banner-overlay .hm-kontorbygg-hero-contact__row {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
}

.prosjekttype-banner-overlay .hm-kontorbygg-hero-contact__row a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prosjekttype-banner-overlay .hm-kontorbygg-hero-contact__cta {
  margin-top: 1.1rem;
}

.prosjekttype-banner-overlay .hm-kontorbygg-hero-contact__cta .hm-btn-final {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  max-width: 320px;
}

/* Når banner ikke har tilpasset HTML (standard tittelfelt): lys bakgrunn */
[data-prosjekttype-banner-default] .hm-kontorbygg-hero-contact--light {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  max-width: min(100%, 520px);
}

[data-prosjekttype-banner-default] .hm-kontorbygg-hero-contact--light .hm-kontorbygg-hero-contact__title {
  color: #0f172a;
}

[data-prosjekttype-banner-default] .hm-kontorbygg-hero-contact--light .hm-kontorbygg-hero-contact__row {
  color: #334155;
}

[data-prosjekttype-banner-default] .hm-kontorbygg-hero-contact--light .hm-kontorbygg-hero-contact__row a {
  color: var(--primary-color, #00aa00);
}

/* Custom banner HTML tuning for project type heroes */
.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) {
  --banner-shell-max: min(64vw, 940px);
  --banner-column-max: min(100%, 520px);
}

/* Legacy custom HTML blocks from admin (kept for backward compatibility) */
.hero[data-prosjekttype-banner] .prosjekttype-banner {
  width: var(--banner-shell-max);
  max-width: var(--banner-shell-max);
  margin-left: auto;
  text-align: right;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
  margin-left: auto;
  text-align: right;
  padding: clamp(18px, 2.8vw, 40px) 0;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype__eyebrow-wrap, .banner-content-ladeanlegg__eyebrow-wrap) {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype__eyebrow, .banner-content-ladeanlegg__eyebrow) {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8e3da;
  margin: 0 0 5px;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype__title, .banner-content-ladeanlegg__title) {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: #fff;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype__text-wrap, .banner-content-ladeanlegg__text-wrap) {
  width: var(--banner-column-max);
  margin-left: auto;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype__subtitle, .banner-content-ladeanlegg__subtitle) {
  font-size: clamp(1.02rem, 2.1vw, 1.3rem);
  line-height: 1.5;
  margin: 0 0 35px;
  font-weight: 400;
  opacity: 0.95;
  color: #fff;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .banner-cta-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: var(--banner-column-max);
  margin-left: auto;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .banner-spacer {
  height: 50px;
  width: 100%;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .btn-simulering,
.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .btn-nettbutikk {
  text-decoration: none;
  padding: 15px 25px;
  border-radius: 4px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  display: block;
  transition: all 0.3s ease;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .btn-simulering {
  background-color: #8764ff;
  color: #f8e3da;
  border: 0;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .btn-nettbutikk {
  background-color: transparent;
  color: #f8e3da;
  border: 2px solid #f8e3da;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .btn-simulering:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.05);
  filter: brightness(0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .btn-nettbutikk:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: scale(1.05);
  filter: brightness(0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.hero[data-prosjekttype-banner] .prosjekttype-banner-overlay > :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) {
  width: var(--banner-shell-max) !important;
  max-width: var(--banner-shell-max) !important;
}

.hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) :is(.banner-cta-group, div[style*="width: 350px"]) {
  width: var(--banner-column-max) !important;
  max-width: var(--banner-column-max) !important;
}

.hero[data-prosjekttype-banner-placement="left"] .prosjekttype-banner-overlay > :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
}

.hero[data-prosjekttype-banner-placement="left"] .prosjekttype-banner {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
}

.hero[data-prosjekttype-banner-placement="left"] .prosjekttype-banner-overlay > :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) > div[style*="justify-content: flex-end"] {
  justify-content: flex-start !important;
}

.hero[data-prosjekttype-banner-placement="left"] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) :is(.banner-cta-group, div[style*="margin-left: auto"]) {
  margin-left: 0 !important;
  margin-right: auto !important;
}

.hero[data-prosjekttype-banner-placement="left"] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) :is(.banner-content-prosjekttype__eyebrow-wrap, .banner-content-ladeanlegg__eyebrow-wrap) {
  justify-content: flex-start;
}

.hero[data-prosjekttype-banner-placement="left"] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) :is(.banner-content-prosjekttype__text-wrap, .banner-content-ladeanlegg__text-wrap),
.hero[data-prosjekttype-banner-placement="left"] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .banner-cta-group {
  margin-left: 0;
  margin-right: auto;
}

@media (max-width: 1024px) {
  .hero[data-prosjekttype-banner].has-banner-media {
    min-height: auto;
    padding: 1.1rem;
  }

  .hero[data-prosjekttype-banner].has-banner-media > .hero-banner-media {
    display: none;
  }

  .hero[data-prosjekttype-banner].has-banner-media > [data-prosjekttype-banner-default] {
    position: relative;
    inset: auto;
    max-width: 100%;
    padding: 0;
  }

  .hero[data-prosjekttype-banner] .prosjekttype-banner-overlay {
    position: relative;
    inset: auto;
    padding: 0;
  }

  .hero[data-prosjekttype-banner-placement="right"] .prosjekttype-banner-overlay {
    justify-content: flex-start;
  }

  .hero[data-prosjekttype-banner-placement="right"] .prosjekttype-banner-overlay > * {
    margin-left: 0;
  }

  .hero[data-prosjekttype-banner] .prosjekttype-banner-overlay,
  .hero[data-prosjekttype-banner] .prosjekttype-banner-overlay > * {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .hero[data-prosjekttype-banner] .prosjekttype-banner-overlay * {
    max-width: 100% !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
  }

  .hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) {
    --banner-shell-max: 100%;
    --banner-column-max: 100%;
  }

  .hero[data-prosjekttype-banner] .prosjekttype-banner {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
  }

  .hero[data-prosjekttype-banner] .prosjekttype-banner-overlay > :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
  }

  .hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) h1 {
    font-size: clamp(2rem, 8.5vw, 3rem) !important;
    line-height: 1.15 !important;
  }

  .hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) p {
    font-size: clamp(1rem, 4vw, 1.18rem) !important;
    line-height: 1.45 !important;
  }

  .hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) :is(.banner-cta-group, div[style*="width: 350px"]) {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) :is(.banner-content-prosjekttype__eyebrow-wrap, .banner-content-ladeanlegg__eyebrow-wrap) {
    justify-content: flex-start;
  }

  .hero[data-prosjekttype-banner] :is(.banner-content-prosjekttype, .banner-content-ladeanlegg) .banner-spacer {
    height: 20px;
  }
}

@media (max-width: 767px) {
  [data-home-under-banner].home-under-banner-field {
    padding: 0 0 0.85rem;
  }

  [data-home-under-banner-html],
  [data-box-two-html] {
    width: calc(100% - 1.1rem);
    margin-left: auto;
    margin-right: auto;
  }

  [data-home-under-banner-html] *,
  [data-box-two-html] * {
    max-width: 100% !important;
  }

  /* Clamp oversized desktop HTML typography on mobile frontpage boxes */
  [data-home-under-banner-html] h1,
  [data-box-two-html] h1 {
    font-size: clamp(1.55rem, 9vw, 2.2rem) !important;
    line-height: 1.12 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  [data-home-under-banner-html] h2,
  [data-box-two-html] h2 {
    font-size: clamp(1.25rem, 6.8vw, 1.7rem) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  [data-home-under-banner-html] h3,
  [data-box-two-html] h3 {
    font-size: clamp(1.05rem, 5.4vw, 1.35rem) !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  [data-home-under-banner-html] p,
  [data-home-under-banner-html] li,
  [data-box-two-html] p,
  [data-box-two-html] li {
    font-size: clamp(0.95rem, 3.8vw, 1.05rem) !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  [data-home-under-banner-html] [style*="font-size"],
  [data-box-two-html] [style*="font-size"] {
    font-size: inherit !important;
    max-width: 100% !important;
  }

  [data-home-under-banner-html] [style*="padding-left"],
  [data-home-under-banner-html] [style*="padding-right"],
  [data-home-under-banner-html] [style*="margin-left"],
  [data-home-under-banner-html] [style*="margin-right"],
  [data-box-two-html] [style*="padding-left"],
  [data-box-two-html] [style*="padding-right"],
  [data-box-two-html] [style*="margin-left"],
  [data-box-two-html] [style*="margin-right"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Home box 1 can contain desktop hero HTML; force single-column mobile layout */
  [data-home-under-banner-html] .home-hero-content,
  [data-home-under-banner-html] .hero-content-split,
  [data-home-under-banner-html] .hero-cta-row {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  [data-home-under-banner-html] .hero-content-split > *,
  [data-home-under-banner-html] .hero-cta-row > * {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  [data-home-under-banner-html] .hero-cta-row {
    gap: 0.6rem !important;
  }

  [data-home-under-banner-html] .hero-cta-row .cta-button,
  [data-home-under-banner-html] .hero-cta-row .cta-button-secondary {
    width: auto !important;
    max-width: 100% !important;
  }

  /* Force single-column when pasted HTML contains inline desktop grid/flex styles */
  [data-home-under-banner-html] [style*="display:grid"],
  [data-home-under-banner-html] [style*="display: grid"],
  [data-home-under-banner-html] [style*="display:flex"],
  [data-home-under-banner-html] [style*="display: flex"],
  [data-home-under-banner-html] [style*="grid-template-columns"] {
    display: block !important;
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }

  [data-home-under-banner-html] [style*="float:left"],
  [data-home-under-banner-html] [style*="float: left"],
  [data-home-under-banner-html] [style*="float:right"],
  [data-home-under-banner-html] [style*="float: right"] {
    float: none !important;
  }

  /* Neutralize inline desktop column widths inside Box 1 */
  [data-home-under-banner-html] [style*="width:"],
  [data-home-under-banner-html] [style*="max-width:"],
  [data-home-under-banner-html] [style*="min-width:"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  [data-home-under-banner-html] .hero-content-split > *,
  [data-home-under-banner-html] .hero-cta-row > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
  }

  [data-box-two-wrapper] {
    display: block !important;
    visibility: visible !important;
  }

  .hero[data-prosjekttype-banner].has-banner-media {
    min-height: auto;
    padding: 1.1rem;
  }

  .hero[data-prosjekttype-banner].has-banner-media > .hero-banner-media {
    display: none;
  }

  .hero[data-prosjekttype-banner].has-banner-media > [data-prosjekttype-banner-default] {
    position: relative;
    inset: auto;
    max-width: 100%;
    padding: 0;
  }

  .hero[data-prosjekttype-banner] .prosjekttype-banner-overlay {
    position: relative;
    inset: auto;
    padding: 0;
  }

  .hero[data-prosjekttype-banner-placement="right"] .prosjekttype-banner-overlay {
    justify-content: flex-start;
  }

  .hero[data-prosjekttype-banner-placement="right"] .prosjekttype-banner-overlay > * {
    margin-left: 0;
  }

  .hero[data-prosjekttype-banner] .prosjekttype-banner-overlay,
  .hero[data-prosjekttype-banner] .prosjekttype-banner-overlay > * {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .hero[data-prosjekttype-banner] .prosjekttype-banner-overlay * {
    max-width: 100% !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
  }
}

[data-projecttype-under-banner-html] > *,
section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] > * {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: none !important;
}

[data-projecttype-under-banner-html] > .prosjekt-side-ladeanlegg,
section#projecttype-box-three:not(.survey-cta-box) [data-projecttype-box-three-html] > .prosjekt-side-ladeanlegg {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Ladeanlegg: kontaktboks som siste element i produktgridet, samme bredde som produktkort */
.ladeanlegg-contact-box__inner {
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--primary-color, #00AA00) 32%, var(--border-muted, #e2e8f0));
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ladeanlegg-contact-box__inner:hover {
  border-color: color-mix(in srgb, var(--primary-color, #00AA00) 55%, var(--border-muted, #e2e8f0));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ladeanlegg-contact-box__inner .contact-elements__title {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.hero-content-split {
  display: grid;
  gap: 0.8rem;
}

.cta-button {
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: var(--primary-color);
  color: #fff;
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  font-weight: 600;
  margin-top: 0.8rem;
}

.hero-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0;
  align-items: flex-start;
}

.hero-cta-row .cta-button {
  margin-top: 0;
}

.cta-button-secondary {
  background: var(--secondary-color);
}

/* Banner CTA (samme utseende og hover som .cta-button) */
.hm-btn,
.hm-btn-primary {
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: var(--primary-color);
  color: #fff;
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  font-weight: 600;
  margin-top: 0.8rem;
}

/* Global button interaction behavior */
button,
.cta-button,
.cta-button-secondary,
.btn-simulering,
.btn-nettbutikk,
.hm-custom-cta,
.hm-btn,
.hm-btn-primary,
.hm-interactive {
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

button:hover,
button:focus-visible,
.cta-button:hover,
.cta-button:focus-visible,
.cta-button-secondary:hover,
.cta-button-secondary:focus-visible,
.btn-simulering:hover,
.btn-simulering:focus-visible,
.btn-nettbutikk:hover,
.btn-nettbutikk:focus-visible,
.hm-custom-cta:hover,
.hm-custom-cta:focus-visible,
.hm-btn:hover,
.hm-btn:focus-visible,
.hm-btn-primary:hover,
.hm-btn-primary:focus-visible,
.hm-interactive:hover,
.hm-interactive:focus-visible {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: scale(1.05);
  filter: brightness(0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  button,
  .cta-button,
  .cta-button-secondary,
  .btn-simulering,
  .btn-nettbutikk,
  .hm-custom-cta,
  .hm-btn,
  .hm-btn-primary,
  .hm-btn-final,
  .hm-interactive {
    transition: none;
  }

  button:hover,
  button:focus-visible,
  .cta-button:hover,
  .cta-button:focus-visible,
  .cta-button-secondary:hover,
  .cta-button-secondary:focus-visible,
  .btn-simulering:hover,
  .btn-simulering:focus-visible,
  .btn-nettbutikk:hover,
  .btn-nettbutikk:focus-visible,
  .hm-custom-cta:hover,
  .hm-custom-cta:focus-visible,
  .hm-btn:hover,
  .hm-btn:focus-visible,
  .hm-btn-primary:hover,
  .hm-btn-primary:focus-visible,
  .hm-interactive:hover,
  .hm-interactive:focus-visible,
  .hm-btn-final:hover,
  .hm-btn-final:focus-visible {
    transform: none;
    box-shadow: none;
    filter: none;
  }
}

.inline-link {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.card-grid {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

/* Forside Boks 2: kort som «Kommer snart» – grået ut, ingen lenke */
[data-box-two-html] .card--coming-soon {
  opacity: 0.65;
  pointer-events: none;
}
[data-box-two-html] .card--coming-soon .cta-button--placeholder {
  cursor: default;
}

.feature-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.6rem;
}

.notice-box {
  margin-top: 1rem;
  border: 1px solid var(--accent-color);
  border-left: 4px solid var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 6%, var(--surface));
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.shared-main-text {
  margin-top: 0;
}

/* Fallback når innholds-API ikke svarer i tide eller feiler */
.hm-load-fallback {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--secondary-color) 12%, var(--surface));
  border: 1px solid var(--secondary-color);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--primary-color);
}

.project-types-split {
  display: grid;
  gap: 1rem;
}

.project-types-info {
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary-color) 8%, var(--surface));
  padding: 1rem;
}

.project-types-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr;
}

.project-type-card {
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-type-card-link {
  display: block;
  text-decoration: none;
  padding: 1rem;
  height: 100%;
}

.project-type-card h3 {
  margin: 0 0 0.45rem;
}

.project-type-card p {
  margin: 0;
  color: #334155;
}

.project-type-card .inline-link {
  margin-top: 0.9rem;
}

.project-type-card h3,
.feature-link-card-content h3 {
  color: var(--secondary-color);
}

.project-type-card-link,
.project-type-card .inline-link,
.feature-link-card,
.feature-link-card .inline-link,
.feature-link-card-content a {
  color: var(--primary-color);
}

.project-types-grid .cta-button,
.project-types-grid .cta-button-secondary,
.feature-link-grid .cta-button,
.feature-link-grid .cta-button-secondary {
  background: var(--primary-color);
  color: #fff;
}

/* Prosjektkort: inaktiv / kommer snart (forside, CMS Boks 2) */
.project-type-card--kommer-snart {
  opacity: 0.58;
  filter: grayscale(0.4);
  pointer-events: none;
  border-color: var(--border-muted);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.project-type-card--kommer-snart h3 {
  color: var(--muted);
}

.project-type-card--kommer-snart p {
  color: var(--muted);
}

.project-type-card__kommer-snart-label {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--muted) 14%, var(--surface));
  color: var(--muted);
  border: 1px solid var(--border);
}

.feature-link-grid {
  display: grid;
  gap: 1rem;
}

.feature-link-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  text-decoration: none;
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-link-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.feature-link-card-content {
  padding: 0.95rem;
}

.feature-link-card-content h3 {
  margin: 0 0 0.45rem;
}

.feature-link-card-content p {
  margin: 0;
  color: #334155;
}

.order-section {
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary-color) 8%, var(--surface));
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.order-section-intro {
  color: #111827;
}

.order-section-intro p {
  margin-bottom: 0;
}

.detail-sections-grid {
  display: grid;
  gap: 1rem;
}

.detail-section-item {
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-section-inner {
  display: grid;
  grid-template-columns: 1fr;
}

.detail-section-text {
  padding: 1rem;
}

.detail-section-text h3 {
  margin: 0 0 0.5rem;
}

.detail-section-text p {
  margin: 0;
  color: #334155;
}

.detail-section-text div {
  color: #334155;
}

.detail-section-image {
  background: #fff;
  border-top: 1px solid var(--accent-color);
}

.detail-section-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.video-grid {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.9rem;
}

.video-grid iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
}

.showcase-grid {
  display: grid;
  gap: 0.9rem;
}

.showcase-grid img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--accent-color);
  background: #fff;
  box-shadow: var(--shadow);
}

.product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

#anbefalte-produkter {
  scroll-margin-top: 84px;
}

#videoer {
  scroll-margin-top: 84px;
}

/* Eksempelrapport-galleri (underside prosjekttype) */
.eksempelrapport-gallery {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .eksempelrapport-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .eksempelrapport-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.eksempelrapport-card {
  display: block;
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease;
}

.eksempelrapport-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.eksempelrapport-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--accent-color);
}

.eksempelrapport-card .eksempelrapport-title {
  display: block;
  padding: 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.eksempelrapport-card .eksempelrapport-desc {
  display: block;
  padding: 0 1rem 1rem;
  font-size: 0.9rem;
  color: var(--muted, #64748b);
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid var(--accent-color);
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem;
  cursor: pointer;
}

.product-card h3 {
  margin: 0;
  font-size: 1rem;
}

.product-elnumber {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.product-desc {
  margin: 0;
  color: #334155;
}

/* Lys skjemabakgrunn følger domenets sekundærfarge (banner); underdomener får tilsvarende tint automatisk */
.form-card {
  background: color-mix(in srgb, var(--secondary-color) 10%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--secondary-color) 22%, #ffffff);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  width: min(100%, 980px);
  margin: 0 auto;
}

.form-row {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.05rem;
}

.form-row label {
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--secondary-color) 30%, #ffffff);
  border-radius: 10px;
  padding: 0.76rem 0.82rem;
  background: #fff;
  font: inherit;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--primary-color);
  outline: 2px solid color-mix(in srgb, var(--primary-color) 30%, white);
  outline-offset: 1px;
}

/* Forhåndsutfylt / skrivebeskyttet felt (samme som avlest prosjekttype på befaringsrapport) */
.form-row input.form-input-readonly,
.form-row input[readonly]:not([type="hidden"]) {
  background: color-mix(in srgb, var(--secondary-color) 7%, #f1f5f9);
  color: #334155;
  cursor: default;
}

.form-card .form-intro-hint {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
  line-height: 1.45;
}

.form-card .form-intro-hint a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-card .form-intro-hint a:hover {
  color: color-mix(in srgb, var(--primary-color) 85%, #0f172a);
}

.form-card .form-card-section-title {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.65rem;
  line-height: 1.3;
}

/* Tredjeparts befarings: tilkoblingstype vises kun når «Ja» er valgt på internett-spørsmålet (JS + .bg-connection-followup-visible) */
.bg-connection-followup-wrap:not(.bg-connection-followup-visible) {
  display: none !important;
}

/* Kompakt radiogruppe: ikke bruk .form-row her — global input{width:100%} ødela tilknytning knapp↔tekst */
.bg-connection-followup-wrap {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.bg-connection-followup-fieldset {
  margin: 0;
  padding: 0.55rem 0.75rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--secondary-color) 26%, #e2e8f0);
  border-radius: 8px;
  background: color-mix(in srgb, var(--secondary-color) 5%, #ffffff);
  min-width: 0;
}

.bg-connection-followup-legend {
  padding: 0 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}

.bg-connection-radio-row {
  margin: 0 0 0.28rem;
}

.bg-connection-radio-row:last-child {
  margin-bottom: 0;
}

.bg-connection-radio-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-weight: 500;
  font-size: 0.92rem;
  color: #1e293b;
  line-height: 1.3;
  cursor: pointer;
  width: 100%;
}

.bg-connection-radio-label .bg-connection-radio-text {
  flex: 0 1 auto;
}

.bg-connection-followup-fieldset .bg-connection-radio-label input[type="radio"] {
  width: 1rem !important;
  min-width: 1rem;
  height: 1rem;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  align-self: center;
  accent-color: var(--primary-color);
  border-radius: 50%;
}

/* Spørsmålsblokker inne i befaringsrapport (hvitt kort på form-card-bakgrunn) */
.form-card .befaring-q {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--secondary-color) 20%, #ffffff);
  border-radius: 10px;
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}

.form-card .befaring-q:last-of-type {
  margin-bottom: 0.65rem;
}

.form-card .befaring-q h2 {
  font-size: 1.05rem;
  margin: 0 0 0.85rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.form-card .befaring-q .form-hint {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: -0.35rem;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

/* Befaring gjennomgang (tredjepart → prosjektansvarlig): avlest innhold = samme tint som form-card, full høyde, ingen grå boks */
.form-card .br-readonly-block {
  margin: 0.25rem 0 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  max-height: none;
  overflow: visible;
  line-height: 1.55;
  color: #0f172a;
}

.form-card .br-readonly-meta {
  margin-bottom: 1rem;
}

.form-card .br-readonly-meta dt {
  font-weight: 600;
  margin: 0.65rem 0 0.2rem;
}

.form-card .br-readonly-meta dd {
  margin: 0;
}

.br-files.br-files--tinted {
  background: color-mix(in srgb, var(--secondary-color) 10%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--secondary-color) 22%, #ffffff);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Kun kommentarfeltet skal se ut som aktivt, hvitt utfyllingsfelt */
.form-card.br-review-comment-form textarea#br_reviewer_comment,
.form-card.br-review-comment-form textarea.br-review-comment-input {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--secondary-color) 32%, #ffffff);
  box-shadow: 0 1px 3px rgb(15 23 42 / 7%);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status-message {
  min-height: 1.4rem;
  margin-top: 0.8rem;
  color: var(--muted);
}

.form-card .cta-button {
  width: 100%;
  justify-content: center;
}

.status-message.error {
  color: #b91c1c;
}

.status-message.success {
  color: #166534;
}

.thank-you-message {
  margin-top: 0.7rem;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .hero {
    padding: 2.1rem;
  }

  .hero[data-home-hero] {
    padding: 2rem 0;
  }

  .hero[data-home-hero].has-banner-media > .home-hero-content {
    display: none;
  }

  .hero-content-split {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1rem;
  }

  .hero-content-split [data-banner-subtitle] {
    margin: 0;
  }

  .form-card {
    padding: 1.35rem;
  }

  .hero-cta-row {
    justify-self: start;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .card-grid,
  .video-grid,
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .project-types-split {
    grid-template-columns: minmax(260px, 0.36fr) minmax(0, 0.64fr);
    align-items: stretch;
  }

  .project-types-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-types-grid[data-visible-count="1"] {
    grid-template-columns: 1fr;
  }

  .project-types-grid[data-visible-count="1"] .project-type-card:not([hidden]) .project-type-card-link {
    min-height: 220px;
    display: grid;
    align-content: center;
  }

  .feature-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-section {
    grid-template-columns: minmax(280px, 0.4fr) minmax(0, 0.6fr);
    align-items: start;
    gap: 1.2rem;
  }

  .detail-section-inner {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 38%);
  }

  .detail-section-image {
    border-top: 0;
    border-left: 1px solid var(--accent-color);
  }
}

/* Partner roll (infinity roll) – like høyden, bredde etter aspect ratio, klikk åpner lenke i ny fane */
.partner-roll {
  overflow: hidden;
}
.partner-roll h2 {
  margin-bottom: 1rem;
  text-align: center;
  width: 100%;
}
.partner-roll-track-wrap {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}
.partner-roll-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0.5rem 0;
  animation: partner-roll-scroll 24s linear infinite;
  width: max-content;
}
.partner-roll-track:hover {
  animation-play-state: paused;
}
.partner-roll-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
}
.partner-roll-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 0.5rem;
}
.partner-roll-item img {
  height: 100%;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  object-position: center;
  vertical-align: middle;
}
@keyframes partner-roll-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Prosjektstatus via lenke (project-action.php) — samme mønster som befarings-/skjemaside */
.pa-status-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.15rem;
}
.pa-status-actions .cta-button,
.pa-status-actions .cta-button-secondary,
.pa-status-actions .pa-cta-danger {
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  width: 100%;
}
a.pa-cta-danger {
  background: #b91c1c;
  color: #fff !important;
  border: 0;
  padding: 0.76rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  line-height: 1.35;
}
a.pa-cta-danger:hover,
a.pa-cta-danger:focus-visible {
  background: #991b1b;
  outline: 2px solid color-mix(in srgb, var(--primary-color) 28%, #fff);
  outline-offset: 2px;
}

/* Admin: befaring – kildepanel (speiler project-detail inline der nødvendig) */
.befaring-source-panel {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a5f;
  font-size: 14px;
  line-height: 1.45;
}
.befaring-source-panel--readonly {
  border-color: #e2e8f0;
  background: #fff;
  color: #334155;
}
.befaring-source-heading {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e40af;
}
.befaring-source-explain {
  margin: 0 0 10px;
}
.befaring-source-sendnote {
  margin: 0 0 10px;
  font-size: 13px;
  color: #0f172a;
}
.befaring-source-sub {
  margin: 0 0 6px;
  font-size: 13px;
  color: #334155;
}
.befaring-type-summary {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 13px;
  color: #1e293b;
}
.befaring-type-summary li {
  margin-bottom: 2px;
}
.befaring-editor-hint {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.45;
}
select.befaring-type-select--locked {
  background: #f1f5f9;
  color: #475569;
  cursor: not-allowed;
}

/* Befaring: fast tilkoblingsspor (prosjektdetalj + global mal) */
.befaring-connection-slot,
.bq-connection-slot {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--surface);
}
.befaring-connection-slot-title,
.bq-connection-slot > p:first-child strong {
  font-size: 14px;
}
.befaring-connection-slot-q,
.bq-slot-q {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}
.befaring-connection-slot-controls,
.bq-connection-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

/* Admin dashboard: Alle prosjekter + Forecast KPI-kort (speiler admin-theme) */
.dashboard-kpi-status-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  width: 100%;
  font-size: 0.92rem;
}
.dashboard-kpi-status-list li {
  display: block;
  padding: 0;
  border-bottom: 1px solid #e2e8f0;
}
.dashboard-kpi-status-row-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 5px 6px;
  margin: 0;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  transition: background 0.12s ease, color 0.12s ease;
}
.dashboard-kpi-status-row-link:hover {
  background: #f1f5f9;
  color: #1d4ed8;
}
.dashboard-kpi-status-row-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}
.dashboard-kpi-status-row-link--total {
  font-weight: 600;
}
.dashboard-kpi-grid .kpi-card-wrap--wifi-sim {
  display: block;
  min-width: 0;
}
.dashboard-kpi-status-list li.dashboard-kpi-status-row--total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #cbd5e1;
  border-bottom: none;
  font-weight: 600;
}
.dashboard-kpi-grid .kpi-card-wrap--span-2 .kpi-card--stack,
.dashboard-kpi-grid a.kpi-card-link--span-2 .kpi-card--stack {
  padding-top: 0.85rem;
  padding-bottom: 0.65rem;
}
.dashboard-kpi-grid .kpi-card-wrap--span-2 .kpi-card--stack .label,
.dashboard-kpi-grid a.kpi-card-link--span-2 .kpi-card--stack .label {
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: 0.78rem;
  line-height: 1.25;
}
.dashboard-kpi-forecast-rows {
  width: 100%;
  margin: 0 0 6px;
  font-size: 0.88rem;
}
.dashboard-kpi-forecast-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid #e2e8f0;
}
.dashboard-kpi-ap-suffix {
  font-weight: 800;
  font-size: 0.85em;
  letter-spacing: 0.04em;
}
.dashboard-kpi-forecast-val--split {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.dashboard-kpi-forecast-row--category .dashboard-kpi-forecast-key {
  font-size: 0.88rem;
}
.dashboard-kpi-time-to-won {
  width: 100%;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}
.dashboard-kpi-time-to-won-title {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dashboard-kpi-time-to-won-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dashboard-kpi-time-to-won-row {
  border-bottom: 1px solid #e2e8f0;
}
.dashboard-kpi-time-to-won-row:last-child {
  border-bottom: none;
}
.dashboard-kpi-time-to-won-single {
  margin: 0;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.dashboard-kpi-time-to-won-value {
  font-weight: 700;
  color: #0f172a;
}
.dashboard-kpi-time-to-won-meta {
  font-size: 0.88rem;
  font-weight: 400;
}
.dashboard-kpi-time-to-won-drill-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
}
.dashboard-kpi-time-to-won-drill-link:last-child {
  border-bottom: none;
}
.dashboard-kpi-time-to-won-drill-link:hover {
  background: #f1f5f9;
}
.dashboard-kpi-time-to-won-drill-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.dashboard-kpi-time-to-won-list > li {
  margin: 0;
  padding: 0;
}

/* Vunnet ISP-/nettverksskjema (public/project-won-intake.php) */
.pwi-fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
}
.pwi-fieldset legend {
  font-weight: 600;
  padding: 0 0.35rem;
}
.pwi-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.pwi-add-row {
  margin: 0.35rem 0 0.75rem;
  padding: 0.45rem 0.9rem;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  color: #0f172a;
}
.pwi-add-row:hover {
  background: #f1f5f9;
}

.pwi-network-access-list {
  margin: 0 0 0.75rem 1.1rem;
  padding: 0;
}
.pwi-network-access-form .pwi-network-access-edit-block {
  display: grid;
  gap: 8px;
}
.pwi-network-access-form .pwi-network-access-edit-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 8px;
  max-width: 720px;
  margin-bottom: 6px;
  align-items: center;
}
.pwi-nw-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pwi-network-access-form .pwi-network-access-edit-row--with-action {
  grid-template-columns: 1.2fr 1.4fr 1fr auto;
  max-width: 980px;
}
.pwi-network-access-form .pwi-network-access-edit-row input {
  width: 100%;
  box-sizing: border-box;
}
.pwi-nw-resend-btn {
  font-size: 12px;
  padding: 6px 10px;
  white-space: nowrap;
}
.pwi-network-access-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 6px;
}
@media (max-width: 720px) {
  .pwi-network-access-form .pwi-network-access-edit-row,
  .pwi-network-access-form .pwi-network-access-edit-row--with-action {
    grid-template-columns: 1fr;
  }
}

/* Dashboard KPI uten lenke (ladeprodusent/ladeoperatør-agent) */
.dashboard-kpi-grid .kpi-card-link--static {
  display: block;
  cursor: default;
  text-decoration: none;
  color: inherit;
}

.dashboard-kpi-grid .kpi-card-link--static:hover {
  box-shadow: inherit;
}

/* Feilmelding / «Rapporter feil» (offcanvas-knapp + modal, hmBugReportInit) */
#offcanvas-menu .hm-bug-report-nav-link {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
#offcanvas-menu .hm-bug-report-nav-link:hover {
  background: var(--border-soft);
  border-color: var(--border-muted);
}

/* Responsavtale-lenke for agenter (hm-agent-responsavtale-nav.js) */
#offcanvas-menu a.hm-responsavtale-nav-link {
  display: block;
  margin-top: 0.35rem;
  padding: 0.65rem 0;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  border-top: 1px solid var(--border-soft, rgba(15, 23, 42, 0.08));
}
#offcanvas-menu a.hm-responsavtale-nav-link:hover {
  text-decoration: underline;
}

/* Offentlig responsavtale-side (public/responsavtale.php) */
.ra-wrap {
  width: min(100%, 800px);
  margin: 0 auto;
}
.hm-responsavtale-body.ra-prose {
  line-height: 1.55;
}
.hm-responsavtale-body.ra-prose :where(h1, h2, h3, p, ul, ol) {
  margin-top: 0;
  margin-bottom: 1rem;
}
.ra-pdf-box {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius, 10px);
  background: color-mix(in srgb, var(--surface, #fff) 92%, var(--primary-color, #00aa00) 8%);
  border: 1px solid color-mix(in srgb, var(--primary-color, #00aa00) 25%, transparent);
}
.ra-pdf-box a {
  font-weight: 600;
  color: var(--primary-color);
}

.hm-responsavtale-body .ra-pdf-downloads__lead {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
.hm-responsavtale-body .ra-pdf-download-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.hm-responsavtale-body .ra-pdf-download-list li {
  margin: 0;
}
.hm-responsavtale-body a.ra-pdf-download-link {
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hm-responsavtale-body a.ra-pdf-download-link:hover {
  color: color-mix(in srgb, var(--primary-color) 85%, #0f172a);
}

.hm-bug-report-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  padding: 1rem;
  overflow: auto;
  box-sizing: border-box;
}
.hm-bug-report-modal[hidden] {
  display: none !important;
}
.hm-bug-report-modal:not([hidden]) {
  display: block;
}

.hm-bug-report-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}

.hm-bug-report-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  margin: 8vh auto 2rem;
  padding: 1.35rem 1.25rem 1.15rem;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hm-bug-report-dialog h2 {
  margin: 0 0 0.75rem;
  padding-right: 2.25rem;
  font-size: 1.2rem;
  color: var(--text-strong);
}

.hm-bug-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--border-soft);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.hm-bug-close:hover {
  background: var(--border);
}

.hm-bug-muted {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
  word-break: break-word;
}
.hm-bug-muted code {
  font-size: 0.8rem;
  color: var(--text-muted-strong);
}

.hm-bug-lbl {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
}
.hm-bug-lbl input[type="email"],
.hm-bug-lbl input[type="file"],
.hm-bug-lbl select,
.hm-bug-lbl textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.hm-bug-lbl textarea {
  resize: vertical;
  min-height: 6rem;
}

.hm-bug-report-dialog form button[type="submit"] {
  margin-top: 0.25rem;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-weight: 600;
  color: var(--text-on-dark);
  background: var(--primary-color);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.hm-bug-report-dialog form button[type="submit"]:hover {
  filter: brightness(0.95);
}

.hm-bug-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Agent: inviter installatør — skjult til JS fjerner [hidden] etter innlogget sjekk (overstyr ikke HTML hidden) */
.hm-invite-trigger[hidden] {
  display: none !important;
}

/* Agent: inviter installatør (kun e-post) — desktop: header ved siden av meny; mobil: inne i offcanvas */
.hm-invite-trigger {
  position: relative;
  z-index: 1;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-on-dark, #fff);
  background: var(--primary-color, #00aa00);
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-invite-trigger:hover {
  filter: brightness(0.95);
}

/* Større skjerm: kun header-knapp synlig */
.hm-invite-trigger--in-header {
  display: none !important;
  max-width: min(44vw, 11.5rem);
}
@media (min-width: 768px) {
  .hm-invite-trigger--in-header {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
}

/* Mobil / smal skjerm: kun knapp inne i menyen (unngår overlap med menyknapp) */
.hm-invite-trigger--in-menu {
  display: none;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0 0 0.5rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
}
@media (max-width: 767px) {
  .hm-invite-trigger--in-menu {
    display: block;
  }
}
@media (min-width: 768px) {
  .hm-invite-trigger--in-menu {
    display: none !important;
  }
}
.hm-invite-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.hm-invite-modal[hidden] {
  display: none !important;
}
.hm-invite-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.hm-invite-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(90vh, 560px);
  overflow: auto;
  padding: 1.25rem 1.35rem;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}
.hm-invite-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--border-soft, #e2e8f0);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.hm-invite-modal__lead {
  font-size: 0.95rem;
  color: var(--muted, #64748b);
  margin: 0 0 1rem;
  line-height: 1.45;
}
.hm-invite-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.hm-invite-field input {
  font: inherit;
  font-weight: 400;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
}
#hm-invite-form button[type="submit"] {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--text-on-dark, #fff);
  background: var(--primary-color, #00aa00);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.hm-invite-count {
  font-size: 0.85rem;
  color: var(--muted, #64748b);
  margin: 0 0 0.5rem;
}
.hm-invite-status {
  font-size: 0.9rem;
  min-height: 1.25rem;
  margin: 0 0 0.5rem;
}
.hm-invite-status--error {
  color: #b91c1c;
}
.hm-invite-status--ok {
  color: #166534;
}
body.hm-invite-modal-open {
  overflow: hidden;
}

/* Admin: avtaleinnhold / prosjektsynk (project-detail, eksport) */
.agreement-technical-scope-view {
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.45;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border, #e5e7eb);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text, #0f172a);
}
.agreement-technical-scope-view--export {
  max-height: none;
  margin-top: 0.5rem;
}
.agreement-sync-lead {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted, #64748b);
}
.agreement-project-sync-root {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 0.65rem 0.85rem 0.75rem;
  background: var(--surface, #fff);
}
.agreement-sync-block.ptr-sync-block {
  margin: 0;
}
.agreement-sync-section-li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-soft, #f1f5f9);
}
.agreement-sync-section-li:last-child {
  border-bottom: none;
}
.agreement-sync-bridge-note {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted, #64748b);
  line-height: 1.4;
}
.agreement-sync-products-hint {
  font-size: 0.8125rem;
  font-weight: 400;
}
.agreement-sync-products-head ul.agreement-sync-product-ul {
  margin-top: 0.4rem;
  padding-left: 1.15rem;
}
.agreement-sync-product-row {
  margin: 0.2rem 0;
}

/* Avtaletimer / driftsregistrering */
.agreement-hours-detail-block {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
}
.agreement-hours-status-line {
  margin-top: 6px;
  line-height: 1.45;
}
.agreement-hours-log-form .row {
  margin-bottom: 6px;
}
.agreement-hours-table td {
  font-size: 0.8125rem;
  vertical-align: top;
}

/* Modal «Se avtale» på prosjektkort */
.project-agreement-summary-open-wrap {
  margin: 0 0 14px;
}
.agreement-summary-lead-panel {
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  max-width: 720px;
}
.agreement-summary-lead-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
}
.agreement-summary-lead-hint {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.btn-agreement-summary {
  border: 0;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, color 0.15s ease;
}
.btn-agreement-summary:hover {
  transform: translateY(-1px);
}
.btn-agreement-summary[data-agreement-active="0"] {
  background: #fff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
.btn-agreement-summary[data-agreement-active="1"] {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35) !important;
}
.btn-agreement-summary--neutral {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.btn-agreement-summary--active {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}
/* dialog bruker ofte width:fit-content fra nettleser — tving ~2/3 skjermbredde */
#agreement-summary-dialog.agreement-summary-dialog,
#agreement-summary-dialog.agreement-summary-dialog[open],
.agreement-summary-dialog,
.agreement-summary-dialog[open] {
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-sizing: border-box;
  width: 66vw !important;
  max-width: 66vw !important;
  min-width: 66vw !important;
  margin: auto;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.agreement-summary-dialog::backdrop {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}
.agreement-summary-dialog-inner {
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.agreement-summary-overlays {
  display: none !important;
}
.agreement-summary-header {
  padding: 22px 28px 18px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  z-index: 3;
}
.agreement-summary-header-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 8px;
}
.agreement-summary-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.agreement-summary-scroll-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 2;
  isolation: isolate;
}
@media (max-width: 900px) {
  #agreement-summary-dialog.agreement-summary-dialog,
  #agreement-summary-dialog.agreement-summary-dialog[open],
  .agreement-summary-dialog,
  .agreement-summary-dialog[open] {
    width: 96vw !important;
    max-width: 96vw !important;
    min-width: 0 !important;
  }
}
.agreement-summary-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.agreement-summary-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.agreement-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  font-size: 14px;
  color: #64748b;
}
.agreement-summary-num {
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.agreement-summary-close {
  flex-shrink: 0;
  border: 0;
  background: #f1f5f9;
  color: #475569;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.agreement-summary-close:hover {
  background: #e2e8f0;
}
.agreement-summary-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.agreement-summary-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.agreement-summary-badge--active {
  background: #d1fae5;
  color: #065f46;
}
.agreement-summary-badge--neutral {
  background: #f1f5f9;
  color: #475569;
}
.agreement-summary-badge--muted {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.agreement-summary-badge--delivered {
  background: #dbeafe;
  color: #1e40af;
}
.agreement-summary-hours-inline {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: #475569;
}
.agreement-summary-settings-btn {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.agreement-summary-settings-btn:hover,
.agreement-summary-settings-btn:focus-visible {
  background: #f8fafc;
  border-color: #94a3b8;
}
.agreement-summary-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.35fr);
  gap: 20px;
  padding: 20px 32px 0;
}
@media (max-width: 900px) {
  .agreement-summary-grid {
    grid-template-columns: 1fr;
    padding-left: 20px;
    padding-right: 20px;
  }
}
.agreement-summary-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.agreement-summary-card--full {
  margin: 16px 28px 0;
}
.agreement-summary-grid--incidents {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: 0 32px 20px;
}
@media (max-width: 900px) {
  .agreement-summary-grid--incidents {
    grid-template-columns: 1fr;
    padding-left: 20px;
    padding-right: 20px;
  }
}
.agreement-summary-card--incident-log-auto,
.agreement-summary-card--incident-log-user {
  min-height: 280px;
  max-height: min(52vh, 640px);
  display: flex;
  flex-direction: column;
}
.agreement-summary-card--incident-log-auto .agreement-incident-log,
.agreement-summary-card--incident-log-user .agreement-incident-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.agreement-summary-card--hours {
  min-height: 220px;
}
.agreement-summary-hours-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.agreement-summary-hours-stats {
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agreement-summary-hours-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
}
.agreement-summary-hours-stat dt {
  margin: 0;
  font-weight: 500;
  color: #64748b;
}
.agreement-summary-hours-stat dd {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}
.agreement-summary-hours-hint,
.agreement-summary-hours-empty {
  font-size: 12px;
  margin: 8px 0 0;
}
.agreement-incident-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.agreement-incident-log-head .agreement-summary-card-title {
  margin: 0;
}
.agreement-incident-log-register-link {
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.agreement-incident-log-register-link:hover {
  text-decoration: underline;
}
.agreement-incident-log-section-label {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}
.agreement-incident-log-section-label:first-child {
  margin-top: 0;
}
.agreement-incident-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.agreement-incident-log-link--open {
  font-weight: 600;
}
.agreement-incident-log-link--awaiting {
  color: var(--primary-color, #16a34a) !important;
  font-weight: 600;
}
.agreement-incident-log-link--awaiting:hover,
.agreement-incident-log-link--awaiting:focus-visible {
  color: color-mix(in srgb, var(--primary-color, #16a34a) 82%, #0f172a) !important;
}
.agreement-incident-log-link--answered {
  font-weight: 500;
  color: #475569 !important;
}
.agreement-incident-log-link--answered:hover,
.agreement-incident-log-link--answered:focus-visible {
  color: var(--admin-link, #2563eb) !important;
}
.agreement-incident-log-link--closed {
  font-weight: 500;
  color: #475569 !important;
}
.agreement-incident-log-link {
  display: inline;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  color: var(--admin-link, #2563eb);
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  font-weight: inherit;
}
.agreement-incident-log-link:hover,
.agreement-incident-log-link:focus-visible {
  text-decoration: underline;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}
.agreement-incident-log-link--closed:hover {
  color: var(--admin-link, #2563eb) !important;
  background: transparent !important;
}
.agreement-incident-log-empty {
  margin: 0;
  font-size: 13px;
}
.agreement-monitor-log-list {
  margin-top: 0;
}
.agreement-monitor-log-item {
  display: grid;
  grid-template-columns: minmax(108px, auto) 1fr;
  gap: 10px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
}
.agreement-monitor-log-item--critical {
  border-color: #fecaca;
  background: #fff5f5;
}
.agreement-monitor-log-item--warning {
  border-color: #fed7aa;
  background: #fffbeb;
}
.agreement-monitor-log-when {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}
.agreement-monitor-log-text {
  color: var(--admin-text, #0f172a);
}
.agreement-unified-log-list .agreement-unified-log-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--admin-bg, #f8fafc);
  border: 1px solid var(--admin-border, #e2e8f0);
  color: var(--admin-text, #0f172a);
  font-size: 13px;
  line-height: 1.35;
}
.agreement-unified-log-item--incident {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.agreement-unified-log-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.agreement-unified-log-status {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.3;
}
.agreement-unified-log-status--open {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}
.agreement-unified-log-status--closed {
  color: #475569;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}
.agreement-unified-log-meta {
  display: block;
  color: var(--admin-muted, #64748b);
  font-size: 12px;
  line-height: 1.35;
}
.agreement-unified-log-meta--inline {
  display: inline;
  margin-left: auto;
  white-space: nowrap;
}
.agreement-unified-log-operator {
  color: var(--admin-muted, #475569);
  font-size: 12px;
  font-weight: 600;
}
.agreement-unified-log-item--monitor {
  color: var(--admin-text, #0f172a);
}
.agreement-unified-log-item--critical {
  border-color: #fecaca;
  background: #fff5f5;
}
.agreement-unified-log-item--warning {
  border-color: #fed7aa;
  background: #fffbeb;
}
html[data-hm-theme="dark"] .agreement-unified-log-list .agreement-unified-log-item,
html[data-hm-theme="dark"] .agreement-unified-log-item--monitor-episode,
html[data-hm-theme="dark"] .agreement-unified-log-item--monitor-episode-compact,
html[data-hm-theme="dark"] .agreement-unified-log-item--incident {
  background: var(--admin-surface, #111827) !important;
  border-color: var(--admin-border, #1f2937) !important;
  color: var(--admin-text, #f3f4f6) !important;
}
html[data-hm-theme="dark"] .agreement-unified-log-item--critical {
  background: #3f1d1d !important;
  border-color: #7f1d1d !important;
}
html[data-hm-theme="dark"] .agreement-unified-log-item--warning {
  background: #3b2f14 !important;
  border-color: #92400e !important;
}
html[data-hm-theme="dark"] .agreement-monitor-log-text,
html[data-hm-theme="dark"] .agreement-unified-log-text,
html[data-hm-theme="dark"] .agreement-unified-log-item--monitor,
html[data-hm-theme="dark"] .agreement-unified-log-item a {
  color: var(--admin-text, #f3f4f6) !important;
  -webkit-text-fill-color: var(--admin-text, #f3f4f6) !important;
}
html[data-hm-theme="dark"] .agreement-unified-log-meta,
html[data-hm-theme="dark"] .agreement-unified-log-when,
html[data-hm-theme="dark"] .agreement-unified-log-operator {
  color: var(--admin-muted, #cbd5e1) !important;
  -webkit-text-fill-color: var(--admin-muted, #cbd5e1) !important;
}
.agreement-unified-log-badge {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e2e8f0;
}
.agreement-unified-log-text {
  flex: 1 1 auto;
}
.agreement-unified-log-when {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}
.agreement-unified-log-item--monitor-episode {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}
.agreement-monitor-episode-check {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  margin: 0;
}
.agreement-monitor-episode-check input {
  margin: 2px 0 0;
}
.agreement-monitor-episode-main {
  min-width: 0;
}
.agreement-monitor-episode-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}
.agreement-monitor-episode-head .agreement-incident-log-link {
  font-weight: 700;
  color: #0f172a;
  text-decoration: underline;
}
.agreement-monitor-episode-head .agreement-incident-log-link--awaiting {
  color: var(--primary-color, #16a34a) !important;
}
.agreement-monitor-episode-details {
  margin-top: 8px;
}
.agreement-monitor-episode-details > summary {
  cursor: pointer;
  color: #475569;
  font-size: 12px;
  user-select: none;
}
.agreement-monitor-episode-events {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.agreement-monitor-episode-event {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e2e8f0;
  font-size: 12px;
}
.agreement-unified-log-badge--sub {
  font-size: 10px;
  padding: 1px 5px;
}
.agreement-monitor-episode-log-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.agreement-monitor-episode-log-form input[type="text"] {
  flex: 1 1 180px;
  min-width: 0;
}
.agreement-episode-checkout-form {
  display: grid;
  gap: 8px;
  width: 100%;
}

.agreement-episode-checkout-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground, #0f172a);
}

.agreement-episode-checkout-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.agreement-episode-checkout-row input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
}

.agreement-episode-checkout-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.agreement-monitor-episode-merge-form {
  display: block;
  flex: 0 0 auto;
  padding: 10px 0 4px;
  border-top: 1px solid #e2e8f0;
  margin-top: 4px;
}
.agreement-monitor-episode-merge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.agreement-monitor-episode-merge-hint {
  font-size: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.agreement-monitor-checkout-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #fed7aa;
  background: #fffbeb;
}
.agreement-monitor-checkout-banner-text {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #9a3412;
}
.agreement-monitor-checkout-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.agreement-monitor-checkout-form input[type="text"] {
  flex: 1 1 180px;
  min-width: 140px;
}
.agreement-incident-detail-dialog,
.agreement-incident-detail-dialog[open] {
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-sizing: border-box;
  width: 66vw !important;
  max-width: 66vw !important;
  min-width: 66vw !important;
  margin: auto;
  background: transparent;
  color: var(--admin-text, #0f172a);
  box-shadow: none;
  overflow: hidden;
}
.agreement-incident-detail-dialog::backdrop {
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
}
.agreement-incident-detail-dialog:not([open]) {
  display: none;
}
.agreement-incident-detail-panel {
  display: none !important;
}
.agreement-incident-detail-dialog .agreement-incident-detail-inner {
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #0f172a);
  border: 1px solid var(--admin-border, transparent);
  border-radius: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  padding: 0;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (max-width: 900px) {
  .agreement-incident-detail-dialog,
  .agreement-incident-detail-dialog[open] {
    width: 96vw !important;
    max-width: 96vw !important;
    min-width: 0 !important;
  }
}
.agreement-incident-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
  flex-shrink: 0;
  padding: 18px 20px 12px;
}
.agreement-incident-detail-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 20px 12px;
}
.agreement-incident-customer-panel {
  margin: 0 0 14px;
}
.agreement-incident-customer-panel-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}
.agreement-incident-customer-scroll {
  max-height: 10.5rem;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.5;
}
.agreement-incident-customer-meta {
  margin: 0 0 6px;
  font-size: 12px;
  color: #64748b;
}
.agreement-incident-customer-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #0f172a;
}
.agreement-incident-customer-block {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.agreement-incident-customer-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.agreement-incident-photos {
  margin: 0 0 14px;
}
.agreement-incident-photos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.agreement-incident-photo-thumb {
  display: block;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  cursor: zoom-in;
  width: 120px;
  height: 120px;
}
.agreement-incident-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.agreement-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
}
.agreement-photo-lightbox::backdrop {
  background: rgba(15, 23, 42, 0.92);
}
.agreement-photo-lightbox-img {
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  object-fit: contain;
  background: #0f172a;
}
.agreement-photo-lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.agreement-photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.agreement-incident-detail-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--admin-muted, #64748b);
}
.agreement-incident-detail-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--admin-text, #0f172a);
}
.agreement-incident-detail-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--admin-muted, #64748b);
  line-height: 1.4;
}
.agreement-incident-detail-close {
  border: 0;
  background: var(--admin-button-bg, #0f172a);
  color: var(--admin-button-text, #fff);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.agreement-incident-detail-close:hover {
  filter: brightness(1.1);
}
.agreement-incident-entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.agreement-incident-entry-view {
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--admin-bg, #fff);
  color: var(--admin-text, #0f172a);
}
.agreement-incident-entry-view-head {
  font-size: 13px;
  color: var(--admin-muted, #334155);
  margin-bottom: 6px;
}
.agreement-incident-entry-view-note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--admin-text, #0f172a);
}
.agreement-incident-entry-edit {
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--admin-bg, #f8fafc);
  color: var(--admin-text, #0f172a);
}
.agreement-incident-entry-edit-when {
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
}
.agreement-incident-entry-edit label.muted {
  display: block;
  margin: 8px 0 4px;
  font-size: 12px;
}
.agreement-incident-entry-edit select,
.agreement-incident-entry-edit textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}
.agreement-incident-send-update {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.agreement-incident-detail-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  flex-shrink: 0;
  margin-top: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--admin-border, #e2e8f0);
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #0f172a);
  position: relative;
  z-index: 2;
}
.agreement-incident-detail-footer .btn-secondary {
  align-self: flex-start;
}
.agreement-incident-detail-footer .btn-primary {
  background: #16a34a;
  border: 0;
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}
.agreement-incident-detail-footer .btn-secondary {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}
.agreement-incident-detail-followup {
  margin: 0 0 12px;
  font-size: 13px;
}
.agreement-summary-card-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.agreement-summary-dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px 16px;
  font-size: 14px;
  margin: 0;
}
.agreement-summary-dl dt {
  color: #94a3b8;
  margin: 0;
  font-weight: 500;
}
.agreement-summary-dl dd {
  margin: 0;
  word-break: break-word;
  line-height: 1.45;
}
.agreement-summary-dl dd a {
  color: #2563eb;
  text-decoration: none;
}
.agreement-summary-dl dd a:hover {
  text-decoration: underline;
}
.agreement-summary-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.agreement-summary-portal-tile--span {
  grid-column: span 2;
}
@media (max-width: 1100px) {
  .agreement-summary-portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .agreement-summary-portal-tile--span {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  .agreement-summary-portal-grid {
    grid-template-columns: 1fr;
  }
  .agreement-summary-portal-tile--span {
    grid-column: span 1;
  }
}
.agreement-summary-portal-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  min-height: 100%;
}
.agreement-summary-portal-k {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}
.agreement-summary-portal-v {
  font-size: 14px;
  line-height: 1.4;
  color: #0f172a;
}
.agreement-summary-portal-tile--link .agreement-summary-portal-v a {
  font-weight: 600;
}
.agreement-summary-expand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 32px 24px;
}
@media (min-width: 1200px) {
  .agreement-summary-expand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .agreement-summary-expand-grid {
    grid-template-columns: 1fr;
    padding-left: 20px;
    padding-right: 20px;
  }
}
.agreement-summary-collapsible {
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 14px 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.agreement-summary-collapsible > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 0;
  list-style: none;
}
.agreement-summary-collapsible > summary::-webkit-details-marker {
  display: none;
}
.agreement-summary-collapsible > summary::after {
  content: "▾";
  float: right;
  color: #94a3b8;
  font-size: 12px;
}
.agreement-summary-collapsible[open] > summary::after {
  transform: rotate(180deg);
  display: inline-block;
}
.agreement-summary-summary-meta {
  font-weight: 500;
  color: #64748b;
  margin-left: 6px;
  font-size: 13px;
}
.site-monitor-sla-timer {
  margin: 8px 0 0;
  font-size: 13px;
  color: #334155;
}
.site-monitor-sla-timer--overdue,
.site-monitor-sla-timer-inline.site-monitor-sla-timer--overdue {
  color: #b91c1c;
  font-weight: 600;
}
.site-monitor-sla-timer-inline {
  font-size: 13px;
  color: #475569;
}
.agreement-sla-field-grid {
  margin-bottom: 12px;
}
.agreement-summary-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.agreement-summary-mini-table th,
.agreement-summary-mini-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
}
.agreement-summary-mini-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-weight: 600;
}
.agreement-summary-charge-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.5;
}
.agreement-summary-charge-list li {
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}
.agreement-summary-charger-serial-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.5;
}
.agreement-summary-charger-serial-list--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.25rem;
  row-gap: 0.5rem;
}
.agreement-summary-charger-serial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  padding: 6px 0 6px 0.5rem;
  border-left: 2px solid #cbd5e1;
  border-bottom: 0;
}
.agreement-summary-charger-serial-sn {
  font-weight: 600;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.03em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agreement-summary-charger-serial-count {
  flex-shrink: 0;
  min-width: 1.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
@media (max-width: 520px) {
  .agreement-summary-charger-serial-list--grid {
    grid-template-columns: 1fr;
  }
}
.agreement-hours-charger-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.agreement-hours-charger-select {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--admin-border, #cbd5e1);
  border-radius: 8px;
  font-size: 14px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #0f172a);
}
.agreement-hours-charger-selected {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agreement-hours-charger-selected-empty {
  margin: 0;
  font-size: 13px;
}
.agreement-hours-charger-selected-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #86efac;
  font-size: 13px;
}
.agreement-hours-charger-selected-sn {
  font-weight: 600;
  color: #14532d;
}
.agreement-hours-charger-remove {
  border: 0;
  background: transparent;
  color: #166534;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.agreement-hours-charger-remove:hover {
  color: #14532d;
}
.agreement-hours-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.btn-agreement-hours-quick {
  border: 2px solid var(--admin-border, #0f172a);
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #0f172a);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn-agreement-hours-quick:hover {
  background: var(--admin-bg, #f8fafc);
}
.btn-agreement-hours-quick.is-selected,
.btn-agreement-hours-quick--pick.is-selected {
  background: #15803d !important;
  border: 3px solid #0f172a !important;
  color: #fff !important;
  box-shadow:
    0 5px 0 #0f172a,
    0 10px 24px rgba(15, 23, 42, 0.72) !important;
  transform: translateY(-3px) !important;
  filter: none !important;
}
.btn-agreement-hours-quick.is-selected:hover,
.btn-agreement-hours-quick.is-selected:focus-visible,
.btn-agreement-hours-quick--pick.is-selected:hover,
.btn-agreement-hours-quick--pick.is-selected:focus-visible {
  background: #166534 !important;
  border-color: #0f172a !important;
  color: #fff !important;
  box-shadow:
    0 5px 0 #0f172a,
    0 12px 28px rgba(15, 23, 42, 0.78) !important;
  transform: translateY(-3px) !important;
  filter: none !important;
}
.agreement-hours-quick-btns--in-form {
  margin: 10px 0 0;
}
.btn-agreement-register-incident {
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #10b981;
  color: #fff;
}
.btn-agreement-register-incident:hover {
  background: #059669;
}
.agreement-hours-fieldset[hidden] {
  display: none !important;
}
.dashboard-project-search-panel tr.drilldown-row--clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}
.dashboard-project-search-panel tr.drilldown-row--clickable:hover {
  background: #f1f5f9;
}
.dashboard-project-search-panel tr.drilldown-row--clickable:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}
.agreement-hours-compact-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agreement-hours-compact-list li {
  display: grid;
  grid-template-columns: minmax(140px, auto) auto 1fr;
  gap: 6px 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
}
.agreement-hours-compact-when {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.agreement-hours-compact-dur {
  font-weight: 700;
  color: #0f172a;
}
.agreement-hours-compact-who {
  color: #475569;
}
.agreement-hours-compact-note {
  grid-column: 1 / -1;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
  background: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid #10b981;
}
.agreement-summary-signed-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agreement-summary-signed-list a {
  display: inline-block;
  padding: 8px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}
.agreement-summary-signed-list a:hover {
  background: #e2e8f0;
}
.agreement-summary-footer {
  padding: 0 28px 24px;
}
.agreement-summary-export-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  text-decoration: none;
}
.agreement-summary-export-link:hover {
  background: #f8fafc;
}
.agreement-summary-print-link,
.agreement-summary-footer .agreement-summary-print-link,
.agreement-summary-header-actions .agreement-summary-print-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff !important;
  background: var(--admin-primary, #0f766e) !important;
  border: 1px solid var(--admin-primary, #0f766e) !important;
  border-radius: 10px;
  text-decoration: none !important;
  white-space: nowrap;
  -webkit-text-fill-color: #fff;
}
.agreement-summary-print-link:hover,
.agreement-summary-footer .agreement-summary-print-link:hover,
.agreement-summary-header-actions .agreement-summary-print-link:hover {
  filter: brightness(0.95);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

/* Avtalerapport — utskrift / PDF */
.agr-export-page {
  margin: 0;
  padding: 24px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #0f172a;
  background: #eef2f6;
  line-height: 1.5;
}
.agr-export-toolbar {
  max-width: 920px;
  margin: 0 auto 20px;
}
.agr-export-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.agr-export-print-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff !important;
  background: var(--admin-primary, #0f766e) !important;
  cursor: pointer;
  -webkit-text-fill-color: #fff;
}
.agr-export-print-btn:hover {
  filter: brightness(0.95);
}
.agr-export-back-link {
  font-size: 14px;
  color: #334155;
  text-decoration: none;
}
.agr-export-back-link:hover {
  text-decoration: underline;
}
.agr-export-toolbar-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
}
.agr-export-report {
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.agr-export-report-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  padding: 28px 32px 22px;
  border-bottom: 3px solid var(--admin-primary, #0f766e);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.agr-export-brand {
  flex: 0 0 auto;
}
.agr-export-logo {
  display: block;
  max-height: 52px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.agr-export-logo-fallback {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--admin-primary, #0f766e);
  letter-spacing: -0.02em;
}
.agr-export-report-intro {
  flex: 1 1 240px;
  min-width: 0;
}
.agr-export-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.agr-export-title {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.25;
  color: #0f172a;
}
.agr-export-meta {
  margin: 8px 0 0;
  font-size: 14px;
  color: #64748b;
}
.agr-export-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px 18px;
  padding: 18px 32px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.agr-export-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.agr-export-summary-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.agr-export-summary-value {
  font-size: 14px;
  color: #0f172a;
}
.agr-export-pill {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}
.agr-export-pill--on {
  background: #dcfce7;
  color: #166534;
}
.agr-export-pill--off {
  background: #fee2e2;
  color: #b91c1c;
}
.agr-export-section {
  padding: 22px 32px;
  border-bottom: 1px solid #e2e8f0;
  break-inside: avoid;
}
.agr-export-section-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}
.agr-export-dl {
  display: grid;
  grid-template-columns: minmax(150px, 32%) 1fr;
  gap: 10px 18px;
  margin: 0;
  font-size: 14px;
}
.agr-export-dl dt {
  margin: 0;
  color: #64748b;
  font-weight: 500;
}
.agr-export-dl dd {
  margin: 0;
  color: #0f172a;
}
.agr-export-empty,
.agr-export-lead {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}
.agr-export-scope {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.agr-export-deliveries {
  font-size: 13px;
}
.agr-export-deliveries .muted {
  color: #64748b;
}
.agreement-sync-block--export {
  margin-top: 4px !important;
  line-height: 1.4 !important;
  font-size: 13px !important;
}
.agreement-sync-block--export .agreement-sync-section-li {
  margin-bottom: 8px;
}
.agreement-sync-portals-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}
.agreement-sync-portal-pair {
  display: inline;
}
.agreement-sync-portals-sep {
  color: #cbd5e1;
  user-select: none;
}
.agreement-sync-chargers-compact strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.agr-export-charger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9ch, 1fr));
  column-gap: 2cm;
  row-gap: 0.45rem;
  align-items: start;
}
.agr-export-charger-sn {
  display: block;
  box-sizing: border-box;
  padding: 3px 0 3px 0.5rem;
  border-left: 2px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
@media print {
  .agr-export-charger-grid {
    column-gap: 2cm;
    grid-template-columns: repeat(auto-fill, minmax(9ch, 1fr));
  }
  .agr-export-charger-sn {
    border-left-color: #94a3b8;
  }
}
.agr-export-report-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 32px 22px;
  font-size: 12px;
  color: #94a3b8;
  background: #fff;
}
@media (max-width: 720px) {
  .agr-export-page {
    padding: 12px;
  }
  .agr-export-report-header,
  .agr-export-summary-strip,
  .agr-export-section,
  .agr-export-report-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .agr-export-dl {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .agr-export-dl dt {
    margin-top: 8px;
  }
}
@media print {
  .agr-export-no-print {
    display: none !important;
  }
  .agr-export-page {
    padding: 0;
    background: #fff;
  }
  .agr-export-report {
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .agr-export-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .agr-export-report-header {
    break-after: avoid;
    page-break-after: avoid;
  }
  a[href]::after {
    content: none !important;
  }
}
.agreement-hours-note-dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  max-width: min(640px, 96vw);
  width: 100%;
  background: transparent;
  box-shadow: none;
}
.agreement-hours-note-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}
.agreement-hours-note-dialog:not([open]) {
  display: none;
}
.agreement-hours-note-panel {
  display: none !important;
}
.agreement-hours-note-panel-inner {
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #0f172a);
  border-radius: 14px;
  width: 100%;
  max-width: min(640px, 100%);
  max-height: min(88vh, 800px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}
.agreement-hours-note-panel-inner form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(88vh, 800px);
}
.agreement-hours-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 18px 22px 8px;
}
.agreement-hours-panel-close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--admin-muted, #64748b);
  cursor: pointer;
  padding: 0 4px;
}
.agreement-hours-panel-close:hover {
  color: var(--admin-text, #0f172a);
}
.agreement-hours-note-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 22px 8px;
}
.agreement-hours-note-panel .agreement-hours-dialog-actions {
  flex-shrink: 0;
  padding: 12px 22px 22px;
  border-top: 1px solid var(--admin-border, #e2e8f0);
  background: var(--admin-surface, #fff);
}
.agreement-hours-dialog-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--admin-text, #0f172a);
}
.agreement-hours-fieldset {
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 14px 14px;
  margin: 0 0 14px;
  background: var(--admin-bg, #fff);
  color: var(--admin-text, #0f172a);
}
.agreement-hours-legend {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-muted, #64748b);
  padding: 0 6px;
}
.agreement-hours-mode-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.agreement-hours-radio {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.agreement-hours-log-fields textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--admin-border, #cbd5e1);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #0f172a);
}
.agreement-hours-followup-schedule {
  margin-top: 10px;
  display: grid;
  gap: 4px;
}
.agreement-hours-followup-schedule[hidden] {
  display: none !important;
}
.agreement-hours-followup-schedule select,
.agreement-hours-followup-schedule input[type="datetime-local"] {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}
.agreement-hours-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.btn-agreement-incident-close {
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #1e40af;
  color: #fff;
}
.btn-agreement-incident-close:hover {
  background: #1d4ed8;
}
.agreement-incident-close-form {
  display: block;
}

/* Prosjektside: oppfølgingsbokser sammenlegges når vunnet + utstyr levert + stopp oppfølging */
details.info-box.project-info-collapsible {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0;
  background: #f8fafc;
  overflow: hidden;
}
details.info-box.project-info-collapsible > summary {
  cursor: pointer;
  padding: 12px 14px;
  list-style: none;
  user-select: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
details.info-box.project-info-collapsible > summary::-webkit-details-marker {
  display: none;
}
details.info-box.project-info-collapsible[open] > summary {
  border-bottom: 1px solid #e2e8f0;
}
details.info-box.project-info-collapsible > summary .info-box-title {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 0;
}
details.info-box.project-info-collapsible > summary .info-box-collapsible-meta {
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #64748b;
}
details.info-box.project-info-collapsible .info-box-collapsible-inner {
  padding: 12px 14px 14px;
}

/* ISP / samband – flere linjer per prosjekt */
.isp-connection-block {
  margin-top: 4px;
}
.isp-connection-block-head {
  margin-bottom: 10px;
}
.isp-connection-add-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  vertical-align: middle;
}
.isp-connection-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.isp-connection-row {
  display: grid;
  gap: 10px 12px;
  grid-template-columns: minmax(140px, 1fr) minmax(160px, 1.2fr) minmax(120px, 0.75fr) auto;
  align-items: end;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.isp-connection-field {
  font-size: 13px;
  display: block;
  margin: 0;
}
.isp-connection-field strong {
  display: block;
  color: #334155;
  margin-bottom: 4px;
  font-size: 13px;
}
.isp-connection-field input,
.isp-connection-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
  max-width: 100%;
}
.btn-isp-connection-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-top: 10px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.btn-isp-connection-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}
.btn-isp-connection-remove {
  width: 32px;
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  align-self: end;
}
.btn-isp-connection-remove:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}
.agreement-summary-portal-tile--span .agreement-summary-portal-v {
  display: block;
  margin-top: 2px;
}
@media (max-width: 720px) {
  .isp-connection-row {
    grid-template-columns: 1fr 1fr;
  }
  .isp-connection-field--bridge,
  .btn-isp-connection-remove {
    grid-column: span 1;
  }
}

/* Ladebokser på prosjektet — kompakt tabell + dynamiske rader */
.project-charging-boxes-section {
  margin-top: 14px;
}
.project-charging-boxes-collapsible > summary {
  font-weight: 700;
  color: #0f172a;
  text-transform: none;
  letter-spacing: 0;
}
.project-charging-box-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 6px;
}
.project-charging-box-table th {
  text-align: left;
  border: 1px solid #e5e7eb;
  padding: 4px 6px;
  background: #f8fafc;
  font-weight: 600;
  font-size: 12px;
}
.project-charging-box-table th.col-qty {
  text-align: right;
  width: 4.5rem;
}
.project-charging-box-table th.col-course {
  width: 120px;
}
.project-charging-box-table th.col-act {
  width: 2.25rem;
  padding: 4px;
}
.project-charging-box-table td {
  border: 1px solid #e5e7eb;
  padding: 3px 5px;
  vertical-align: middle;
}
.project-charging-box-table td.col-qty {
  text-align: right;
}
.project-charging-box-table td.col-act {
  text-align: center;
  padding: 2px;
}
.project-charging-box-table select,
.project-charging-box-table input[type="text"],
.project-charging-box-table textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 3px 5px;
  font-size: 13px;
  line-height: 1.35;
  max-width: 100%;
}
.project-charging-box-table td.col-qty input {
  max-width: 4rem;
  text-align: right;
}
.project-charging-box-table textarea {
  min-height: 1.75em;
  resize: vertical;
}
.project-charging-boxes-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.btn-pcb-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.btn-pcb-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}
.btn-pcb-row-remove {
  width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.btn-pcb-row-remove:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}
.project-charging-boxes-hint {
  font-size: 13px;
  display: block;
  margin-top: 6px;
}

/* Bulk-lim inn ladebokser (prosjekt + Prosjekt v2) */
.hm-charger-bulk {
  margin: 12px 0 8px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.hm-charger-bulk > summary {
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
  list-style: none;
}
.hm-charger-bulk > summary::-webkit-details-marker {
  display: none;
}
.hm-charger-bulk > summary::before {
  content: '▸ ';
  color: #64748b;
}
.hm-charger-bulk[open] > summary::before {
  content: '▾ ';
}
.hm-charger-bulk__hint {
  margin: 8px 0 10px;
  font-size: 13px;
  color: #64748b;
}
.hm-charger-bulk__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #334155;
}
.hm-charger-bulk__field select,
.hm-charger-bulk__field textarea,
.hm-charger-bulk__field input[type="text"] {
  width: 100%;
  max-width: 640px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.hm-charger-bulk__field textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  resize: vertical;
}
.hm-charger-bulk__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.project-charging-box-table .col-spot,
.pw-chargers-table .col-spot {
  width: 5.5rem;
  min-width: 4.5rem;
}

.project-charging-box-table .col-location,
.pw-chargers-table .col-location {
  min-width: 8rem;
  max-width: 14rem;
}

.project-charging-box-table .col-location select,
.pw-chargers-table .col-location select {
  width: 100%;
  max-width: 14rem;
}

/* Konflikt-dialog for bulk-import */
.hm-charger-bulk-conflict {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: min(920px, 96vw);
  width: 920px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.hm-charger-bulk-conflict::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.hm-charger-bulk-conflict__inner {
  padding: 16px 18px 18px;
}
.hm-charger-bulk-conflict__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.hm-charger-bulk-conflict__head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.hm-charger-bulk-conflict__x {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.hm-charger-bulk-conflict__intro {
  margin: 0 0 12px;
  font-size: 13px;
  color: #64748b;
}
.hm-charger-bulk-conflict__table-wrap {
  max-height: min(50vh, 420px);
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.hm-charger-bulk-conflict__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.hm-charger-bulk-conflict__table th,
.hm-charger-bulk-conflict__table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}
.hm-charger-bulk-conflict__table th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}
.hm-charger-bulk-conflict__table input[type="text"],
.hm-charger-bulk-conflict__table select {
  width: 100%;
  min-width: 4rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
}
.hm-charger-bulk-conflict__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* CPOC: MAC-konflikt mellom ladere */
.cpoc-mac-conflict-dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: min(960px, 96vw);
  width: 960px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  color: var(--admin-text, #0f172a);
}
.cpoc-mac-conflict-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.cpoc-mac-conflict-inner {
  padding: 16px 18px 18px;
}
.cpoc-mac-conflict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.cpoc-mac-conflict-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.cpoc-mac-conflict-x {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--admin-muted, #64748b);
}
.cpoc-mac-conflict-intro {
  margin: 0 0 6px;
  font-size: 13px;
}
.cpoc-mac-conflict-mac {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}
.cpoc-mac-conflict-table-wrap {
  overflow: auto;
  max-height: min(50vh, 420px);
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 8px;
}
.cpoc-mac-conflict-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cpoc-mac-conflict-table th,
.cpoc-mac-conflict-table td {
  padding: 8px;
  border-bottom: 1px solid var(--admin-border, #e2e8f0);
  vertical-align: middle;
  text-align: left;
}
.cpoc-mac-conflict-table th {
  background: var(--admin-bg, #f8fafc);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--admin-muted, #64748b);
}
.cpoc-mac-conflict-table input[type="text"] {
  width: 100%;
  min-width: 4.5rem;
  padding: 6px 8px;
  border: 1px solid var(--admin-border, #cbd5e1);
  border-radius: 6px;
}
.cpoc-mac-conflict-serial {
  background: var(--admin-bg, #f1f5f9);
  color: var(--admin-muted, #64748b);
  cursor: not-allowed;
}
.cpoc-mac-conflict-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 12px;
}
.cpoc-mac-conflict-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* Admin: Innstillinger-hub */
.hm-settings-page .panel,
.hm-settings-panel {
  max-width: 920px;
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--admin-surface, #fff);
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.hm-settings-page .panel h2,
.hm-settings-panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--admin-text, #0f172a);
}
.hm-settings-page .row,
.hm-settings-panel .row {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.hm-settings-page .row input,
.hm-settings-page .row select,
.hm-settings-page .row textarea,
.hm-settings-panel input:not([type="checkbox"]),
.hm-settings-panel select,
.hm-settings-panel textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}
.hm-settings-page .hint,
.hm-settings-panel .hint {
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}
.hm-settings-page .ok { color: #166534; margin-bottom: 10px; }
.hm-settings-page .err { color: #b91c1c; margin-bottom: 10px; }
.hm-settings-page .panel button,
.hm-settings-panel button {
  background: #0f172a;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
}
.hm-settings-domain-picker {
  display: grid;
  gap: 8px;
  max-width: 480px;
}
.hm-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
}
.hm-settings-tabs a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  color: #334155;
  background: #f8fafc;
}
.hm-settings-tabs a.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}
.hm-settings-tab-muted {
  font-size: 13px;
  color: #94a3b8;
  padding: 8px 10px;
}
.hm-settings-i18n-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.hm-settings-i18n-table th,
.hm-settings-i18n-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.hm-settings-i18n-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.hm-settings-subdomain-embed .hm-card {
  margin-bottom: 14px;
}

/* Site-overvåking — se admin/admin-theme.css (panel + chart-panel) */
.site-monitor-wrap {
  margin: 0 24px 18px;
}

.sm-report-schedule-panel {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border, #e2e8f0);
}

.sm-report-schedule-panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.sm-report-schedule-status {
  background: color-mix(in srgb, var(--primary, #2563eb) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary, #2563eb) 22%, transparent);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.sm-report-schedule-status.is-inactive {
  background: color-mix(in srgb, var(--muted-foreground, #64748b) 8%, transparent);
  border-color: color-mix(in srgb, var(--muted-foreground, #64748b) 18%, transparent);
}

.sm-report-schedule-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.sm-report-schedule-list li {
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.sm-report-schedule-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.sm-report-schedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.sm-report-schedule-actions .button-secondary {
  background: transparent;
  color: var(--foreground, #0f172a);
  border: 1px solid var(--border, #cbd5e1);
}

.agreement-auto-monitor-report-form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  gap: 12px;
  max-width: none;
}

.agreement-auto-monitor-report-dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(520px, 96vw);
  max-width: 96vw;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.agreement-auto-monitor-report-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.agreement-auto-monitor-report-dialog-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.agreement-auto-monitor-report-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.agreement-auto-monitor-report-dialog-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground, #64748b);
}

.agreement-auto-monitor-report-dialog-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.agreement-auto-monitor-report-dialog-close {
  border: 0;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.agreement-auto-monitor-report-dialog .agreement-auto-monitor-report-form {
  padding: 16px 20px 20px;
}

.agreement-auto-monitor-report-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.agreement-unified-log-item--monitor-episode-compact {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.agreement-monitor-episode-check--compact {
  margin-top: 2px;
}

.agreement-auto-monitor-report-title,
.agreement-log-comments-title,
.agreement-episode-report-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.agreement-auto-monitor-report-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.agreement-log-comment-snippet {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: color-mix(in srgb, var(--primary, #2563eb) 10%, transparent);
  color: var(--foreground, #0f172a);
}

.agreement-log-comments-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #e2e8f0);
}

.agreement-log-comments-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.agreement-log-comment-item {
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--background, #fff);
}

.agreement-log-comment-item--reply {
  margin-left: 16px;
  background: color-mix(in srgb, var(--muted-foreground, #64748b) 5%, transparent);
}

.agreement-log-comment-head {
  font-size: 12px;
  color: var(--muted-foreground, #64748b);
  margin-bottom: 6px;
}

.agreement-log-comment-body {
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.agreement-log-comment-sluttlogg {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: color-mix(in srgb, var(--primary, #2563eb) 12%, transparent);
}

.agreement-log-comment-reply-btn {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary, #2563eb);
  font-size: 13px;
  cursor: pointer;
}

.agreement-log-comment-form,
.agreement-episode-report-form {
  display: grid;
  gap: 8px;
  max-width: 520px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--admin-border, #e2e8f0);
  background: var(--admin-bg, #f8fafc);
  color: var(--admin-text, #0f172a);
}

.agreement-log-comment-label,
.agreement-episode-report-title,
.agreement-log-comments-title {
  color: var(--admin-text, #0f172a);
}

.agreement-log-comment-input {
  width: 100%;
  min-height: 72px;
  padding: 8px;
  box-sizing: border-box;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #0f172a);
  border: 1px solid var(--admin-border, #cbd5e1);
  border-radius: 8px;
}

.agreement-log-comment-include {
  font-size: 13px;
  color: var(--admin-text, #0f172a);
}

.agreement-episode-report-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--admin-border, #e2e8f0);
}

.agreement-episode-checkout-form {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--admin-border, #e2e8f0);
  background: var(--admin-bg, #f8fafc);
  color: var(--admin-text, #0f172a);
}

.agreement-episode-checkout-label {
  color: var(--admin-text, #0f172a);
}

.agreement-episode-checkout-row input[type="text"] {
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #0f172a);
  border: 1px solid var(--admin-border, #cbd5e1);
  border-radius: 8px;
  padding: 8px 10px;
}

/* WiFi-simulering: tegnetid (operatør/admin på prosjektside) */
.sim-drawing-time {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--admin-border, #cbd5e1);
  border-radius: 10px;
  background: var(--admin-surface-muted, #f8fafc);
}
.sim-drawing-time-display {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.sim-drawing-time-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-muted, #64748b);
}
.sim-drawing-time-clock {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--admin-text, #0f172a);
}
.sim-drawing-time-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.sim-workflow-form--inline {
  display: inline;
  margin: 0;
}
.btn-sim-workflow--complete {
  border-color: #059669;
  background: #ecfdf5;
  color: #047857;
}
.btn-sim-workflow--complete:hover {
  background: #d1fae5;
}
.sim-drawing-time-hint {
  font-size: 12px;
  margin: 8px 0 0;
  line-height: 1.45;
}

/* Operatørprovisjon */
.oc-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.oc-summary-card {
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--admin-surface, #fff);
}
.oc-summary-card--payable {
  border-color: #86efac;
  background: #f0fdf4;
}
.oc-summary-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-text-muted, #64748b);
  margin-bottom: 4px;
}
.oc-summary-value {
  display: block;
  font-size: 1.25rem;
  color: var(--admin-text, #0f172a);
}
.oc-summary-hint {
  display: block;
  font-size: 11px;
  color: var(--admin-text-muted, #94a3b8);
  margin-top: 4px;
}
.oc-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.oc-filter-tab {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--admin-border, #cbd5e1);
  text-decoration: none;
  font-size: 13px;
  color: var(--admin-text, #334155);
  background: var(--admin-surface, #fff);
}
.oc-filter-tab--active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.oc-operator-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.oc-projects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.oc-projects-table th,
.oc-projects-table td {
  border: 1px solid var(--admin-border, #e5e7eb);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}
.oc-projects-table th {
  background: var(--admin-surface-muted, #f8fafc);
}
.oc-outcome {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.oc-outcome--won { background: #dcfce7; color: #166534; }
.oc-outcome--lost { background: #fee2e2; color: #991b1b; }
.oc-outcome--pending { background: #e0f2fe; color: #0369a1; }
.oc-paid-yes { color: #166534; font-weight: 600; }
.oc-paid-no { color: #b45309; font-weight: 600; }
.button--small {
  padding: 5px 10px;
  font-size: 12px;
}
.button--secondary {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}
.oc-project-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--admin-border, #cbd5e1);
  border-radius: 10px;
  background: #fffbeb;
}
.oc-project-panel-title {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.oc-contribution-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin: 8px 0;
}
.oc-contribution-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}
.oc-contribution-form input[type="text"] {
  min-width: 140px;
  padding: 6px 8px;
  font: inherit;
}

.wifi-sim-status-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--admin-border, #e2e8f0);
}
.project-status-workflow-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--admin-border, #e2e8f0);
}
.project-box-products-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--admin-border, #e2e8f0);
}
.project-box-connection-line {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}
.project-box-products-summary {
  margin-bottom: 10px;
}
.project-box-products-summary.hm-box--static {
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--admin-bg, #f8fafc);
}
.project-box-products-summary-title {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.project-box-products-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.project-box-products-summary-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 13px;
  line-height: 1.45;
  padding: 5px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.project-box-products-summary-item:last-child {
  border-bottom: 0;
}
.project-box-products-summary-item.hm-box--static {
  cursor: default;
}
.project-box-products-qty-details {
  width: 100%;
}
.project-box-products-qty-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}
.project-box-products-qty-details > summary::-webkit-details-marker {
  display: none;
}
.project-box-products-qty-details.hm-box--interactive > summary .project-box-products-qty {
  color: var(--admin-accent, #0f766e);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.project-box-products-qty-details.hm-box--interactive > summary::after {
  content: "▾";
  font-size: 10px;
  color: var(--admin-accent, #0f766e);
  margin-left: 4px;
}
.project-box-products-qty-details.hm-box--interactive[open] > summary::after {
  content: "▴";
}
.project-box-products-qty-breakdown {
  margin: 4px 0 0;
  font-size: 12px;
}
.project-box-products-qty {
  font-weight: 700;
  min-width: 2.2em;
}
.project-box-products-name {
  flex: 1 1 auto;
}
.project-box-products-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Interaktive vs. statiske admin-bokser */
.hm-box--interactive {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hm-box--static {
  cursor: default;
}
.pw-kpi-card.hm-box--interactive {
  border-color: var(--admin-accent, #0f766e);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), inset 3px 0 0 var(--admin-accent, #0f766e);
}
.pw-kpi-card.hm-box--interactive .pw-kpi-summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--admin-accent, #0f766e);
  opacity: 0.85;
  margin-left: 4px;
}
.pw-kpi-card.hm-box--interactive[open] .pw-kpi-summary::after {
  content: "▴";
}
.project-box-incidents-link:not(.project-box-incidents-link--static) {
  border-left: 3px solid var(--admin-accent, #0f766e);
}
.project-box-incidents-link--static {
  border-left: 3px solid transparent;
  opacity: 0.92;
}
.project-box-products-extras,
.project-box-products-empty {
  font-size: 12px;
  margin: 8px 0 0;
  line-height: 1.45;
}
.project-box-chargers-summary {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--admin-border, #e2e8f0);
}
.project-box-chargers-summary-title {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.project-box-chargers-summary-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.project-box-products-action-meta {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.85;
}

.project-box-incidents-block {
  margin: 6px 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--admin-border, #e2e8f0);
}
.project-box-incidents-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  padding: 6px 8px;
  margin: 0 -8px;
  transition: background 0.15s ease;
}
.project-box-incidents-link:not(.project-box-incidents-link--static):hover {
  background: rgba(15, 118, 110, 0.06);
}
.project-box-incidents-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  font-size: 13px;
  line-height: 1.35;
}
.project-box-incidents-label {
  font-weight: 600;
  color: var(--admin-primary, #0f766e);
}
.project-box-incidents-link--static .project-box-incidents-label {
  color: inherit;
}
.project-box-incidents-totals {
  font-weight: 600;
  font-size: 12px;
}
.project-box-incidents-open {
  color: var(--admin-primary, #0f766e);
}
.project-box-incidents-split {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--admin-muted, #64748b);
}
.project-box-incidents-sep {
  opacity: 0.55;
  padding: 0 2px;
}

.project-status-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.project-status-action-meta {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.85;
}
.project-status-action-hint {
  font-size: 12px;
  margin: 8px 0 0;
  line-height: 1.45;
}
.project-products-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(920px, calc(100vw - 32px));
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.project-products-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.project-products-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}
.project-products-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}
.project-products-dialog-title {
  margin: 0;
  font-size: 18px;
}
.project-products-dialog-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.project-products-dialog-body {
  padding: 12px 20px 0;
  overflow: auto;
}
.project-products-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #e2e8f0;
  margin-top: 12px;
}
button:disabled.wifi-sim-open-modal-btn,
button[disabled].wifi-sim-open-modal-btn {
  opacity: 0.55;
  cursor: not-allowed;
}
.wifi-sim-send-history {
  margin-bottom: 10px;
}
.wifi-sim-send-history-title {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.wifi-sim-send-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wifi-sim-send-history-item {
  font-size: 13px;
  line-height: 1.45;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.wifi-sim-send-history-item:last-child {
  border-bottom: 0;
}
.wifi-sim-send-history-when {
  display: inline-block;
  min-width: 108px;
  font-weight: 600;
  margin-right: 6px;
}
.wifi-simulation-send-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(720px, calc(100vw - 32px));
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.wifi-simulation-send-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.wifi-simulation-send-dialog-inner {
  padding: 18px 20px 20px;
}
.wifi-simulation-send-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.wifi-simulation-send-dialog-title {
  margin: 0;
  font-size: 18px;
}
.wifi-simulation-send-dialog-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.wifi-simulation-send-dialog-sub {
  margin: 0 0 12px;
  font-size: 13px;
}
.wifi-simulation-send-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
.wifi-sim-send-file-block {
  display: grid;
  gap: 8px;
}
.wifi-sim-send-file-block-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text, #0f172a);
}
.wifi-sim-send-file-choice {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 6px;
}
.wifi-sim-send-file-choice-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}
.wifi-sim-send-file-choice-option input {
  margin-top: 3px;
}
.wifi-sim-send-file-upload {
  margin-top: 2px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.wifi-send-contribution-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(420px, calc(100vw - 32px));
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.wifi-send-contribution-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.wifi-send-contribution-form {
  padding: 18px 20px 20px;
}
.wifi-send-contribution-title {
  margin: 0 0 8px;
  font-size: 16px;
}
.wifi-send-contribution-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.wifi-send-contribution-form input[type="text"] {
  padding: 8px 10px;
  font: inherit;
}
.wifi-send-contribution-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.project-description-box {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.project-description-box.is-description-collapsed {
  overflow: hidden;
}
.project-description-box.is-description-collapsed .project-description-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.project-description-box .project-description-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
}
.project-description-text-wrap {
  flex: 1 1 auto;
  min-height: 0;
}
.project-description-text-wrap.is-collapsed {
  overflow: hidden;
}
.project-description-text-wrap.is-clamped {
  position: relative;
}
.project-description-text-wrap.is-clamped::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.2em;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0), rgb(248, 250, 252));
}
.project-description-toggle {
  align-self: flex-start;
  flex-shrink: 0;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.project-description-toggle:hover {
  color: #1d4ed8;
}
.project-description-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.project-description-box-head .info-box-title {
  margin: 0;
}
.project-befaring-open-modal-btn {
  flex-shrink: 0;
  font-size: 13px;
  padding: 6px 12px;
}
.project-befaring-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(920px, calc(100vw - 32px));
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.project-befaring-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.project-befaring-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}
.project-befaring-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}
.project-befaring-dialog-title {
  margin: 0;
  font-size: 18px;
}
.project-befaring-dialog-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.project-befaring-dialog-body {
  padding: 12px 20px 0;
  overflow: auto;
}
.project-befaring-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #e2e8f0;
  margin-top: 12px;
}

/* WiFi-sim filer på prosjekt (Status) */
.wifi-sim-project-files-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.wifi-sim-project-files-title {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}
.wifi-sim-project-files-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: 13px;
  line-height: 1.55;
}
.wifi-sim-project-files-item + .wifi-sim-project-files-item {
  margin-top: 4px;
}
.wifi-sim-project-files-label {
  display: inline-block;
  min-width: 9.5rem;
  color: #475569;
}
.wifi-sim-project-files-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  max-width: 42rem;
}
.wifi-simulation-upload-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(520px, calc(100vw - 32px));
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.wifi-simulation-upload-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.wifi-simulation-upload-dialog-inner {
  padding: 18px 20px 20px;
}
.wifi-simulation-upload-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.wifi-simulation-upload-dialog-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}
.wifi-simulation-upload-dialog-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 0 4px;
}
.wifi-simulation-upload-dialog-sub {
  margin: 0 0 12px;
  font-size: 13px;
}
.wifi-simulation-upload-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* CRM e-postmaler + WYSIWYG compose */
.crm-templates-page .topbar,
.crm-templates-page .topbar a {
  color: inherit;
}
.crm-templates-intro {
  max-width: 46rem;
  margin-bottom: 16px;
}
.crm-templates-ok {
  color: #166534;
  margin-bottom: 12px;
}
.crm-templates-err {
  color: #b91c1c;
  margin-bottom: 12px;
}
.crm-templates-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.crm-templates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.crm-templates-table th,
.crm-templates-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}
.crm-templates-table th {
  background: #f8fafc;
}
.crm-templates-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.crm-templates-form-grid label,
.crm-templates-editor-panel > form > label,
.crm-templates-body-label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}
.crm-templates-form-grid input[type=text],
.crm-templates-form-grid input[type=number],
.crm-templates-editor-panel input[type=text],
.crm-templates-editor-panel textarea {
  display: block;
  width: 100%;
  max-width: 720px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
  font-weight: 400;
}
.crm-templates-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.crm-templates-domain-fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px 14px;
  margin: 0 0 14px;
}
.crm-templates-domain-fieldset legend {
  padding: 0 6px;
  font-weight: 600;
}
.crm-templates-domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 12px;
  margin-top: 10px;
}
.crm-templates-domain-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 14px;
}
.crm-templates-domain-hint {
  margin: 10px 0 0;
  font-size: 13px;
}
.crm-templates-placeholder-help {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
}
.crm-templates-placeholder-help code {
  margin-right: 8px;
  font-size: 12px;
}
.crm-templates-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.crm-compose-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.crm-compose-head .button--secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.compose #crm_send_body_html {
  min-height: 220px;
}
.crm-compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.crm-send-preview-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(760px, calc(100vw - 32px));
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.crm-send-preview-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.crm-send-preview-inner {
  padding: 18px 20px 20px;
}
.crm-send-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.crm-send-preview-title {
  margin: 0;
  font-size: 18px;
}
.crm-send-preview-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.crm-send-preview-note {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
}
.crm-send-preview-meta {
  margin: 0 0 8px;
  font-size: 14px;
}
#crm-preview-contact-wrap {
  display: none;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}
#crm-preview-contact-wrap.is-visible {
  display: block;
}
#crm-preview-contact-wrap select {
  display: block;
  margin-top: 6px;
  min-width: 280px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
}
.crm-send-preview-body-wrap {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.crm-send-preview-body-wrap iframe {
  display: block;
  width: 100%;
  min-height: 320px;
  border: 0;
  background: #fff;
}
.crm-send-preview-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.tox-tinymce {
  border-radius: 8px !important;
  border-color: #d1d5db !important;
  max-width: 720px;
}

/* Hendelsesside (admin/incidents.php) */
.incidents-page {
  margin: 24px;
  color: #0f172a;
}
.incidents-layout {
  max-width: none;
  display: grid;
  gap: 0.75rem;
}
.incidents-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.incidents-topbar-links a {
  color: #1d4ed8;
  text-decoration: none;
}
.incidents-toolbar {
  display: grid;
  grid-template-columns: minmax(10.5rem, 15rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  padding: 0.75rem !important;
}
.incidents-filter-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.incidents-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
.incidents-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0;
  text-align: center;
}
.incidents-stat-value {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.1;
}
.incidents-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}
.incidents-stat-card--solo {
  max-width: none;
  text-align: left;
  align-items: flex-start;
  border-right: 1px solid #e5e7eb;
  padding-right: 0.75rem;
}
.incidents-stat-note {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.35;
}
.incidents-section-title {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
}
.incidents-filter-form,
.incidents-export-form {
  display: grid;
  gap: 0.5rem;
}
.incidents-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.45rem;
  align-items: end;
}
.incidents-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.incidents-filter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  min-width: 0;
}
.incidents-filter-meta p {
  margin: 0;
  font-size: 0.75rem;
}
.incidents-filter-actions .button {
  margin: 0;
  flex-shrink: 0;
}
.incidents-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.incidents-input,
.incidents-select {
  padding: 0.35rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font: inherit;
  font-size: 0.8125rem;
  background: #fff;
}
.incidents-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.incidents-fieldset--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.incidents-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #0f172a;
  text-transform: none;
  letter-spacing: normal;
}
.incidents-domain-static {
  display: block;
  padding: 0.35rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #f8fafc;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #0f172a;
  text-transform: none;
  letter-spacing: normal;
  word-break: break-word;
}
.incidents-filter-domain > .muted {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  grid-column: 1 / -1;
}
.incidents-custom-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
@media (max-width: 960px) {
  .incidents-toolbar {
    grid-template-columns: 1fr;
  }
  .incidents-stat-card--solo {
    border-right: 0;
    padding-right: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
  }
}
.incidents-table-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.incidents-table-wrap {
  overflow-x: auto;
}
.incidents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.incidents-table th,
.incidents-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.incidents-table th {
  background: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
}
.incidents-row--drill {
  cursor: pointer;
  transition: background 0.12s ease;
}
.incidents-row--drill:hover {
  background: #f1f5f9;
}
.incidents-row--drill:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}
.incidents-col-desc {
  max-width: 280px;
  word-break: break-word;
}
.incidents-col-project {
  min-width: 140px;
}
.incidents-project-link {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}
.incidents-project-link:hover {
  text-decoration: underline;
}
.incidents-agreement-no {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
}
.incidents-type-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
}
.incidents-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.incidents-badge--open {
  background: #fef3c7;
  color: #92400e;
}
.incidents-badge--checked-out {
  background: #dbeafe;
  color: #1e3a8a;
  white-space: normal;
  line-height: 1.25;
  max-width: 16rem;
}
.incidents-badge--closed {
  background: #dcfce7;
  color: #166534;
}
.incidents-badge--muted {
  background: #f1f5f9;
  color: #64748b;
}
.incidents-table-hint {
  margin-top: 10px;
  font-size: 0.8125rem;
}
.incidents-merge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 700;
}
.incidents-timeline-list {
  display: grid;
  gap: 12px;
}
.incidents-timeline-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
}
.incidents-timeline-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.incidents-timeline-operator {
  margin: 0 0 6px;
  font-size: 0.8125rem;
}
.incidents-timeline-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.incidents-export-panel {
  scroll-margin-top: 16px;
}
.incidents-export-lead {
  margin: 0 0 14px;
}
.incidents-export-note {
  font-size: 0.8125rem;
  margin-top: 10px;
}
.incidents-schedule-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  max-width: 420px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* CPOC (Charge Point Operation Center) */
.cpoc-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cpoc-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
}
.cpoc-section h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.cpoc-table-wrap {
  overflow-x: auto;
}
.cpoc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.cpoc-table th,
.cpoc-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  text-align: left;
  vertical-align: top;
}
.cpoc-table th.hm-sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.cpoc-table th.hm-sortable-th:hover {
  color: var(--primary-color, #0f766e);
}
.cpoc-table th.hm-sortable-th::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0.35;
  border-top: 5px solid currentColor;
}
.cpoc-table th.hm-sortable-th.is-sorted-asc::after {
  opacity: 1;
  border-top: none;
  border-bottom: 5px solid currentColor;
}
.cpoc-table th.hm-sortable-th.is-sorted-desc::after {
  opacity: 1;
  border-top: 5px solid currentColor;
  border-bottom: none;
}
.hm-table-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 420px;
}
.hm-table-search__label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.hm-table-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}
.hm-table-search__input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  border-color: #0f766e;
}
.hm-table-search__meta {
  margin: 0;
  font-size: 13px;
}
.cpoc-table--compact td,
.cpoc-table--compact th {
  padding: 6px 8px;
  font-size: 13px;
}
.cpoc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  align-items: end;
}
.cpoc-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.cpoc-inline-form {
  margin: 0;
}
.cpoc-warning-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cpoc-warning-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.cpoc-warning-item--critical {
  border-left: 3px solid #dc2626;
  padding-left: 10px;
}
.cpoc-warning-item--warning {
  border-left: 3px solid #d97706;
  padding-left: 10px;
}
.cpoc-health-run {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.cpoc-health-snapshots {
  margin-top: 4px;
}

.cpoc-health-snapshots-summary {
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  list-style: none;
}

.cpoc-health-snapshots-summary::-webkit-details-marker {
  display: none;
}

.cpoc-health-snapshots-summary::before {
  content: "▸ ";
  color: #64748b;
  font-size: 12px;
}

.cpoc-health-snapshots[open] > .cpoc-health-snapshots-summary::before {
  content: "▾ ";
}

.cpoc-health-snapshots-body {
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.cpoc-health-items {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
}
.cpoc-health-item--missing,
.cpoc-health-item--unknown_mac {
  color: #dc2626;
}
.cpoc-health-item--weak_rssi,
.cpoc-health-item--unstable {
  color: #d97706;
}
.cpoc-ingest-url {
  word-break: break-all;
  display: inline-block;
  max-width: 100%;
}

.cpoc-ingest-panel {
  border-left: 4px solid var(--border-color, #e2e8f0);
}

.cpoc-ingest-panel--syslog {
  border-left-color: #166534;
}

.cpoc-ingest-panel--webhook {
  border-left-color: #6366f1;
}

.cpoc-ingest-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.cpoc-ingest-head h2 {
  margin: 0;
}

.cpoc-ingest-dest {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  background: #ecfdf5;
  color: #166534;
}

.cpoc-ingest-panel--webhook .cpoc-ingest-dest {
  background: #eef2ff;
  color: #4338ca;
}

.cpoc-ingest-lead {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}
.cpoc-dialog {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 16px 18px;
  max-width: 720px;
  width: calc(100% - 32px);
}
.cpoc-timeline-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
}
.cpoc-timeline-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  font-size: 13px;
}
.cpoc-timeline-item time {
  color: var(--muted-text, #64748b);
  margin-right: 6px;
}
.cpoc-timeline-item--recovered {
  border-left: 3px solid #16a34a;
  padding-left: 8px;
}
.cpoc-timeline-item--ap-changed {
  border-left: 3px solid #2563eb;
  padding-left: 8px;
}
.cpoc-timeline-item--disconnect {
  border-left: 3px solid #94a3b8;
  padding-left: 8px;
}
.cpoc-timeline-ap-shift {
  font-weight: 600;
  color: #1e40af;
}

.cpoc-timeline-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--link-color, #2563eb);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cpoc-timeline-link:hover {
  color: var(--link-hover-color, #1d4ed8);
}

.cpoc-timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.cpoc-timeline-filter {
  border: 1px solid var(--border-color, #e2e8f0);
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
}

.cpoc-timeline-filter.is-active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
  font-weight: 600;
}

.cpoc-timeline-filter:hover {
  background: #f1f5f9;
}

.cpoc-timeline-filter.is-active:hover {
  background: #bfdbfe;
}

/* CPOC global dashboard */
.cpoc-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cpoc-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cpoc-dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 14px;
  align-items: end;
}
.cpoc-filter-span-2 {
  grid-column: span 2;
}
.cpoc-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.cpoc-dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}
.cpoc-dashboard-tab {
  border: 1px solid var(--border-color, #e2e8f0);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--admin-text, #0f172a);
}
/* Fylt pill: alltid lys tekst (slår tema-lenkefarge) */
.cpoc-dashboard-tab.is-active {
  background: var(--admin-button-bg, #166534);
  border-color: var(--admin-button-bg, #166534);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.cpoc-dashboard-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.cpoc-auto-refresh-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-right: 8px;
}
.cpoc-auto-refresh-label input {
  margin: 0;
}

.cpoc-diagnostics-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 12px 0;
  font-size: 15px;
}

.cpoc-diagnostics-alert {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 14px;
  line-height: 1.45;
}

.cpoc-diagnostics-table {
  margin-top: 12px;
  font-size: 13px;
}

.cpoc-diag-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: lowercase;
}

.cpoc-diag-status--parsed {
  background: #dcfce7;
  color: #166534;
}

.cpoc-diag-status--skipped {
  background: #fef9c3;
  color: #854d0e;
}

.cpoc-diag-status--failed {
  background: #fee2e2;
  color: #991b1b;
}

.cpoc-heartbeat-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.cpoc-heartbeat-badge--up {
  background: #dcfce7;
  color: #166534;
}

.cpoc-heartbeat-badge--down {
  background: #fee2e2;
  color: #991b1b;
}

.cpoc-heartbeat-badge--unknown {
  background: #f1f5f9;
  color: #475569;
}

.cpoc-heartbeat-meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
}

.cpoc-ingest-panel--mqtt {
  border-left: 4px solid #7c3aed;
}

.cpoc-ingest-panel--mqtt .cpoc-ingest-dest {
  background: #f5f3ff;
  color: #5b21b6;
}

.cpoc-heartbeat-events {
  margin-top: 12px;
  font-size: 13px;
}

.cpoc-heartbeat-events li {
  margin: 4px 0;
}

.cpoc-diag-status--pending,
.cpoc-diag-status--received {
  background: #e0e7ff;
  color: #3730a3;
}

/* Prosjektarbeidsområde v2 */
.pw-page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pw-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pw-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 4px;
}

.pw-list-header h2 {
  margin: 0;
  flex: 1 1 auto;
}

.pw-list-header .pw-filter-bar {
  margin-bottom: 0;
  flex: 1 1 auto;
}

.pw-list-header .pw-top-nav {
  margin-left: auto;
}

.pw-top-nav a.button.is-active,
.pw-top-nav a.button.button--secondary.is-active {
  background: #dbeafe !important;
  color: #1e40af !important;
  border-color: #93c5fd !important;
  font-weight: 700;
}

.pw-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.pw-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
}

.pw-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

/* Prosjekt v2-faner — speilet også inline i admin/project-workspace.php (vinner over a{!important} i admin-tema). */
.pw-page nav.pw-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 10px !important;
  margin: 12px 0 !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
}

.pw-page nav.pw-tabs a.pw-tab {
  display: inline-flex !important;
  align-items: center !important;
  padding: 10px 16px !important;
  margin: 0 !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

.pw-page nav.pw-tabs a.pw-tab:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  text-decoration: none !important;
}

.pw-page nav.pw-tabs a.pw-tab.is-active {
  background: #0f766e !important;
  border-color: #0f766e !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.35) !important;
}

.pw-page nav.pw-cpoc-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 8px 12px;
  margin: 0 0 12px;
}

.pw-page nav.pw-cpoc-tabs .pw-cpoc-tabs__label {
  font-size: 12px;
  font-weight: 700;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pw-page nav.pw-cpoc-tabs a.pw-cpoc-tab {
  display: inline-flex !important;
  align-items: center !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.pw-page nav.pw-cpoc-tabs a.pw-cpoc-tab:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

.pw-hendelser-grid {
  margin-top: 8px;
}

.pw-project-number {
  color: #0f172a;
  font-size: 15px;
}

.pw-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

html[data-hm-theme="dark"] .pw-badge {
  background: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.pw-convert-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.pw-convert-list li {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.pw-project-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 8px;
  padding: 14px 16px;
}

.pw-project-hero__main {
  flex: 1 1 220px;
  min-width: 0;
}

.pw-project-hero__nav {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin-left: auto;
  flex: 1 1 auto;
}

.pw-form-details summary {
  cursor: pointer;
  font-weight: 600;
}

.pw-readonly-card {
  margin: 0 0 16px;
}

.pw-readonly-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pw-readonly-head h2,
.pw-readonly-head h3 {
  margin: 0;
}

.pw-readonly-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
}

.pw-readonly-fields > div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.pw-readonly-fields dt {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.pw-readonly-fields dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.pw-readonly-fields dd.pw-readonly-empty {
  color: #94a3b8;
  font-weight: 500;
}

.pw-readonly-fields .pw-readonly-wide {
  grid-column: 1 / -1;
}

.pw-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.pw-ops-dashboard {
  margin-top: 16px;
}

.pw-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.pw-kpi-card {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.pw-kpi-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: #f8fafc;
}

.pw-kpi-summary::-webkit-details-marker {
  display: none;
}

.pw-kpi-title {
  font-weight: 700;
  color: #0f172a;
  margin-right: auto;
}

.pw-kpi-meta {
  font-size: 12px;
  color: #64748b;
  width: 100%;
}

.pw-kpi-parking {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  line-height: 1;
}

.pw-kpi-parking__icon {
  display: block;
  flex-shrink: 0;
  color: #64748b;
}

.pw-kpi-parking__num {
  font-variant-numeric: tabular-nums;
}

.pw-kpi-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}

.pw-kpi-pill--ok {
  background: #d1fae5;
  color: #065f46;
}

.pw-kpi-pill--warn {
  background: #fef3c7;
  color: #92400e;
}

.pw-kpi-pill--muted {
  background: #e2e8f0;
  color: #64748b;
}

.pw-kpi-body {
  padding: 12px 16px 16px;
  border-top: 1px solid #e2e8f0;
}

.pw-kpi-facts {
  margin: 0 0 12px;
  padding-left: 18px;
}

.pw-kpi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pw-kpi-card[open] .pw-kpi-summary {
  background: #f1f5f9;
}

.pw-pipeline-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0 2px;
  font-size: 13px;
  color: #64748b;
}

.pw-pipeline-crumb__label {
  font-weight: 600;
}

.pw-pipeline-crumb__sep {
  opacity: 0.5;
}

.pw-pipeline-crumb .pw-badge {
  font-size: 12px;
}

.pw-work-claimed {
  font-size: 12px;
  align-self: center;
}
.pw-work-dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 520px;
  width: calc(100% - 2rem);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22);
}
.pw-work-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.pw-work-dialog-inner {
  padding: 20px 22px;
}
.pw-work-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.pw-work-dialog-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.pw-work-dialog-title {
  margin: 0;
  font-size: 1.15rem;
  color: #0f172a;
}
.pw-work-dialog-close {
  border: none;
  background: #e2e8f0;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #0f172a;
  flex-shrink: 0;
}
.pw-work-dialog-intro {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.4;
}
.pw-work-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pw-work-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.pw-work-chip.is-on {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.pw-work-meta {
  margin: 0 0 10px;
  font-size: 13px;
}
.pw-work-timer {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.pw-work-clock {
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #0f172a;
}
.pw-work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.pw-work-checklist {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: 13px;
}
.pw-work-checklist li {
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}
.pw-work-checklist li.is-ok {
  color: #166534;
}
.pw-work-checklist li.is-miss {
  color: #b45309;
}
.pw-work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 13px;
}
.pw-work-links a,
.pw-work-link-btn {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #0f766e !important;
  -webkit-text-fill-color: #0f766e !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  border-radius: 0 !important;
  cursor: pointer;
}
.pw-work-link-btn:hover,
.pw-work-link-btn:focus-visible,
.pw-work-links a:hover,
.pw-work-links a:focus-visible {
  color: #115e59 !important;
  -webkit-text-fill-color: #115e59 !important;
  background: transparent !important;
  filter: none !important;
  box-shadow: none !important;
  transform: none !important;
}
.pw-work-link-btn:disabled {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  cursor: not-allowed;
  text-decoration: none !important;
}
.pw-work-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
}
.pw-work-done-note {
  margin: 0;
  flex: 1 1 100%;
  font-size: 13px;
}

/* RSSI (felles indikator — speilet i admin-ops.css for CPOC) */
.hm-rssi {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #334155;
}
.hm-rssi__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
  background: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.25);
}
.hm-rssi--ok .hm-rssi__dot { background: #16a34a; box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.22); }
.hm-rssi--warn .hm-rssi__dot { background: #d97706; box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.22); }
.hm-rssi--bad .hm-rssi__dot { background: #dc2626; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.22); }
.hm-rssi--unknown { color: #94a3b8; font-weight: 500; }
.hm-rssi--unknown .hm-rssi__dot { background: #cbd5e1; box-shadow: 0 0 0 2px rgba(203, 213, 225, 0.35); }
.pw-chargers-table th.col-rssi,
.pw-chargers-table td.col-rssi {
  width: 7.5rem;
  white-space: nowrap;
  vertical-align: middle;
}
.pw-chargers-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.pw-chargers-filter {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 8rem;
  font-size: 12px;
  font-weight: 650;
  color: #64748b;
}
.pw-chargers-filter--grow {
  flex: 1 1 10rem;
  min-width: 10rem;
}
.pw-chargers-filter select,
.pw-chargers-filter input {
  font: inherit;
  font-weight: 500;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: #fff;
  min-height: 2.15rem;
}
.pw-chargers-filter-count {
  margin-left: auto;
  font-size: 12px;
  align-self: center;
}
.pw-chargers-row[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .pw-chargers-filter-count {
    margin-left: 0;
    width: 100%;
  }
}

.pw-isp-dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 720px;
  width: calc(100% - 2rem);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.pw-isp-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.pw-isp-dialog-inner {
  padding: 20px 22px;
}

.pw-isp-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.pw-isp-dialog-title {
  margin: 0;
  font-size: 1.15rem;
  color: #0f172a;
}

.pw-isp-dialog-close {
  border: none;
  background: #e2e8f0;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #0f172a;
}

.pw-isp-connection-row {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 0.8fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  margin-bottom: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.pw-isp-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

@media (max-width: 700px) {
  .pw-isp-connection-row {
    grid-template-columns: 1fr;
  }
}

/* CPOC — konfigurasjonsendringer */
.cpoc-config-change {
  margin-bottom: 1.25rem;
}
.cpoc-config-change__title {
  margin: 0 0 4px;
  font-size: 1.15rem;
}
.cpoc-config-change__sub {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
}
.cpoc-config-change__h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cpoc-config-change__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
}
.cpoc-config-change__manual,
.cpoc-config-change__pending,
.cpoc-config-change__history {
  margin-bottom: 1.25rem;
}
.cpoc-config-change__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
}
.cpoc-config-change__form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.cpoc-config-change__form input[type="text"],
.cpoc-config-change__form textarea,
.cpoc-config-change__form select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.cpoc-config-change__form input:focus,
.cpoc-config-change__form textarea:focus,
.cpoc-config-change__form select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  border-color: #0f766e;
}
.cpoc-config-change__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 14px;
}
.cpoc-config-change__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cpoc-config-change__item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
}
.cpoc-config-change__item--pending {
  border-left: 3px solid #d97706;
}
.cpoc-config-change__item.is-focus {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.35);
}
.cpoc-config-change__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}
.cpoc-config-change__pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
}
.cpoc-config-change__snippet {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}
.cpoc-config-change__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.cpoc-config-change__dismiss {
  margin-top: 8px;
}
.pw-config-changes__list li {
  margin-bottom: 4px;
}


