/* ============================================================
   DASHBOARD OVERVIEW (pages/dashboard.js — _dx* renderers)
   Pinned hero search, welcome + headline tiles, health card,
   summary chart and activity timeline, above the widget grid.
   Built on the theme tokens in styles.css so dark mode and the
   colour-theme presets carry through.
   ============================================================ */

.dx {
  --dx-num: 'Fraunces', Georgia, 'Times New Roman', serif;
  --dx-card: var(--card-bg);
  --dx-line: var(--border);
  --dx-tint: color-mix(in srgb, var(--accent) 8%, transparent);
  --dx-tint-strong: color-mix(in srgb, var(--accent) 14%, transparent);
  --dx-ok: #059669;
  --dx-warn: #d97706;
  --dx-bad: #e11d48;
  display: flex; flex-direction: column; gap: 16px;
  padding-bottom: 8px;
}
[data-theme="dark"] .dx { --dx-ok: #34d399; --dx-warn: #fbbf24; --dx-bad: #fb7185; }

/* ── Shared atoms ─────────────────────────────────────────────────────────── */
.dx-card {
  background: var(--dx-card); border: 1px solid var(--dx-line); border-radius: 18px;
  box-shadow: var(--shadow-sm); min-width: 0;
}
.dx-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--text-muted); display: inline-flex; align-items: center; gap: 8px;
}
.dx-eyebrow-lg { font-size: 11px; letter-spacing: 2.4px; color: var(--text-secondary); }
.dx-eyebrow-accent { color: var(--accent); letter-spacing: 2.6px; }
.dx-card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-top: 4px; }
.dx-accent { color: var(--accent); }

.dx-icon-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--dx-line);
  background: var(--dx-card); color: var(--accent); display: inline-flex; align-items: center;
  justify-content: center; flex-shrink: 0; transition: background var(--transition), border-color var(--transition);
}
.dx-icon-btn:hover { background: var(--dx-tint); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dx-icon-btn svg { width: 13px; height: 13px; }

/* Status pill: ● OPERATIONAL */
.dx-status {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 600;
  border: 1px solid currentColor; background: color-mix(in srgb, currentColor 8%, transparent);
}
.dx-status.sm { padding: 2px 8px; font-size: 9px; letter-spacing: .9px; text-transform: uppercase; font-weight: 700; }
.dx-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.dx-tone-ok    { color: var(--dx-ok); }
.dx-tone-warn  { color: var(--dx-warn); }
.dx-tone-bad   { color: var(--dx-bad); }
.dx-tone-info  { color: var(--accent); }
.dx-tone-muted { color: var(--text-muted); }
.dx-status.dx-tone-ok, .dx-status.dx-tone-warn, .dx-status.dx-tone-bad,
.dx-status.dx-tone-info, .dx-status.dx-tone-muted { border-color: color-mix(in srgb, currentColor 35%, transparent); }

/* LIVE badge */
.dx-live {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px;
  background: var(--live-bg); color: var(--live); font-size: 8.5px; font-weight: 700; letter-spacing: .8px;   /* platform live green (styles.css) */
}
.dx-live .dx-dot { width: 5px; height: 5px; animation: dxPulse 1.8s ease-in-out infinite; }
@keyframes dxPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Small tag chip (regions / counts) */
.dx-mini {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px;
  font-size: 10px; font-weight: 500; color: var(--text-secondary);
  background: var(--glass-bg-strong); border: 1px solid var(--dx-line); white-space: nowrap;
}
.dx-mini-mono { font-family: var(--font-code); font-size: 9.5px; }

/* Segmented control */
.dx-seg {
  display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--dx-line);
  background: var(--glass-bg-strong); gap: 2px;
}
.dx-seg button {
  padding: 4px 11px; border-radius: 7px; font-size: 11px; font-weight: 500; color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.dx-seg button:hover { color: var(--text-primary); }
.dx-seg button.active { background: var(--dx-card); color: var(--text-primary); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ── Search (inside the welcome card) ─────────────────────────────────────── */
.dx-search {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding-block: 6px 6px;padding-inline: 16px 6px; border-radius: 999px; border: 1px solid var(--dx-line);
  background: var(--dx-card); box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dx-search:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 4px var(--dx-tint), var(--shadow-md); }
.dx-search > svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.dx-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 13px; color: var(--text-primary); padding: 6px 0; }
.dx-search input::placeholder { color: var(--text-muted); }
.dx-kbd {
  font-family: var(--font-code); font-size: 9.5px; padding: 2px 7px; border-radius: 6px; flex-shrink: 0;
  border: 1px solid var(--dx-line); background: var(--glass-bg-strong); color: var(--text-muted);
}
.dx-search-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; flex-shrink: 0;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; transition: background var(--transition);
}
.dx-search-btn:hover { background: var(--accent-dark); }
.dx-search-btn svg { width: 13px; height: 13px; }


/* The welcome card has its own search, so the dashboard hides the header one
   (Ctrl/⌘+K and "/" focus the in-card search there). */
.main-wrap:has(#contentArea .dx) #tbSearch,
.main-wrap:has(#contentArea .dx) #gsTrigger { display: none !important; }

/* In-place search results (the welcome card's and the header's, dashboard.js _dxSr*) */
.dx-sr-wrap { position: relative; }
.dx-sr {
  position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
  display: flex; flex-direction: column; max-height: min(560px, 70vh);
  border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--dx-line));
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--accent) 23%, transparent) 1px, transparent 0) 0 0 / 14px 14px,
    var(--dx-card);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18), 0 6px 18px rgba(15, 23, 42, .08);
  overflow: hidden; animation: dxSrIn .14s ease-out;
}
.dx-sr[hidden] { display: none; }
@keyframes dxSrIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dx-sr { animation: none; } }

.dx-sr-hd {
  display: flex; align-items: center; gap: 8px; padding: 11px 16px; flex-shrink: 0;
  border-bottom: 1px solid var(--dx-line); background: color-mix(in srgb, var(--dx-card) 88%, transparent);
  font-size: 10.5px; color: var(--text-muted);
}
.dx-sr-hd b { font-size: 10.5px; letter-spacing: 1.6px; color: var(--text-secondary); font-weight: 700; }
.dx-sr-dot { opacity: .6; }
.dx-sr-badge {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff;
}
.dx-sr-badge svg { width: 13px; height: 13px; }
.dx-sr-for { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.dx-sr-for svg { width: 12px; height: 12px; }
.dx-sr-for b { letter-spacing: 0; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; }

.dx-sr-body {
  flex: 1; min-height: 0; overflow-y: auto; padding: 12px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start;
  grid-auto-rows: max-content; align-content: start;   /* cards keep their full height; the body scrolls */
}
.dx-sr-body.one { grid-template-columns: minmax(0, 1fr); }
.dx-sr-body::-webkit-scrollbar { width: 5px; }
.dx-sr-body::-webkit-scrollbar-thumb { background: var(--dx-line); border-radius: 3px; }

.dx-sr-group { border: 1px solid var(--dx-line); border-radius: 13px; background: var(--dx-card); overflow: hidden; min-width: 0; }
.dx-sr-ghd {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--dx-line); background: color-mix(in srgb, var(--accent) 3%, var(--dx-card));
}
.dx-sr-gic {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff;
}
.dx-sr-gic svg { width: 14px; height: 14px; }
.dx-sr-glabel { flex: 1; min-width: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-sr-glist {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0;
  border: 1px solid var(--dx-line); color: var(--accent); background: var(--dx-card);
}
.dx-sr-glist:hover { background: var(--dx-tint); }
.dx-sr-glist svg { width: 12px; height: 12px; }
.dx-sr-gcount {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 10.5px; font-weight: 700; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--dx-tint); font-variant-numeric: tabular-nums;
}

.dx-sr-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-top: 1px solid transparent; }
.dx-sr-item + .dx-sr-item { border-top-color: color-mix(in srgb, var(--dx-line) 60%, transparent); }
.dx-sr-item.active { background: var(--dx-tint); }
.dx-sr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dx-sr-title { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-sr-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-sr-item mark { background: transparent; color: var(--accent); font-weight: 700; }
.dx-sr-go {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--glass-bg-strong); color: var(--text-muted); transition: background var(--transition), color var(--transition);
}
.dx-sr-go svg { width: 12px; height: 12px; }
.dx-sr-item.active .dx-sr-go { background: var(--accent); color: #fff; }

.dx-sr-loading { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.dx-sr-loading i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--glass-bg-strong), var(--dx-tint), var(--glass-bg-strong)); background-size: 200% 100%; animation: dxShimmer 1.2s linear infinite; }
.dx-sr-loading i:nth-child(2) { width: 70%; }
.dx-sr-loading i:nth-child(3) { width: 45%; }
@keyframes dxShimmer { to { background-position: -200% 0; } }

.dx-sr-empty { grid-column: 1 / -1; text-align: center; padding: 18px 12px 22px; }
.dx-sr-empty p { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.dx-sr-ft {
  display: flex; align-items: center; gap: 14px; padding: 9px 16px; flex-shrink: 0;
  border-top: 1px solid var(--dx-line); background: color-mix(in srgb, var(--dx-card) 92%, transparent);
  font-size: 11px; color: var(--text-muted);
}
.dx-sr-ft kbd {
  font-family: var(--font-code); font-size: 9.5px; padding: 1px 5px; margin-inline-end: 3px; border-radius: 5px;
  border: 1px solid var(--dx-line); background: var(--glass-bg-strong); color: var(--text-secondary);
}
.dx-sr-live { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; }
.dx-sr-live .dx-dot { color: var(--live); animation: dxPulse 1.8s ease-in-out infinite; }

@media (max-width: 760px) {
  .dx-sr-body { grid-template-columns: minmax(0, 1fr); }
  .dx-sr-ft span:not(.dx-sr-live) { display: none; }
  .dx-sr-for { display: none; }
}


/* Quick links card — top of the right column (slots reuse the .ww-ql-* styles) */
.dx-ql { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 16px; }
.dx-ql-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dx-ql-hd .dx-eyebrow svg { width: 13px; height: 13px; color: var(--accent); }
.dx-ql-count { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
.dx-ql-list { display: flex; flex-direction: column; gap: 8px; }
.dx-ql .ww-ql-slot { min-height: 0; }
.dx-ql .ww-ql-card { padding: 7px 10px; gap: 10px; min-height: 46px; background: var(--dx-card); }
.dx-ql .ww-ql-card-ic { width: 30px; height: 30px; border-radius: 8px; }
.dx-ql .ww-ql-card-ic svg { width: 15px; height: 15px; }
.dx-ql .ww-ql-card-sub { font-size: 11px; }
.dx-ql .ww-ql-slot-acts { top: 50%; transform: translateY(-50%); inset-inline-end: 8px; }
.dx-ql .ww-ql-empty-slot { min-height: 46px; justify-content: flex-start; padding: 0 12px; font-size: 12px; }

/* ── Row layout ───────────────────────────────────────────────────────────── */
.dx-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.dx-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dx-side .dx-activity { flex: 1 1 0; min-height: 260px; }
.dx-side .dx-timeline { flex: 1; min-height: 0; max-height: none; }
/* Fade the last row so it reads as "scroll for more" rather than clipped */
.dx-timeline { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }

/* ── Welcome + tiles ──────────────────────────────────────────────────────── */
/* Dotted grid + a soft accent glow from the top-left (same touch as the 360 hero, .x3-hero).
   Layered backgrounds, not a clipped ::before, so the in-card search results can still overflow. */
.dx-welcome {
  padding: 26px 22px 22px;
  background:
    radial-gradient(color-mix(in srgb, var(--text-muted) 23%, transparent) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(860px 640px at -40px -100px, color-mix(in srgb, var(--accent) 28%, transparent), transparent 72%),
    var(--dx-card);
}
.dx-welcome-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dx-welcome-title { font-size: 27px; font-weight: 800; letter-spacing: -.6px; color: var(--text-primary); margin-top: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.dx-welcome-sub { font-size: 23px; font-weight: 700; letter-spacing: -.5px; color: color-mix(in srgb, var(--text-secondary) 80%, var(--text-muted)); line-height: 1.25; margin-top: 2px; }
.dx-welcome-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dx-welcome-search { margin-top: 18px; }
.dx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 11px; color: var(--text-muted); }
.dx-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.dx-meta-item svg { width: 12px; height: 12px; opacity: .7; }
.dx-meta button.dx-status { cursor: pointer; }

.dx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }

/* Period / freshness line above the tiles */
.dx-tiles-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.dx-tiles-ctx { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.dx-period { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-secondary); }
.dx-period svg { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }
.dx-period b { color: var(--text-primary); font-weight: 600; }
.dx-period select {
  font: inherit; font-size: 11.5px; font-weight: 600; color: var(--text-primary); cursor: pointer;
  padding-block: 3px 3px;padding-inline: 9px 24px; border-radius: 8px; border: 1px solid var(--dx-line); background-color: var(--dx-card);
  /* Safari ignores background/colour on a native select (white box in dark mode); draw the chevron ourselves */
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 11px;
}
.dx-period select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dx-updated { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.dx-updated .dx-dot { color: var(--dx-ok); animation: dxPulse 1.8s ease-in-out infinite; }
.dx-updated.is-stale, .dx-updated.is-stale .dx-dot { color: var(--dx-warn); animation: none; }
.dx-link-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px;
  font-size: 11.5px; font-weight: 600; color: var(--accent); transition: background var(--transition);
}
.dx-link-btn:hover { background: var(--dx-tint); }
.dx-link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dx-link-btn svg { width: 13px; height: 13px; }
.dx-tile {
  display: flex; flex-direction: column; text-align: start; padding: 16px 16px 14px; border-radius: 14px;
  border: 1px solid var(--dx-line); background: var(--dx-card); min-width: 0; font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
button.dx-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 10%, transparent); transform: translateY(-1px); }
.dx-tile-hd { display: flex; flex-wrap: wrap; row-gap: 4px; width: 100%; align-items: center; justify-content: space-between; gap: 6px; min-height: 20px; }
.dx-tile-hd .dx-eyebrow { letter-spacing: 1.5px; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-tile-val {
  font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1.1; letter-spacing: -1px;
  display: block; color: var(--text-primary); margin: 12px 0 10px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dx-tile-val.dx-tone-warn { color: var(--dx-warn); }
.dx-tile-val.dx-tone-bad  { color: var(--dx-bad); }
.dx-tile-val.dx-tone-ok   { color: var(--dx-ok); }
.dx-tile-sub { display: block; font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dx-trend {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; flex-shrink: 0;
  font-size: 9.5px; font-weight: 600; white-space: nowrap; border: 1px solid currentColor;
}
.dx-trend svg { width: 10px; height: 10px; }
.dx-trend.up   { color: var(--accent); background: var(--dx-tint); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.dx-trend.down { color: var(--dx-bad); background: color-mix(in srgb, var(--dx-bad) 8%, transparent); border-color: color-mix(in srgb, var(--dx-bad) 30%, transparent); }
.dx-trend.flat { color: var(--text-muted); background: var(--glass-bg-strong); border-color: var(--dx-line); }

/* "Needs you": a tile with something waiting gets a warm edge and a direct action */
.dx-tile-needs { border-color: color-mix(in srgb, var(--dx-warn) 45%, var(--dx-line)); box-shadow: inset 3px 0 0 var(--dx-warn); }
.dx-tile-act {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap; color: #fff; background: var(--dx-warn);
  transition: filter var(--transition), transform var(--transition);
}
.dx-tile-act:hover { filter: brightness(1.08); transform: translateX(calc(1px * var(--dir))); }
.dx-tile-act:focus-visible { outline: 2px solid var(--dx-warn); outline-offset: 2px; }
.dx-tile-act svg { width: 11px; height: 11px; }
[data-theme="dark"] .dx-tile-act { color: #1c1203; }
.dx-tile-val.dx-tile-val-sm { font-size: 22px; letter-spacing: -.4px; margin: 18px 0 14px; }

/* Tile picker (modal body) */
.dx-pick { display: flex; flex-direction: column; gap: 10px; }
.dx-pick-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12.5px; color: var(--text-secondary); }
.dx-pick-hd b { font-size: 12px; white-space: nowrap; color: var(--text-primary); }
.dx-pick-sep { font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; }
.dx-pick-list { display: flex; flex-direction: column; gap: 6px; }
.dx-pick-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card-bg);
}
.dx-pick-row.on { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: color-mix(in srgb, var(--accent) 5%, var(--card-bg)); }
/* Checkbox and order number sit side by side, both centred on the row */
.dx-pick-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.dx-pick-row input:disabled { cursor: not-allowed; }
.dx-pick-row input:disabled + label { opacity: .5; cursor: not-allowed; }
.dx-pick-row label { flex: 1; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.dx-pick-name { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.dx-pick-pos {
  width: 18px; height: 18px; flex-shrink: 0; margin-inline-start: -4px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.dx-pick-desc { font-size: 11.5px; color: var(--text-muted); }
.dx-pick-move { display: inline-flex; gap: 4px; flex-shrink: 0; }
.dx-pick-move button {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--card-bg);
  color: var(--text-secondary); font-size: 13px; line-height: 1;
}
.dx-pick-move button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.dx-pick-move button:disabled { opacity: .35; cursor: default; }

/* ── Health card ──────────────────────────────────────────────────────────── */
.dx-health { display: flex; flex-direction: column; overflow: hidden; }
.dx-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 20px 0; }
.dx-health-sum { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 14px 20px 16px; border-bottom: 1px solid var(--dx-line); }
.dx-ratio { font-family: var(--dx-num); font-size: 30px; font-weight: 500; line-height: 1; color: var(--text-primary); }
.dx-ratio small { font-size: 18px; color: var(--text-muted); font-weight: 400; }
.dx-health-cap { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }
.dx-health-side { text-align: end; display: flex; flex-direction: column; gap: 3px; }
.dx-health-side strong { font-size: 13px; color: var(--text-primary); }
.dx-health-side span { font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }

.dx-health-list { flex: 1; min-height: 0; max-height: 330px; overflow-y: auto; padding: 4px 12px; }
.dx-health-list::-webkit-scrollbar { width: 4px; }
.dx-health-list::-webkit-scrollbar-thumb { background: var(--dx-line); border-radius: 3px; }
.dx-hrow { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--dx-line); border-radius: 0; text-align: start; width: 100%; font-family: inherit; }
.dx-hrow:last-child { border-bottom: none; }
button.dx-hrow { transition: background var(--transition); }
button.dx-hrow:hover { background: var(--glass-bg-hover); border-radius: 10px; }
.dx-hrow-ic {
  --c: var(--accent);
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--c); color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent);
}
.dx-hrow-ic svg { width: 16px; height: 16px; }
.dx-hrow-body { display: block; flex: 1; min-width: 0; }
.dx-hrow-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-hrow-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.dx-hrow-st:has(.dx-hrow-st-sub) { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.dx-hrow-st-sub { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
.dx-hrow-meta { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-health-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  padding: 12px 16px; border-top: 1px solid var(--dx-line); background: var(--glass-bg-strong);
  font-size: 10.5px; color: var(--text-secondary);
}
.dx-foot-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.dx-foot-item svg { width: 12px; height: 12px; }
.dx-foot-item strong { color: var(--text-primary); }

/* ── Summary chart ────────────────────────────────────────────────────────── */
.dx-chart-card { display: flex; flex-direction: column; }
.dx-card-hd-split { flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--dx-line); }
.dx-chart-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.dx-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.dx-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-secondary); }
.dx-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dx-chart-body { flex: 1; padding: 10px 12px 6px; min-height: 290px; }

/* the tenants as ranked bars (Summary.tsx RankBars): name · bar · figure, one colour, 4px rounded data end */
.dx-rank { display: flex; flex-direction: column; gap: 8px; height: 100%; container-type: inline-size; }
.dx-rank-list { display: flex; flex-direction: column; gap: 2px; }
.dx-rank-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 52px; gap: 14px; align-items: center;
  width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-align: start; }
button.dx-rank-row { cursor: pointer; }
button.dx-rank-row:hover, button.dx-rank-row:focus-visible { background: var(--glass-bg-hover); outline: none; }
.dx-rank-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dx-rank-name b { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-rank-name small { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11px; color: var(--text-muted); }
.dx-rank-name small > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-rank-track { position: relative; height: 10px; border-radius: 0 4px 4px 0; background: color-mix(in srgb, var(--text-muted) 12%, transparent); }
.dx-rank-fill { position: absolute; inset-block: 0; inset-inline-start: 0; min-width: 2px; border-start-end-radius: 4px; border-end-end-radius: 4px;
  background: var(--accent); transition: width .35s ease; }
.dx-rank-fill.zero { min-width: 0; }
.dx-rank-val { text-align: end; font-size: 13px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.dx-rank-val small { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.dx-rank-val.zero { color: var(--text-muted); font-weight: 500; }
.dx-rank-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: auto; padding: 10px 8px 0;
  border-top: 1px solid var(--dx-line); font-size: 11.5px; color: var(--text-muted); align-items: center; }
.dx-rank-all { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent); cursor: pointer; }
.dx-rank-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.dx-rank-all:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .dx-rank-fill { transition: none; } }
/* the departments split by status (Summary.tsx DeptSplit): same row grid as the ranked bars */
.dx-split { display: flex; flex-direction: column; gap: 6px; height: 100%; container-type: inline-size; }
.dx-split .dx-legend b { font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.dx-split-sw { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dx-split-head, .dx-split-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 64px; gap: 14px; align-items: center; padding-inline: 8px; }
.dx-split-head { margin-top: 6px; font-size: 10.5px; font-weight: 600; color: var(--text-muted); }
.dx-split-head span:last-child { text-align: end; }
.dx-split-list { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; }
.dx-split-row { padding-block: 6px; border-radius: 8px; }
.dx-split-row:hover { background: var(--glass-bg-hover); }
.dx-split-bar { display: flex; gap: 2px; height: 10px; min-width: 0; }
.dx-split-seg { flex-basis: 0; min-width: 3px; border-radius: 2px; }
.dx-split-bar .dx-split-seg:first-child { border-start-start-radius: 0; border-end-start-radius: 0; }
.dx-split-bar .dx-split-seg:last-child { border-start-end-radius: 4px; border-end-end-radius: 4px; }
.dx-split-seg.ok, .dx-split-sw.ok { background: var(--dx-ok); }
.dx-split-seg.warn, .dx-split-sw.warn { background: var(--dx-warn); }
.dx-split-seg.bad, .dx-split-sw.bad { background: var(--dx-bad); }
.dx-split-seg.none, .dx-split-sw.none { background: color-mix(in srgb, var(--text-muted) 28%, transparent); }
@container (max-width: 440px) {
  .dx-split-head { display: none; }
  .dx-split-row { grid-template-columns: minmax(0, 1fr) 52px; row-gap: 6px; }
  .dx-split-bar { grid-column: 1 / -1; grid-row: 2; }
}
@container (max-width: 440px) {                     /* a small widget or a phone: the bar goes under the name */
  .dx-rank-row { grid-template-columns: minmax(0, 1fr) 48px; row-gap: 6px; }
  .dx-rank-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ── Activity timeline ────────────────────────────────────────────────────── */
.dx-activity { display: flex; flex-direction: column; overflow: hidden; }
.dx-activity .dx-card-hd { padding-bottom: 16px; border-bottom: 1px solid var(--dx-line); }
.dx-timeline { position: relative; padding-block: 12px 14px;padding-inline: 22px 20px; max-height: 330px; overflow-y: auto; }
.dx-timeline::-webkit-scrollbar { width: 4px; }
.dx-timeline::-webkit-scrollbar-thumb { background: var(--dx-line); border-radius: 3px; }
.dx-tl-item { position: relative; display: flex; align-items: flex-start; gap: 10px; padding-block: 9px 9px;padding-inline: 22px 0; }
.dx-tl-item::before { /* rail */
  content: ''; position: absolute; inset-inline-start: 4px; top: 0; bottom: 0; width: 1.5px; background: var(--dx-line);
}
.dx-tl-item:first-child::before { top: 15px; }
.dx-tl-item:last-child::before { bottom: calc(100% - 15px); }
.dx-tl-dot {
  position: absolute; inset-inline-start: 0; top: 11px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--dx-card), 0 0 0 4.5px color-mix(in srgb, var(--accent) 30%, transparent);
}
.dx-tl-item.is-fail .dx-tl-dot { background: var(--dx-bad); box-shadow: 0 0 0 3px var(--dx-card), 0 0 0 4.5px color-mix(in srgb, var(--dx-bad) 30%, transparent); }
.dx-tl-body { flex: 1; min-width: 0; }
.dx-tl-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-tl-meta { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-tl-meta svg { width: 11px; height: 11px; flex-shrink: 0; }

/* Empty state inside overview cards */
.dx-empty { padding: 26px 12px; }

/* ── Widgets section header ───────────────────────────────────────────────── */
.dx-section-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 6px 2px 0; }
.dx .dash-empty { margin-top: 0; }

/* ── Module widgets (registerDashWidget) ──────────────────────────────────────
   Body container, loading skeleton, and a small kit modules can use so their
   widgets match the dashboard:
     .dxw-stats > .dxw-stat (<b>value</b><span>label</span>[<em>sub</em>])
     .dxw-rows  > .dxw-row  (.dxw-row-main > .dxw-row-title + .dxw-row-sub, .dxw-row-val)
     .dxw-meter > i (style="width:NN%")
     .dxw-foot  (a footer link / button row)                                       */
.dxw-ext { min-height: 60px; }
.dxw-skel { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.dxw-skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--glass-bg-strong), color-mix(in srgb, var(--accent) 8%, transparent), var(--glass-bg-strong)); background-size: 200% 100%; animation: dxShimmer 1.2s linear infinite; }
.dxw-skel i:nth-child(2) { width: 75%; }
.dxw-skel i:nth-child(3) { width: 50%; }
@media (prefers-reduced-motion: reduce) { .dxw-skel i { animation: none; } }

.dxw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.dxw-stat { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--card-bg); min-width: 0; }
.dxw-stat b { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.6px; line-height: 1.1; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dxw-stat span { font-size: 9.5px; font-weight: 600; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-muted); }
.dxw-stat em { font-style: normal; font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dxw-rows { display: flex; flex-direction: column; }
.dxw-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.dxw-row:last-child { border-bottom: 0; }
button.dxw-row { width: 100%; text-align: start; font: inherit; border-radius: 8px; padding-inline: 6px; }
button.dxw-row:hover { background: var(--glass-bg-hover); }
.dxw-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dxw-row-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dxw-row-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dxw-row-val { flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }

.dxw-meter { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.dxw-meter i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .5s ease; }

.dxw-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.dxw-foot:has(.party-code) { justify-content: space-between; align-items: center; }
.dxw-zero { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.dxw-figure { font-variant-numeric: tabular-nums; }
.dxw-row .dxw-meter { margin-block: 4px 2px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .dx-row { grid-template-columns: minmax(0, 1fr); }
  /* Stack: search on top, quick links as a row of three underneath */
  .dx-ql-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dx-side .dx-activity { flex: none; min-height: 0; }
  .dx-health-list, .dx-timeline, .dx-side .dx-timeline { max-height: 300px; }
}
@media (max-width: 760px) {
  .dx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dx-welcome-title { font-size: 22px; }
  .dx-welcome-sub { font-size: 18px; }
  .dx-ql-list { grid-template-columns: minmax(0, 1fr); }
  .dx-kbd { display: none; }
  .dx-welcome-hd { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .dx-tiles { grid-template-columns: minmax(0, 1fr); }
  .dx-search-btn span { display: none; }
}

/* ── Customize menu (welcome card) ────────────────────────────────────────────
   Opened by the welcome card's customize button: Choose Tiles, Edit Widgets,
   Widget Library, Reset to Default, Reload Data and (Org Admins) Dashboard Defaults. */
.dx-welcome-actions { position: relative; }
.dx-icon-btn.is-open { background: var(--dx-tint-strong); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 3px var(--dx-tint); }
.dx-icon-btn.is-locked { color: var(--text-muted); border-style: dashed; cursor: default; }
.dx-icon-btn.is-locked:hover { background: var(--dx-card); border-color: var(--dx-line); }
.dx-cmenu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; width: 300px; max-width: calc(100vw - 32px);
  background: var(--glass-bg-strong, var(--card-bg)); border: 1px solid var(--border); border-radius: 14px; padding: 6px;
  box-shadow: 0 24px 60px rgba(12,26,46,.18), 0 6px 18px rgba(12,26,46,.08);
  animation: dxMenuIn .14s ease-out;
}
@keyframes dxMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dx-cmenu-sec { display: flex; align-items: center; gap: 8px; padding: 9px 12px 3px; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); }
.dx-cmenu-badge { font-size: 9.5px; letter-spacing: .3px; text-transform: none; color: var(--accent); background: var(--dx-tint); border-radius: 999px; padding: 1px 7px; }
.dx-cmenu-hr { height: 1px; background: var(--border); margin: 5px 4px; }
.dx-cmenu-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 9px 12px; border: 0; background: transparent; border-radius: 9px; text-align: start; font-family: inherit; cursor: pointer; color: var(--text-primary); }
.dx-cmenu-item:hover, .dx-cmenu-item:focus-visible { background: var(--glass-bg-hover); outline: none; }
.dx-cmenu-ic { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--text-secondary); display: inline-flex; }
.dx-cmenu-ic svg { width: 18px; height: 18px; }
.dx-cmenu-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dx-cmenu-t { font-size: 13px; font-weight: 700; }
.dx-cmenu-s { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }

/* ── Summary chart + health card as grid widgets ──────────────────────────── */
.widget.dxw-native { padding: 0; }
.widget.dxw-native .dx-chart-body { min-height: 260px; }

/* ── Edit Widgets ──────────────────────────────────────────────────────────── */
.dx-editbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; border-radius: 14px; background: #0b1220; color: #fff;
  box-shadow: 0 12px 30px rgba(12,26,46,.22);
}
.dx-editbar-ic { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 30%, transparent); color: #fff; }
.dx-editbar-ic svg { width: 17px; height: 17px; }
.dx-editbar-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 260px; }
.dx-editbar-t { font-size: 14px; font-weight: 800; }
.dx-editbar-s { font-size: 12px; color: #cbd5e1; font-weight: 500; }
.dx-editbar-for { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding-block: 0 0;padding-inline: 12px 6px; border-radius: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); font-size: 12.5px; font-weight: 600; color: #cbd5e1; }
.dx-editbar-for select { height: 26px; border-radius: 7px; border: 0; background: #fff; color: #0c1a2e; font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 0 6px; max-width: 220px; }
.dx-editbar-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }
.dx-eb-btn { height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.dx-eb-btn svg { width: 15px; height: 15px; }
.dx-eb-btn:hover { background: rgba(255,255,255,.16); }
.dx-eb-ghost { background: transparent; border-color: transparent; color: #cbd5e1; }
.dx-eb-primary { background: var(--accent); border-color: var(--accent); }
.dx-eb-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }

/* ── Divider between the fixed top and the widget grid ────────────────────── */
.dx-divider { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 2px 2px; min-height: 30px; }
.dx-divider-ic { display: inline-flex; color: var(--accent); }
.dx-divider-ic svg { width: 15px; height: 15px; }
.dx-divider-t { font-size: 10.5px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: var(--text-secondary); }
.dx-divider-n {
  height: 20px; min-width: 20px; padding: 0 7px; box-sizing: border-box; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
  background: var(--dx-tint); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.dx-divider-chip { height: 20px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .6px; }
.dx-divider-rule { flex: 1 1 80px; height: 1px; background: var(--border); }
.dx-divider.is-editing .dx-divider-t { color: var(--accent); }
.dx-divider.is-editing .dx-divider-rule { height: 0; background: none; border-top: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.dx-divider-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.dx-divider-acts .btn { display: inline-flex; align-items: center; gap: 6px; }
.dx-divider-acts .btn svg { width: 13px; height: 13px; }
.dx-divider-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.dx-divider-note svg { width: 13px; height: 13px; }

/* Edit mode: the fixed top fades and is marked as outside widget editing. */
.dx.is-editing > .dx-row { position: relative; }
.dx.is-editing > .dx-row > :not(.dx-fixed-badge) { opacity: .5; filter: grayscale(.35); pointer-events: none; user-select: none; }
.dx-fixed-badge {
  position: absolute; top: 14px; left: 50%/* phys */; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 14px; border-radius: 999px;
  background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  font-size: 12px; font-weight: 700; color: var(--text-secondary); white-space: nowrap;
}
.dx-fixed-badge svg { width: 13px; height: 13px; flex-shrink: 0; }
@media (max-width: 760px) {
  .dx-divider-acts { width: 100%; }
  .dx-fixed-badge { white-space: normal; max-width: calc(100% - 24px); height: auto; padding: 6px 12px; }
}

.dx.is-editing .widget-grid { padding: 14px; border-radius: 22px; border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); background: var(--dx-tint); }
.dx.is-editing .widget { border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
.dx.is-editing .widget:hover { box-shadow: var(--shadow-md); }

.dxw-edit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px; margin-bottom: 12px; border-radius: 11px; background: var(--glass-bg-strong, var(--body-bg)); border: 1px solid var(--border); }
.widget.dxw-native .dxw-edit { margin: 12px 14px 0; }
.dxw-grip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding-block: 0 0;padding-inline: 6px 10px; border-radius: 8px; flex: 1 1 auto; min-width: 0; cursor: grab; color: var(--text-secondary); font-size: 11.5px; font-weight: 700; user-select: none; touch-action: none; }
.dxw-grip:hover { background: var(--dx-tint); color: var(--accent); }
.dxw-grip svg { width: 15px; height: 15px; flex-shrink: 0; }
.dxw-grip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dxw-ib { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; flex-shrink: 0; }
.dxw-ib svg { width: 13px; height: 13px; }
.dxw-ib:hover { border-color: var(--accent); color: var(--accent); }
.dxw-rm:hover { border-color: color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }
.dxw-sizes { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card-bg); flex-shrink: 0; }
.dxw-sizes button { height: 26px; min-width: 30px; padding: 0 7px; border: 0; border-inline-start: 1px solid var(--border); background: transparent; font-family: inherit; font-size: 11px; font-weight: 800; color: var(--text-muted); cursor: pointer; }
.dxw-sizes button:first-child { border-inline-start: 0; }
.dxw-sizes button:hover:not(:disabled):not(.on) { background: var(--dx-tint); color: var(--accent); }
.dxw-sizes button.on { background: var(--accent); color: #fff; }
.dxw-sizes button:disabled { opacity: .35; cursor: not-allowed; }

/* Drag states (SortableJS): the drop spot is a tinted outline, the dragged card lifts. */
.dxw-ghost { border: 2px solid var(--accent) !important; background: color-mix(in srgb, var(--accent) 10%, var(--dx-card)) !important; box-shadow: none !important; }
.dxw-ghost > * { opacity: .25; }
.dxw-chosen { box-shadow: 0 0 0 3px var(--dx-tint-strong); }
.dxw-drag { opacity: .96 !important; box-shadow: 0 30px 60px rgba(12,26,46,.28) !important; cursor: grabbing !important; }
.dxw-drag .dxw-grip { cursor: grabbing; }

@media (max-width: 760px) {
  .dx-editbar { position: static; }
  .dx-editbar-acts { margin-inline-start: 0; width: 100%; }
  .dx-editbar-for { width: 100%; }
  .dxw-grip span { display: none; }
}

/* ── Internal Setup ▸ Dashboard (pages/org_dashboard.js) ─────────────────── */
.od { display: flex; flex-direction: column; gap: 16px; }
.od-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.od-flex { display: flex; flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; }
.od-grow { flex: 1 1 280px; min-width: 0; }
.od-t { font-size: 15px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-d { font-size: 12.5px; color: var(--text-muted); font-weight: 500; margin-top: 3px; line-height: 1.5; }
.od-muted { font-size: 11.5px; color: var(--text-muted); margin-inline-start: 6px; }
td > .od-muted:first-child, div.od-muted { margin-inline-start: 0; }
.od-switch-lbl { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; color: var(--text-primary); cursor: pointer; }
.od-tg { border: 0; padding: 0; }
.od-tg:disabled { opacity: .45; cursor: not-allowed; }
.od-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.od-btns .btn svg { width: 14px; height: 14px; }
.od-map { width: 170px; flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--glass-bg-strong, var(--body-bg)); }
.od-map i { display: block; height: 14px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.od-map-empty { font-size: 11px; color: var(--text-muted); text-align: center; display: block; }
.od-table { margin-top: 2px; }
/* Fixed columns: switching Can Customize (and the Locked badge) must never re-flow the table. */
.od-table table { table-layout: fixed; min-width: 860px; }
.od-table .od-c-layout { width: 170px; } .od-table .od-c-people { width: 90px; }
.od-table .od-c-cc { width: 170px; } .od-table .od-c-acts { width: 290px; }
.od-role { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.od-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.od-new { margin-inline-start: 2px; }
.od-new-row td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.od-cc { display: flex; align-items: center; gap: 8px; }
.od-locked[hidden] { display: inline-flex; visibility: hidden; }   /* keep its space so nothing shifts */
.od-acts { text-align: end; white-space: nowrap; }
.od-acts .btn + .btn { margin-inline-start: 6px; }
.od-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.od-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.od-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.od-opt.on { border: 1.5px solid var(--accent); background: var(--dx-tint, color-mix(in srgb, var(--accent) 8%, transparent)); }
.od-opt input { accent-color: var(--accent); margin-top: 2px; }
.od-opt-t { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
@media (max-width: 760px) { .od-opts { grid-template-columns: 1fr; } .od-map { width: 100%; } }

/* Narrow (size S) health card: one tag, status as a dot, so rows stay one line tall. */
.dx-health { container-type: inline-size; }
@container (max-width: 290px) {
  .dx-hrow { gap: 10px; padding: 10px 4px; }
  .dx-hrow-ic { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
  .dx-hrow-tags .dx-mini:nth-child(n+2) { display: none; }
  .dx-hrow-st .dx-status { font-size: 0; padding: 0; width: 12px; height: 12px; justify-content: center; border-radius: 50%; }
  .dx-hrow-st .dx-status .dx-dot { width: 6px; height: 6px; }
  .dx-hrow-st-sub { display: none; }
  .dx-health-foot { display: none; }
}
/* Keep the section header clear of the sticky edit bar when scrolled to. */
.dx.is-editing #dashGrid { scroll-margin-top: 150px; }
.dx.is-editing .widget:not(.span-2):not(.span-3):not(.span-4) .dxw-grip span { display: none; }

.dx-hrow-st { display: inline-flex; flex-shrink: 0; }
@container (min-width: 291px) { .dx-hrow-st[data-tip] { pointer-events: none; } }

/* ── Widget Library drawer (dashboard.js ▸ _renderDrawerContent) ──────────────
   Soft Tint header, search + On Dashboard / Available switch + category chips,
   grouped rows with a default-size glyph, labelled Add / Remove, count footer. */
.dash-drawer { width: 440px; background: var(--card-bg); --fm-surface: var(--card-bg); }
.wl-head { position: relative; flex-shrink: 0; }
.wl-head .fm-hero { padding-inline-end: 56px; }
.wl-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; width: 32px; height: 32px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: color-mix(in srgb, var(--card-bg) 70%, transparent); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.wl-close:hover { color: var(--text-primary); background: var(--card-bg); }
.wl-close svg { width: 15px; height: 15px; }

.wl-tools { flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.wl-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--body-bg); color: var(--text-muted); transition: border-color var(--transition), box-shadow var(--transition); }
.wl-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--dx-tint, color-mix(in srgb, var(--accent) 12%, transparent)); }
.wl-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.wl-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-family: inherit; font-size: 13px; color: var(--text-primary); }
.wl-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; height: 38px; box-sizing: border-box; padding: 3px; border-radius: 10px; background: var(--body-bg); border: 1px solid var(--border); }
.wl-seg button { height: 100%; border: 0; border-radius: 8px; background: transparent; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.wl-seg button span { font-size: 10.5px; font-weight: 700; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--text-muted) 14%, transparent); color: var(--text-muted); }
.wl-seg button.on { background: var(--card-bg); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,.10); }
.wl-seg button.on span { background: var(--accent); color: #fff; }
/* Two rows, one height (38px), one radius, full width: [search | category] then the switch. */
.wl-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 8px; }
.wl-cat { position: relative; display: block; }
.wl-cat::after { content: ''; position: absolute; inset-inline-end: 13px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-inline-end: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); pointer-events: none; }
.wl-cat select { width: 100%; height: 38px; padding-block: 0 0;padding-inline: 12px 32px; border: 1px solid var(--border); border-radius: 10px; background: var(--body-bg); color: var(--text-primary); font-family: inherit; font-size: 12.5px; font-weight: 700; appearance: none; -webkit-appearance: none; cursor: pointer; text-overflow: ellipsis; }
.wl-cat select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--dx-tint, color-mix(in srgb, var(--accent) 12%, transparent)); }

.wl-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 16px 16px; }
.wl-group-hd { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 10px 2px 6px; background: var(--card-bg); font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); }
.wl-group-hd span:last-child { letter-spacing: 0; font-size: 10.5px; }
.wl-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--card-bg); transition: border-color var(--transition), box-shadow var(--transition); }
.wl-item:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow-sm); }
.wl-item.is-on { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: color-mix(in srgb, var(--accent) 4%, var(--card-bg)); }
.wl-ic { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 10%, var(--card-bg)); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.wl-item.is-on .wl-ic { background: var(--accent); color: #fff; border-color: var(--accent); }
.wl-ic svg { width: 17px; height: 17px; }
.wl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wl-t { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.wl-t > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.wl-on { flex-shrink: 0; font-size: 9.5px; font-weight: 800; letter-spacing: .3px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 999px; padding: 2px 7px; }
.wl-d { font-size: 11.5px; line-height: 1.45; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wl-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 10.5px; font-weight: 600; color: var(--text-secondary); }
.wl-size { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: var(--text-primary); }
.wl-glyph { display: inline-grid; grid-template-columns: repeat(6, 4px); gap: 1.5px; }
.wl-glyph b { height: 9px; border-radius: 1.5px; background: color-mix(in srgb, var(--text-muted) 28%, transparent); }
.wl-glyph b.on { background: var(--accent); }
.wl-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); opacity: .6; }
.wl-btn { flex-shrink: 0; align-self: center; height: 32px; padding: 0 12px; border-radius: 9px; font-family: inherit; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; transition: all var(--transition); }
.wl-btn svg { width: 14px; height: 14px; }
.wl-btn.is-add { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.wl-btn.is-add:hover { background: var(--accent-dark, var(--accent)); }
.wl-btn.is-rm { background: var(--card-bg); border: 1px solid var(--border); color: var(--text-secondary); }
.wl-btn.is-rm:hover { border-color: color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); background: color-mix(in srgb, var(--red) 7%, transparent); }
.wl-empty { padding: 30px 8px; }

.wl-foot { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--glass-bg-strong, var(--card-bg)); }
.wl-count { flex: 1; font-size: 12px; color: var(--text-muted); }
.wl-count strong { color: var(--text-primary); }

/* ── Your Widgets grid: 12 columns, same 16px gap as the fixed top row ──────────
   Sizes (stored 1–4): S = 4 cols (⅓) · M = 6 (½) · L = 8 (⅔) · XL = 12 (full),
   so L + S lines up with the welcome card + Quick Links / Recent Activity above. */
.dx .widget-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dx .widget-grid > .widget        { grid-column: span 4; }
.dx .widget-grid > .widget.span-2 { grid-column: span 6; }
.dx .widget-grid > .widget.span-3 { grid-column: span 8; }
.dx .widget-grid > .widget.span-4 { grid-column: span 12; }
/* Top row stacks at 1180px: widgets go to halves and full rows. */
@media (max-width: 1180px) {
  .dx .widget-grid > .widget, .dx .widget-grid > .widget.span-2 { grid-column: span 6; }
  .dx .widget-grid > .widget.span-3, .dx .widget-grid > .widget.span-4 { grid-column: span 12; }
}
@media (max-width: 760px) {
  .dx .widget-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .dx .widget-grid > .widget, .dx .widget-grid > .widget[class*="span-"] { grid-column: 1 / -1 !important; }
}
/* The fixed top row sits on the same 12 columns (welcome 8 · side 4) so widget edges line up exactly. */
.dx > .dx-row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.dx > .dx-row > .dx-welcome { grid-column: span 8; }
.dx > .dx-row > .dx-side    { grid-column: span 4; }
@media (max-width: 1180px) {
  .dx > .dx-row > .dx-welcome, .dx > .dx-row > .dx-side { grid-column: 1 / -1; }
}

/* Summary row as widgets: keep it compact (~420px).  The health list scrolls past ~4 rows
   and the chart follows the row height, so both cards shrink together. */
.widget.dxw-native.dx-health .dx-health-list { max-height: 196px; }
.widget.dxw-native.dx-health .dx-health-sum { padding: 12px 20px 12px; }
.widget.dxw-native.dx-health .dx-card-hd { padding-top: 16px; }
.widget.dxw-native .dx-chart-body { min-height: 220px; }
/* Department Health uses the app's standard font for its headline figure. */
.dx-health .dx-ratio { font-family: var(--font-body); font-weight: 800; letter-spacing: -.8px; font-size: 28px; }
.dx-health .dx-ratio small { font-weight: 600; font-size: 17px; letter-spacing: 0; }
/* Compact rows: tags stay on one line (clipped with a fade), modules footer is one scrolling line. */
.widget.dxw-native.dx-health .dx-hrow { padding: 9px 8px; }
.widget.dxw-native.dx-health .dx-hrow-tags { flex-wrap: nowrap; overflow: hidden; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent); }
.widget.dxw-native.dx-health .dx-hrow-tags .dx-mini { flex-shrink: 0; }
.widget.dxw-native.dx-health .dx-health-foot { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 10px 16px; }
.widget.dxw-native.dx-health .dx-health-foot::-webkit-scrollbar { display: none; }
.widget.dxw-native.dx-health .dx-health-list { max-height: 248px; }

/* ── Alert tiles (something waiting: reviews, decisions, renewals, risk) ─────────
   Tinted card + border in the tile's tone, a tone icon tile, the figure in tone and a
   compact solid action.  Amber = waiting on you · red = risk / blocked. */
.dx-tile-alert {
  --t: var(--dx-warn);
  background: linear-gradient(180deg, color-mix(in srgb, var(--t) 9%, var(--dx-card)) 0%, color-mix(in srgb, var(--t) 3%, var(--dx-card)) 100%);
  border-color: color-mix(in srgb, var(--t) 42%, var(--dx-line));
  box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--t) 55%, transparent);
}
.dx-tile-alert.dx-alert-bad { --t: var(--dx-bad); }
.dx-tile-alert .dx-tile-hd { flex-wrap: nowrap; gap: 8px; }
.dx-tile-alert .dx-tile-hd .dx-eyebrow { flex: 1; min-width: 0; color: color-mix(in srgb, var(--t) 70%, var(--text-primary)); font-weight: 700; }
.dx-alert-ic {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: var(--t); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 16%, transparent);
}
.dx-alert-ic svg { width: 13px; height: 13px; }
.dx-tile-alert .dx-tile-val { color: var(--t); }
.dx-tile-alert .dx-tile-sub { color: color-mix(in srgb, var(--t) 45%, var(--text-secondary)); font-weight: 600; }
.dx-tile-cta {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; height: 26px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--t); background: var(--t); color: #fff; font-family: inherit; font-size: 11px; font-weight: 700;
  white-space: nowrap; cursor: pointer; transition: filter var(--transition), transform var(--transition);
}
.dx-tile-cta svg { width: 11px; height: 11px; transition: transform var(--transition); }
.dx-tile-cta:hover { filter: brightness(1.07); }
.dx-tile-cta:hover svg { transform: translateX(calc(2px * var(--dir))); }
.dx-tile-cta:focus-visible { outline: 2px solid var(--t); outline-offset: 2px; }
[data-theme="dark"] .dx-alert-warn .dx-tile-cta, [data-theme="dark"] .dx-alert-warn .dx-alert-ic { color: #1c1203; }
.dx-tile-mid { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.dx-tile-mid .dx-tile-val { min-width: 0; }

/* ── Summary + Health on the standard widget chrome ────────────────────────────
   Same 18px padding and title bar (icon · UPPERCASE TITLE · LIVE, separator line) as
   every other widget; one fixed title-bar height across the grid so rows line up. */
.dx .widget-grid > .widget > .widget-header { min-height: 41px; flex-wrap: wrap; gap: 8px 12px; }
.dx .widget-header .widget-title { flex-wrap: nowrap; min-width: 0; white-space: nowrap; }
.widget-title .dx-live { margin-inline-start: 4px; }
.dxw-ctx { margin-inline-start: 8px; padding-inline-start: 9px; border-inline-start: 1px solid var(--border); text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 600; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; }
.dxw-hd-btn { width: 28px; height: 28px; }
.widget.dxw-native { padding: 18px; }
.widget.dxw-native .dxw-edit { margin: 0 0 12px; }
.widget.dxw-native .dx-chart-tools { gap: 12px; }
.widget.dxw-native .widget-header .dx-seg { padding: 2px; }
.widget.dxw-native .widget-header .dx-seg button { padding: 4px 10px; font-size: 10.5px; }
.widget.dxw-native .dx-chart-body { padding: 0; }
.widget.dxw-native.dx-health .dx-health-sum { padding: 0 0 12px; }
.widget.dxw-native.dx-health .dx-health-list { padding: 0; }
.widget.dxw-native.dx-health .dx-health-foot { margin: 12px -18px -18px; border-radius: 0 0 18px 18px; }
.dxw-legend { margin: 2px 0 4px; }
