/* ============================================================================
   DHFlow web app - shared look for login + admin/customer shells.
   Same brand tokens as the run inspector: a deep "relay" teal, hairline
   structure, Inter for text / JetBrains Mono for anything that reads like
   a readout (ids, roles, timestamps).
   ============================================================================ */

:root {
  --canvas: #E9EDF1;
  --surface: #FFFFFF;
  --surface-2: #F4F6F9;
  --ink: #15202C;
  --muted: #61728A;
  --faint: #93A1B5;
  --hairline: #DAE0E8;
  --hairline-strong: #C6CFDA;

  --relay: #0E7C86;
  --relay-bright: #14B8C4;

  --ok: #15803D;
  --ok-bg: #E7F4EC;
  --fail: #D6453D;
  --fail-bg: #FBEAE9;
  --run: #B45309;
  --run-bg: #FAF0DF;
  --idle: #94A3B8;

  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r: 9px;
  --shadow: 0 1px 2px rgba(21, 32, 44, .04), 0 6px 20px rgba(21, 32, 44, .05);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--relay);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---- brand mark, reused on the login card + topbar ------------------------ */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--relay);
  position: relative;
  box-shadow: 0 0 0 3px rgba(14, 124, 134, .14);
  flex: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: var(--relay-bright);
  transform: scale(.45);
}

.brand-name {
  font-weight: 600;
  letter-spacing: -.01em;
  font-size: 15px;
}

/* ---- login page ------------------------------------------------------------ */
.login-shell {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px 26px 24px;
}

.login-card .brand {
  margin-bottom: 22px;
}

.login-card h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -.01em;
}

.login-card .sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 20px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
}

.field input:focus {
  outline: none;
  border-color: var(--relay);
  background: var(--surface);
}

.btn-primary {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--relay);
  border: none;
  border-radius: 8px;
  padding: 11px 14px;
  cursor: pointer;
  margin-top: 6px;
}

.btn-primary:hover {
  background: #0c6a73;
}

.sso-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* Separates password login from the SSO buttons below it (and, when present,
   the DHFlow-staff SSO button from the company one above it) - a plain line
   read as "these are the same section", so the two login methods need a
   clearer visual break than just spacing. */
.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.btn-sso {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
}

.btn-sso:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-2);
}

.totp-qr {
  display: flex;
  justify-content: center;
  margin: 4px 0 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  min-height: 168px;
  align-items: center;
}

.totp-secret {
  font-family: var(--mono);
  font-size: 12.5px;
  text-align: center;
  word-break: break-all;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 8px;
  margin-bottom: 16px;
}

.code-input {
  text-align: center;
  letter-spacing: .3em;
  font-family: var(--mono);
  font-size: 18px !important;
}

.alert {
  font-size: 12.5px;
  color: var(--fail);
  background: var(--fail-bg);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 16px;
}

/* ---- app shell (admin / customer dashboards) ------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.role-pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--relay);
  background: rgba(14, 124, 134, .10);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
}

.logout-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.page {
  max-width: 880px;
  margin: 40px auto;
  padding: 0 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card h1 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.card p {
  color: var(--muted);
  margin: 0;
}

/* ---- plain error pages ----------------------------------------------------- */
.plain-shell {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.plain-shell h1 {
  font-size: 40px;
  margin: 0 0 6px;
  color: var(--faint);
  font-family: var(--mono);
}

.plain-shell p {
  color: var(--muted);
  margin: 0 0 16px;
}

/* ---- admin shell (sidebar + content) --------------------------------------- */
.admin-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100% - 56px);
}

.admin-nav {
  background: var(--surface-2);
  border-right: 1px solid var(--hairline);
  padding: 16px 12px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  font-size: 13.5px;
  color: var(--ink);
}

.admin-nav-section-label {
  display: block;
  padding: 10px 12px 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
}

.admin-nav-section-label:first-child {
  padding-top: 2px;
}

/* Sub-groups inside the open company's own block (.admin-nav-company) -
   smaller/tinted so they read as a level below the sidebar's own Overblik/
   Administration labels, not a repeat of them. Left-padding lines up with
   .admin-nav-subitem's own indent below it. */
.admin-nav-section-label-sub {
  padding: 8px 4px 3px 20px;
  color: var(--relay);
  opacity: .6;
}

.admin-nav-company-name+.admin-nav-section-label-sub {
  padding-top: 0;
}

.admin-nav-company {
  margin: -2px 0 8px 12px;
  padding: 6px 6px 6px 10px;
  background: rgba(14, 124, 134, .07);
  border-left: 2px solid var(--relay);
  border-radius: 0 8px 8px 0;
}

.admin-nav-company-name {
  display: block;
  padding: 6px 6px 6px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--relay);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav-subitem {
  padding-left: 16px;
  font-size: 13px;
}

.admin-nav-item:hover:not(.disabled) {
  background: rgba(21, 32, 44, .04);
  text-decoration: none;
}

.admin-nav-item.active {
  background: var(--surface);
  box-shadow: var(--shadow);
  font-weight: 500;
  color: var(--relay);
}

.admin-nav-item.disabled {
  color: var(--faint);
  cursor: default;
}

.admin-nav-soon {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 999px;
}

/* System version footer (DHFlow\Web\SystemVersion) - last thing in the
   sidebar, deliberately quiet/out-of-the-way (it's a debugging aid for
   admins, not a nav destination). */
.admin-nav-version {
  margin-top: 14px;
  padding: 10px 12px 2px;
  border-top: 1px solid var(--hairline);
  font-size: 10.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav-version .mono {
  font-size: 10.5px;
}

.admin-content {
  padding: 24px 28px 40px;
  max-width: 980px;
}

.admin-content-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-content-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.env-pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--relay);
  background: rgba(14, 124, 134, .10);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: lowercase;
}

.hint-text {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted, #6b7280);
}

.primary-btn {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--relay);
  border: 1px solid var(--relay);
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.primary-btn:hover {
  background: #0b6871;
  text-decoration: none;
}

/* ---- flow create form -------------------------------------------------- */
.form-errors {
  font-size: 12.5px;
  color: var(--fail);
  background: var(--fail-bg);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 16px;
}

.form-errors p {
  margin: 0;
}

.form-errors p+p {
  margin-top: 4px;
}

.flow-form {
  max-width: 480px;
}

.form-field {
  display: block;
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 9px 12px;
}

.form-field input:not([type="checkbox"]):not([type="radio"]):focus,
.form-field select:focus {
  outline: none;
  border-color: var(--relay);
  background: var(--surface);
}

.form-field input[type="checkbox"],
.form-field input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
}

.form-hint {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 5px;
}

.trigger-fields {
  border-left: 2px solid var(--hairline);
  padding-left: 14px;
  margin-bottom: 4px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.form-actions .primary-btn {
  margin-left: 0;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
  margin: 28px 0 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card-danger {
  border-color: #f0cfcd;
  background: var(--fail-bg);
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.stat-card-danger .stat-label {
  color: var(--fail);
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.01em;
}

/* Secondary line under .stat-value - e.g. which auth methods are ready/
   missing on the "Opsætning" card, so "Klar"/"2 mangler" isn't just a bare
   count with no indication of *which* ones. */
.stat-note {
  font-size: 10.5px;
  line-height: 1.3;
}

/* Daily run-count bar chart (customer-flow-detail.php) - plain CSS, no
   charting library. Each day is a flex column so the stacked
   success/failed segments sit flush at the bottom regardless of the day's
   total; a zero-run day renders as an empty track via min-height on the
   track itself, not the segments. */
.run-chart-panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.run-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 72px;
  margin-top: 10px;
}

.run-chart-track {
  flex: 1;
  min-width: 4px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}

.run-chart-seg-success {
  background: var(--ok);
}

.run-chart-seg-failed {
  background: var(--fail);
}

.run-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--faint);
}

.admin-table {
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
}

.admin-table-head {
  padding: 8px 14px;
  font-size: 11px;
  color: var(--faint);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
}

.admin-table-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}

/* .admin-table-row-4/-3 set display:grid below - written as compound
   selectors (.admin-table-row.admin-table-row-4) so they always beat the
   plain .admin-table-row's display:flex above, regardless of source order.
   Previously these were separate single-class rules and flex silently won,
   which is why data rows didn't line up under the header columns. */
.admin-table-row.admin-table-row-4,
.admin-table-head.admin-table-row-4 {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr auto;
  gap: 10px;
}

a.admin-table-row:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.admin-table-row:last-child {
  border-bottom: none;
}

.company-row .grow {
  flex: 1;
}

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
  margin-right: 2px;
}

.health-dot.health-ok {
  background: var(--ok);
}

.health-dot.health-bad {
  background: var(--fail);
}

.mono {
  font-family: var(--mono);
}

.small {
  font-size: 11.5px;
}

.muted {
  color: var(--muted);
}

.err-text {
  color: var(--fail);
}

.ok-text {
  color: var(--ok);
}

/* Lets a .stat-card double as a link (e.g. the dashboard's "Opsætning"
   card, which jumps to /settings) without inheriting default anchor blue
   or underline. */
a.stat-card {
  text-decoration: none;
}

a.stat-card:hover {
  border-color: var(--hairline-strong);
  text-decoration: none;
}

.inactive-pill {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
}

.empty-panel {
  color: var(--faint);
  font-size: 13px;
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--hairline);
  border-radius: var(--r);
}

.see-all-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
}

/* ---- mobile bottom nav + company drawer ------------------------------------
   Hidden by default (desktop keeps the sidebar in .admin-nav); the mobile
   media query below flips this around: sidebar hidden, bottom nav shown. */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 10.5px;
  color: var(--muted);
  cursor: pointer;
}

.mobile-nav-item span {
  max-width: 84px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-nav-item svg {
  width: 21px;
  height: 21px;
}

.mobile-nav-item.active {
  color: var(--relay);
}

.company-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(21, 32, 44, .35);
  z-index: 45;
  opacity: 0;
  transition: opacity .18s ease;
}

.company-drawer-backdrop.open {
  display: block;
  opacity: 1;
}

.company-drawer {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 24px rgba(21, 32, 44, .18);
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .2s ease;
}

.company-drawer.open {
  display: block;
  transform: translateY(0);
}

.company-drawer-handle {
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--hairline-strong);
  margin: 0 auto 12px;
}

.company-drawer-head {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--relay);
  padding: 0 6px 8px;
}

.company-drawer-item {
  display: block;
  padding: 12px 10px;
  font-size: 14.5px;
  color: var(--ink);
  border-radius: 8px;
}

.company-drawer-item:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.company-drawer-item.active {
  color: var(--relay);
  font-weight: 500;
}

.company-drawer-exit {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
}

/* ---- mobile run-history drawer ---------------------------------------------
   Same "hidden by default, mobile media query flips it on" split as the
   bottom nav above - and for the same reason: these rules have to sit
   *before* @media (max-width: 760px) in the file, otherwise a later
   equal-specificity base rule would beat the media query's override
   regardless of viewport (source order is the tiebreaker once specificity
   is equal, @media wrapping doesn't change that). */
.run-drawer-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 4px 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.run-drawer-toggle svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
}

.run-drawer-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.run-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(21, 32, 44, .35);
  z-index: 55;
  opacity: 0;
  transition: opacity .18s ease;
}

.run-drawer-backdrop.open {
  opacity: 1;
}

/* Element+class, not just .run-drawer-close, because this button also
   carries .icon-btn (display: inline-flex), which sits later in this file
   at equal specificity and would otherwise win on every viewport, not just
   mobile - a plain .run-drawer-close rule silently lost that fight. */
button.run-drawer-close {
  display: none;
}

@media (max-width: 760px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .admin-content {
    padding-bottom: 84px;
    /* clears the fixed bottom nav */
  }

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

  .admin-table-row-4 {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .flow-detail-grid {
    grid-template-columns: 1fr;
  }

  .run-list {
    max-height: none;
  }

  /* Run history becomes an off-canvas drawer on mobile instead of a
     stacked block above the config/trace, so those get the full width -
     see .run-drawer-toggle/.run-drawer-backdrop below (desktop-hidden by
     default; flipped on here). Taking .run-col out of the flow this way
     (position: fixed) is enough on its own to let .detail-col fill the
     single grid column above. */
  .run-drawer-toggle {
    display: flex;
  }

  .run-drawer-backdrop.open {
    display: block;
  }

  .run-col-head .run-drawer-close {
    display: inline-flex;
  }

  .flow-detail-grid .run-col {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: min(88vw, 360px);
    background: var(--surface);
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    box-shadow: -8px 0 24px rgba(21, 32, 44, .18);
    transform: translateX(100%);
    transition: transform .22s ease;
  }

  .flow-detail-grid .run-col.open {
    transform: translateX(0);
  }
}

/* ---- company overview ------------------------------------------------------ */
.back-link {
  display: inline-block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.company-slug {
  margin: -14px 0 20px;
}

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

.admin-table-row.admin-table-row-3,
.admin-table-head.admin-table-row-3 {
  display: grid;
  grid-template-columns: 1fr 1.6fr auto;
  gap: 10px;
}

.flow-group-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 22px 0 8px;
}

.flow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flow-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1), box-shadow 150ms ease, opacity 150ms ease;
}

/* The dragged card itself - a "lifted" look (bigger shadow, slight scale +
   tilt) rather than just fading, so it visually reads as "picked up" while
   the browser's own drag-ghost follows the cursor. Siblings animate out of
   the way via JS-driven transform (see company-flows.php) - this class only
   ever touches the source card. */
.flow-card.dragging {
  opacity: .9;
  transform: scale(1.02) rotate(-.6deg);
  box-shadow: 0 10px 24px rgba(21, 32, 44, .16);
  cursor: grabbing;
}

.flow-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.flow-card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Drag-and-drop reorder handle (company-flows.php) - draggable="true" sits
   on this element specifically, not the whole .flow-card, so a click on the
   title/pills/buttons elsewhere in the card never accidentally starts a
   drag. JS still moves the ancestor .flow-card on dragstart/drop, this is
   just the grip. */
.flow-card-handle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  color: var(--faint);
  cursor: grab;
  touch-action: none;
  transition: color 120ms ease, background 120ms ease, transform 120ms ease;
}

.flow-card-handle:hover {
  color: var(--relay);
  background: rgba(14, 124, 134, .08);
  transform: scale(1.12);
}

.flow-card-handle:active {
  cursor: grabbing;
}

.flow-card-handle svg {
  width: 14px;
  height: 14px;
}

.flow-card.dragging {
  opacity: .4;
}

.flow-title {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink);
}

.flow-title:hover {
  color: var(--relay);
  text-decoration: none;
}

.trigger-pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--relay);
  background: rgba(14, 124, 134, .10);
  flex: none;
}

.flow-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.fi-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--faint);
}

.flow-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}

.flow-card-actions form {
  margin: 0;
}

.ghost-btn {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.ghost-btn:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
}

/* Always-present nav button inside .flow-card-actions (currently just
   "Konfiguration" - room for more later) - .active marks whichever view
   you're already on, same idea as a tab strip, so it stays put instead of
   appearing/disappearing as you click between runs and the config view. */
.ghost-btn.active {
  color: var(--relay);
  border-color: var(--relay);
  background: rgba(14, 124, 134, .06);
}

/* Destructive action (flow-detail.php's "Slet flow") - same ghost-btn
   shape, just tinted with the same red the .pill.failed state uses, so it
   reads as dangerous without needing a whole separate button style. */
.ghost-btn-danger {
  color: var(--fail);
  border-color: var(--fail);
}

.ghost-btn-danger:hover {
  color: #fff;
  background: var(--fail);
}

/* Bottom-of-card run status (company-flows.php) - sits where the old
   Slå fra/til + Regenerer hemmelighed buttons used to be; those moved to
   the flow-detail page only, this is read-only. Deliberately not very
   tall (see .flow-mini-chart height) - it's a glance-at-the-list signal,
   not the full chart the flow's own page already has. */
.flow-card-run-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}

.flow-mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  flex: 1;
  min-width: 0;
}

.flow-mini-chart-track {
  flex: 1;
  min-width: 2px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--surface-2);
  border-radius: 1px;
  overflow: hidden;
}

.flow-card-lastrun {
  flex: none;
  white-space: nowrap;
}

.pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}

.pill.success {
  color: var(--ok);
  background: var(--ok-bg);
}

.pill.failed {
  color: var(--fail);
  background: var(--fail-bg);
}

/* Passive/"not an error" state - e.g. an auth method a company simply
   hasn't opted into (of the 3 available, most only ever use one). Distinct
   from .failed so it doesn't read as something that needs fixing. */
.pill.neutral {
  color: var(--faint);
  background: var(--surface-2);
}

.flow-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.flow-search-input,
.flow-sort-select {
  font-family: inherit;
  font-size: 12.5px;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.flow-search-input {
  min-width: 200px;
  flex: 1 1 200px;
}

.flow-search-input:focus,
.flow-sort-select:focus {
  outline: none;
  border-color: var(--relay);
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag-pill {
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--muted);
}

.tag-pill:hover {
  border-color: var(--hairline-strong);
}

.tag-pill.active {
  background: var(--relay);
  color: #fff;
  border-color: var(--relay);
}

/* ---- flow detail (config + steps + run history/trace) ---------------------- */
.admin-content-flow {
  max-width: 1180px;
}

.pill.running {
  color: var(--run);
  background: var(--run-bg);
}

.pill.skipped {
  color: var(--muted);
  background: var(--surface-2);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--idle);
  flex: none;
}

.dot.success {
  background: var(--ok);
}

.dot.failed {
  background: var(--fail);
}

.dot.running {
  background: var(--run);
}

.dot.skipped {
  background: var(--faint);
}

.wh-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 12px 0 22px;
}

.wh-url {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
}

.wh-copy {
  font-family: inherit;
  font-size: 11.5px;
  color: var(--relay);
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex: none;
}

.wh-copy:hover {
  border-color: var(--relay);
}

.info-panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 2px 16px;
  margin-bottom: 22px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}

/* Wraps a row's value together with its optional action button (Status/
   Auth/Retention - see flow-detail.php's $triggerRows) so justify-content:
   space-between on .info-row still only ever sees 2 children: the label on
   the left, this group pinned to the right. Rows with no button just render
   an empty gap - harmless, .ghost-btn's own padding is what usually reads
   as "there's a control here", not this wrapper. */
.info-row-value-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-row:last-child {
  border-bottom: none;
}

a.info-row {
  color: inherit;
  text-decoration: none;
}

a.info-row:hover {
  background: var(--surface-2);
}

.info-row-label {
  color: var(--muted);
  flex: none;
}

.info-row-value {
  font-family: var(--mono);
  font-size: 12.5px;
  text-align: right;
  word-break: break-word;
}

.detail-section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
  margin: 22px 0 10px;
}

.flow-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 24px;
  align-items: start;
}

/* Wraps the stats/chart panel + the run-history/config main block (admin
   flow-detail.php) - always stacked, stats on top, same order as
   customer-flow-detail.php's cards-then-chart-then-history. */
.flow-page-layout {
  display: flex;
  flex-direction: column;
}

.flow-stats-panel {
  margin-bottom: 22px;
}

.flow-page-main {
  min-width: 0;
}

.code-panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 22px;
  max-width: 780px;
}

.code-textarea {
  display: block;
  width: 100%;
  min-height: 320px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
  tab-size: 4;
}

.code-textarea:focus {
  outline: none;
  border-color: var(--relay);
  background: var(--surface);
}

/* Once CodeMirror mounts, it replaces the textarea's own box - let it own
   sizing/border instead of stacking two boxes. */
.code-panel .CodeMirror {
  height: auto;
  min-height: 320px;
  font-family: var(--mono);
  font-size: 12.5px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

/* Fullscreen toggle (JS adds/removes this class - see the script at the
   bottom of flow-detail.php). Plain CSS, not a CodeMirror addon, so it
   works identically whether or not CodeMirror ever mounted (i.e. the
   plain-textarea fallback gets a working fullscreen too). */
.code-panel-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 300;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
}

.code-panel-fullscreen .code-textarea,
.code-panel-fullscreen .CodeMirror {
  flex: 1;
  min-height: 0;
  height: 100%;
}

.code-panel-fullscreen .code-actions {
  margin-top: 8px;
  flex: none;
}

.code-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.code-hint {
  font-size: 11.5px;
  color: var(--faint);
}

.promote-panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.promote-panel input[type="text"] {
  flex: 1;
  min-width: 160px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 12px;
}

.version-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

/* ---- "Skift version" modal (SweetAlert2, see .sa-popup theming further
   down) - two panels: .vsw-list on the left (every promotion into this
   environment), .vsw-preview on the right (whichever one is selected). ---- */
.sa-popup.sa-popup-version-switch .swal2-html-container {
  text-align: left;
  margin: 10px 0 0;
}

.vsw {
  display: flex;
  gap: 14px;
  height: min(60vh, 480px);
}

.vsw-list {
  flex: none;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
}

.vsw-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s ease, background-color .12s ease;
}

.vsw-row:hover {
  border-color: var(--hairline-strong);
}

.vsw-row.selected {
  border-color: var(--relay);
  background: rgba(14, 124, 134, .07);
}

.vsw-row.active .vsw-version {
  color: var(--relay);
}

.vsw-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.vsw-version {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.vsw-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.vsw-note {
  font-size: 12px;
  color: var(--ink);
}

.vsw-preview {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 14px 16px;
}

.vsw-preview-head h3 {
  margin: 0 0 2px;
  font-size: 14.5px;
  color: var(--ink);
}

.vsw-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.vsw-step {
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 4px 8px;
}

.vsw-code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  margin: 10px 0 0;
}

@media (max-width: 760px) {
  .vsw {
    flex-direction: column;
    height: auto;
  }

  .vsw-list {
    width: 100%;
    max-height: 160px;
  }

  .vsw-preview {
    max-height: 320px;
  }
}

.run-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 100svh;
  overflow-y: auto;
  padding-right: 2px;
}

.run-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
}

.run-card:hover {
  border-color: var(--hairline-strong);
  text-decoration: none;
}

.run-card.active {
  border-color: var(--relay);
  box-shadow: 0 0 0 1px var(--relay) inset;
}

.run-id {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
}

.run-sub {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  margin-top: 1px;
}

.run-dur {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.trace {
  position: relative;
  padding-left: 22px;
}

.trace::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--hairline);
}

.node {
  position: relative;
  margin-bottom: 10px;
}

.node:last-child {
  margin-bottom: 0;
}

.node-bullet {
  position: absolute;
  left: -22px;
  top: 11px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--idle);
}

.node-bullet.success {
  border-color: var(--ok);
  background: var(--ok-bg);
}

.node-bullet.failed {
  border-color: var(--fail);
  background: var(--fail-bg);
}

.node-bullet.running {
  border-color: var(--run);
  background: var(--run-bg);
}

.node-bullet.skipped {
  border-color: var(--faint);
  background: var(--surface-2);
}

.step {
  display: block;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.step.static {
  padding: 9px 14px;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
}

.step-head::-webkit-details-marker {
  display: none;
}

.step-name {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
}

.step-action {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 999px;
}

.step.static .step-action {
  margin-left: auto;
}

.step-dur {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.step-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--hairline);
}

.io-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 12px 0 6px;
}

pre.json {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

pre.json.error {
  background: var(--fail-bg);
  border-color: #f0cfcd;
  color: var(--fail);
}

.run-summary {
  margin-bottom: 18px;
}

.run-summary h2 {
  font-family: var(--mono);
  font-size: 15px;
  margin: 8px 0 6px;
}

.run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.run-meta span.mono {
  color: var(--ink);
}

.run-ua {
  margin: 6px 0 0;
  word-break: break-word;
}

/* ---- run history header + refresh --------------------------------------- */
.run-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.run-col-head .detail-section-title {
  margin: 0;
}

.run-col-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.run-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.run-filter-select,
.run-filter-date {
  font-family: inherit;
  font-size: 11.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 5px 6px;
}

.run-filter-select {
  flex: 1;
  min-width: 90px;
}

.run-filter-date {
  min-width: 0;
  flex: 1;
}

.run-filter-sep {
  color: var(--faint);
  font-size: 11.5px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}

.icon-btn:hover {
  color: var(--relay);
  border-color: var(--relay);
}

.icon-btn svg {
  width: 13px;
  height: 13px;
}

.icon-btn.spinning svg {
  animation: dhflow-spin .7s linear infinite;
}

@keyframes dhflow-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ---- io labels + maximize -------------------------------------------------- */
.io-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 6px;
}

.io-label-row .io-label {
  margin: 0;
}

.icon-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}

.icon-btn-sm:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
}

.icon-btn-sm svg {
  width: 11px;
  height: 11px;
}

.step-head .icon-btn-sm {
  margin-left: auto;
}

/* ---- SweetAlert2 theming - matches the app's cards/buttons instead of the
   default swal2 look. Selectors are nested under .sa-popup so specificity
   beats swal2's own stylesheet regardless of injection order. ---------------- */
.sa-popup {
  font-family: var(--sans) !important;
  border-radius: 14px !important;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow) !important;
  padding: 26px 24px 22px !important;
}

.sa-popup .swal2-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  padding: 0 0 4px;
}

.sa-popup .swal2-html-container {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 2px 2px;
}

.sa-popup .swal2-radio {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 18px 2px 6px;
}

.sa-popup .swal2-radio label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  margin: 0;
}

.sa-popup .swal2-radio label:hover {
  border-color: var(--hairline-strong);
}

.sa-popup .swal2-radio input {
  accent-color: var(--relay);
  width: 15px;
  height: 15px;
  margin: 0;
  flex: none;
}

.sa-popup .swal2-radio .swal2-label {
  font-size: 13.5px;
  color: var(--ink);
  margin: 0;
}

.sa-popup .swal2-validation-message {
  font-size: 12px;
  border-radius: 6px;
  background: var(--fail-bg);
  color: var(--fail);
}

.sa-popup .swal2-actions {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  gap: 10px;
  justify-content: flex-end;
}

/* NOTE: buttonsStyling:false (set on the Swal.fire calls) means swal2 never
   adds its own .swal2-styled class to the buttons - so these rules target
   .sa-confirm/.sa-cancel directly. They used to also require .swal2-styled,
   which that class never has, so none of this ever matched and the buttons
   fell back to bare unstyled <button> elements. */
.sa-popup .sa-confirm,
.sa-popup .sa-cancel {
  margin: 0;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.2;
}

.sa-popup .sa-confirm {
  font-weight: 600;
  letter-spacing: -.005em;
  color: #fff;
  background: var(--relay);
  border: 1px solid var(--relay);
  border-radius: 9px;
  padding: 10px 20px;
  box-shadow: 0 1px 2px rgba(14, 124, 134, .18), 0 4px 12px rgba(14, 124, 134, .16);
  transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

.sa-popup .sa-confirm:hover {
  background: #0c6a73;
  box-shadow: 0 1px 2px rgba(14, 124, 134, .2), 0 6px 16px rgba(14, 124, 134, .22);
}

.sa-popup .sa-confirm:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(14, 124, 134, .18);
}

.sa-popup .sa-confirm:focus-visible {
  box-shadow: 0 0 0 3px rgba(14, 124, 134, .28);
}

.sa-popup .sa-confirm:disabled {
  opacity: .5;
  box-shadow: none;
  cursor: default;
}

.sa-popup .sa-cancel {
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  padding: 10px 20px;
  box-shadow: none;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.sa-popup .sa-cancel:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
  background: var(--surface-2);
}

.sa-popup .sa-cancel:focus-visible {
  box-shadow: 0 0 0 3px rgba(21, 32, 44, .1);
}

.sa-popup .swal2-close {
  color: var(--faint);
}

.sa-popup .swal2-close:hover {
  color: var(--ink);
  background: transparent;
}

.sa-popup.sa-popup-maximize .swal2-html-container {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 14px 16px;
  max-height: 65vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 6px 2px 0;
}

.sa-popup.sa-popup-maximize.sa-popup-error .swal2-html-container {
  background: var(--fail-bg);
  border-color: #f0cfcd;
  color: var(--fail);
}