/* DCMS v2 — application styles, layered on top of Delmar tokens */

/* ---------- App tokens (semantic, theme-aware) ---------- */
:root {
  /* Light mode (default) — derived from Delmar palette */
  --app-bg:           #f5f6f9;
  --app-surface:      #ffffff;
  --app-surface-2:    #fafbfd;
  --app-surface-3:    #eef1f6;
  --app-nav-bg:       #ffffff;
  --app-nav-fg:       var(--blue-700);
  --app-rail:         var(--blue-700);

  --app-text:         #0a1a33;
  --app-text-2:       #4a5a73;
  --app-text-3:       #7c8aa1;
  --app-text-on-blue: #ffffff;

  --app-border:       rgba(0, 54, 133, 0.10);
  --app-border-2:     rgba(0, 54, 133, 0.18);
  --app-divider:      rgba(0, 54, 133, 0.06);

  --app-input-bg:     #ffffff;
  --app-input-bd:     rgba(0, 54, 133, 0.18);
  --app-input-focus:  var(--blue-500);

  --app-row-hover:    rgba(0, 54, 133, 0.04);
  --app-row-stripe:   rgba(0, 54, 133, 0.02);

  --app-success-bg:   rgba(56, 189, 0, 0.12);
  --app-success-fg:   #1f6b00;
  --app-warning-bg:   rgba(255, 196, 0, 0.18);
  --app-warning-fg:   #7a5800;
  --app-danger-bg:    rgba(219, 54, 74, 0.10);
  --app-danger-fg:    var(--red-800);
  --app-neutral-bg:   rgba(10, 26, 51, 0.06);
  --app-neutral-fg:   #4a5a73;
  --app-info-bg:      rgba(8, 69, 162, 0.10);
  --app-info-fg:      var(--blue-700);
  --app-teal-bg:      rgba(13, 118, 110, 0.12);
  --app-teal-fg:      #0d6e66;

  --app-shadow:       0 1px 2px rgba(2, 30, 71, 0.04), 0 0 0 1px rgba(0, 54, 133, 0.06);
  --app-shadow-lift:  0 8px 24px rgba(2, 30, 71, 0.10);

  /* Density */
  --row-h:            56px;
  --row-pad-x:        20px;
  --row-pad-y:        14px;
  --field-h:          40px;
  --section-pad:      24px;

  /* Type */
  --app-font:         'Noto Sans', 'Inter', system-ui, sans-serif;
}

/* Density: compact */
[data-density="compact"] {
  --row-h:        40px;
  --row-pad-x:    16px;
  --row-pad-y:    8px;
  --field-h:      32px;
  --section-pad:  16px;
}

/* Dark mode */
[data-theme="dark"] {
  --app-bg:           #061224;
  --app-surface:      #0d1e3a;
  --app-surface-2:    #0a1830;
  --app-surface-3:    #112647;
  --app-nav-bg:       #061224;
  --app-nav-fg:       #ffffff;
  --app-rail:         var(--blue-300);

  --app-text:         #e6ecf5;
  --app-text-2:       #94a4be;
  --app-text-3:       #6a7a93;
  --app-text-on-blue: #ffffff;

  --app-border:       rgba(255, 255, 255, 0.08);
  --app-border-2:     rgba(255, 255, 255, 0.16);
  --app-divider:      rgba(255, 255, 255, 0.05);

  --app-input-bg:     #112647;
  --app-input-bd:     rgba(255, 255, 255, 0.14);
  --app-input-focus:  var(--blue-300);

  --app-row-hover:    rgba(255, 255, 255, 0.04);
  --app-row-stripe:   rgba(255, 255, 255, 0.02);

  --app-success-bg:   rgba(56, 189, 0, 0.18);
  --app-success-fg:   #7add54;
  --app-warning-bg:   rgba(255, 196, 0, 0.18);
  --app-warning-fg:   #ffd866;
  --app-danger-bg:    rgba(219, 54, 74, 0.18);
  --app-danger-fg:    #f68896;
  --app-neutral-bg:   rgba(255, 255, 255, 0.08);
  --app-neutral-fg:   #94a4be;
  --app-info-bg:      rgba(16, 97, 223, 0.20);
  --app-info-fg:      #6ea8ff;
  --app-teal-bg:      rgba(45, 212, 191, 0.18);
  --app-teal-fg:      #5eead4;

  --app-shadow:       0 1px 2px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
  --app-shadow-lift:  0 12px 32px rgba(0,0,0,0.45);
}

/* ---------- Base reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--app-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--app-text);
  background: var(--app-bg);
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* RTL support (Arabic) */
[dir="rtl"] body {
  letter-spacing: 0;
  font-family: 'Noto Naskh Arabic', 'Noto Sans', system-ui, sans-serif;
}
[dir="rtl"] .topbar__nav a.is-active::after { transform: skewX(12deg); }
[dir="rtl"] .route__line::after {
  right: auto; left: -4px;
  border-left: none;
  border-right: 8px solid var(--app-border-2);
}
[dir="rtl"] .step:not(:last-child)::after { margin-left: 0; margin-right: 12px; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--blue-300); color: #fff; }

/* ---------- App shell ---------- */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: minmax(0, 1fr); /* let <main> shrink below content so pages never overflow */
}

/* Top bar */
.topbar {
  background: var(--app-nav-bg);
  border-bottom: 1px solid var(--app-border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar__logo {
  height: 28px;
  width: auto;
  display: block;
}
[data-theme="dark"] .topbar__logo--light { display: none; }
[data-theme="light"] .topbar__logo--dark { display: none; }
.topbar__div {
  width: 1px;
  height: 24px;
  background: var(--app-border-2);
}
.topbar__product {
  font-family: var(--font-branded);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--app-text-2);
}
.topbar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  margin-left: 16px;
}
.topbar__nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--app-text-2);
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar__nav a:hover {
  color: var(--app-text);
  background: var(--app-row-hover);
}
.topbar__nav a.is-active {
  color: var(--app-text);
  background: var(--app-info-bg);
}
.topbar__nav a.is-active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--blue-700);
  transform: skewX(-12deg);
}
[data-theme="dark"] .topbar__nav a.is-active::after {
  background: var(--blue-300);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Search command bar */
.cmdk {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--app-input-bd);
  background: var(--app-surface-2);
  border-radius: 6px;
  color: var(--app-text-3);
  font-size: 13px;
  transition: all 0.15s ease;
}
.cmdk:hover {
  border-color: var(--app-border-2);
  color: var(--app-text-2);
}
.cmdk__kbd {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  background: var(--app-surface-3);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  color: var(--app-text-3);
}

/* ---- Global search popup ---- */
.gsearch { position: relative; }
.gsearch-pop {
  position: fixed;
  top: 70px; right: 16px;
  width: 560px; max-width: min(560px, calc(100vw - 32px));
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  box-shadow: var(--app-shadow-lift);
  z-index: 120;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: notif-in 0.14s ease;
}
[dir="rtl"] .gsearch-pop { right: auto; left: 16px; }

.gsearch-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--app-divider);
}
.gsearch-head > .ico { color: var(--app-text-3); flex: none; }
.gsearch-input {
  flex: 1; min-width: 0;
  border: 0; background: transparent;
  font-size: 15px; color: var(--app-text);
  outline: none;
}
.gsearch-input::placeholder { color: var(--app-text-3); }
.gsearch-esc {
  flex: none;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; color: var(--app-text-3);
  padding: 2px 6px;
  border: 1px solid var(--app-border); border-radius: 4px;
  background: var(--app-surface-2);
}
.gsearch-clear {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 5px;
  color: var(--app-text-3);
}
.gsearch-clear:hover { background: var(--app-row-hover); color: var(--app-text); }

.gsearch-list {
  max-height: min(64vh, 480px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--app-border) transparent;
}
.gsearch-list::-webkit-scrollbar { width: 8px; }
.gsearch-list::-webkit-scrollbar-thumb { background: var(--app-border); border-radius: 999px; border: 2px solid var(--app-surface); }

.gsearch-sec { padding: 4px 0; border-bottom: 1px solid var(--app-divider); }
.gsearch-sec:last-child { border-bottom: 0; }
.gsearch-sec__head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px 5px;
}
.gsearch-sec__ico { color: var(--app-text-3); display: inline-flex; }
.gsearch-sec__ico svg { width: 13px; height: 13px; }
.gsearch-sec__label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--app-text-3);
}
.gsearch-sec__count {
  margin-left: 2px;
  font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--app-neutral-bg); color: var(--app-text-3);
}

.gsearch-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center; gap: 12px;
  width: 100%;
  padding: 8px 16px;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s ease;
}
.gsearch-row.is-hi { background: var(--app-row-hover); }
.gsearch-row__mode { color: var(--app-text-3); display: inline-flex; }
.gsearch-row__body { min-width: 0; }
.gsearch-row__top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.gsearch-row__pri {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 13px; color: var(--app-text);
  letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gsearch-row__ext {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--app-text-3); flex: none;
}
.gsearch-row__sec {
  display: block;
  font-size: 12px; color: var(--app-text-2);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gsearch-row__lane {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--app-text-3); white-space: nowrap;
}
.gsearch-row__badge { display: inline-flex; }

.gsearch-viewall {
  display: inline-flex; align-items: center; gap: 6px;
  width: 100%;
  padding: 8px 16px 9px;
  font-size: 12.5px; font-weight: 600;
  color: var(--blue-500);
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}
.gsearch-viewall .ico svg { width: 13px; height: 13px; }
.gsearch-viewall:hover, .gsearch-viewall.is-hi { background: var(--app-row-hover); color: var(--blue-700); }
[data-theme="dark"] .gsearch-viewall { color: var(--app-info-fg); }
[dir="rtl"] .gsearch-viewall .ico { transform: scaleX(-1); }

.gsearch-hint { padding: 22px 18px 24px; }
.gsearch-hint__lead {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--app-text-3); margin-bottom: 10px;
}
.gsearch-hint__cats { display: flex; flex-wrap: wrap; gap: 8px; }
.gsearch-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--app-text-2);
  padding: 5px 10px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border); border-radius: 6px;
}
.gsearch-cat .ico { color: var(--app-text-3); }
.gsearch-cat .ico svg { width: 14px; height: 14px; }
.gsearch-hint__sub { font-size: 12px; color: var(--app-text-3); margin-top: 14px; }

.gsearch-empty { padding: 36px 24px 40px; text-align: center; }
.gsearch-empty__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--app-neutral-bg); color: var(--app-text-3);
  margin-bottom: 12px;
}
.gsearch-empty__ico svg { width: 18px; height: 18px; }
.gsearch-empty__title { font-size: 14px; font-weight: 700; color: var(--app-text); }
.gsearch-empty__sub { font-size: 12.5px; color: var(--app-text-3); margin-top: 3px; }

.gsearch-foot {
  display: flex; align-items: center; gap: 16px;
  padding: 9px 16px;
  border-top: 1px solid var(--app-divider);
  background: var(--app-surface-2);
}
.gsearch-foot__kbd {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--app-text-3);
}
.gsearch-foot__kbd kbd {
  font-family: var(--font-mono); font-size: 10px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: 3px; color: var(--app-text-2);
}

/* Icon button */
.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--app-text-2);
  position: relative;
  transition: all 0.15s ease;
}
.icon-btn:hover {
  background: var(--app-row-hover);
  color: var(--app-text);
}
.icon-btn .dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red-700);
  border: 2px solid var(--app-nav-bg);
}

/* User chip */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.15s ease;
}
.user-chip:hover { background: var(--app-row-hover); }
.user-chip__avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue-700);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.user-chip__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--app-text);
}
.user-chip__role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-text-3);
}

/* Page chrome */
.page {
  padding: 28px 32px 56px;
  max-width: 1640px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}
.page__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page__title {
  font-family: var(--font-branded);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: 28px;
  letter-spacing: 0.015em;
  line-height: 1;
  color: var(--app-text);
  margin: 0;
}
.page__subtitle {
  font-size: 13px;
  color: var(--app-text-2);
  margin: 6px 0 0;
}
.page__crumbs {
  font-size: 12px;
  color: var(--app-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-weight: 600;
}
.page__crumbs a:hover { color: var(--blue-500); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--field-h);
  padding: 0 18px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: var(--blue-700);
  color: #fff;
}
.btn--primary:hover { background: var(--blue-800); }
[data-theme="dark"] .btn--primary { background: var(--blue-300); }
[data-theme="dark"] .btn--primary:hover { background: var(--blue-500); }
.btn--accent {
  background: var(--red-700);
  color: #fff;
}
.btn--accent:hover { background: var(--red-800); }
.btn--ghost {
  background: transparent;
  color: var(--app-text);
  border-color: var(--app-input-bd);
}
.btn--ghost:hover {
  background: var(--app-row-hover);
  border-color: var(--app-border-2);
}
.btn--link {
  background: none;
  color: var(--blue-500);
  height: auto;
  padding: 0;
  border: none;
}
[data-theme="dark"] .btn--link { color: var(--blue-300); }
.btn--link:hover { text-decoration: underline; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--xs { height: 26px; padding: 0 10px; font-size: 12px; }
.btn--icon { padding: 0; width: var(--field-h); }

/* Card / panel */
.panel {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  overflow: hidden;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--app-divider);
}
.panel__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--app-text);
  letter-spacing: -0.005em;
}
.panel__body { padding: 0; }

/* Collapsible panel head (button) */
.panel__head--toggle {
  width: 100%;
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}
.panel__head--toggle[data-open="false"] { border-bottom: 0; }
.panel__head--toggle:hover { background: var(--app-row-hover); }
.panel-collapse__chev {
  display: inline-flex;
  color: var(--app-text-3);
  transition: transform 0.18s ease;
}
.panel__head--toggle[data-open="false"] .panel-collapse__chev { transform: rotate(-90deg); }

/* Event summary table */
.evt { display: flex; flex-direction: column; }
.evt__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--app-divider);
}
.evt__search { flex: 1; max-width: 420px; height: var(--field-h); }
.evt__head,
.evt__row {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) 170px 184px minmax(220px, 1.55fr);
  gap: 16px;
  align-items: start;
  padding: 13px 24px;
}
.evt__head {
  border-bottom: 1px solid var(--app-divider);
  padding-top: 10px;
  padding-bottom: 8px;
  background: var(--app-surface-2);
}
.evt__sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-text-3);
  background: none;
  border: 0;
  padding: 3px 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.evt__sort:hover { color: var(--app-text-2); }
.evt__sort.is-active { color: var(--app-text); }
.evt__sort-caret {
  display: inline-flex;
  opacity: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.evt__sort:hover .evt__sort-caret { opacity: 0.5; }
.evt__sort.is-active .evt__sort-caret { opacity: 1; }
.evt__sort-caret[data-dir="asc"] { transform: rotate(180deg); }
.evt__scroll {
  height: 268px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.evt__empty {
  padding: 36px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--app-text-3);
}
.evt__row { border-bottom: 1px solid var(--app-divider); }
.evt__row:last-child { border-bottom: 0; }
.evt__row:hover { background: var(--app-row-hover); }
.evt__type {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--app-text);
}
.evt__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.evt__date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--app-text-2);
  white-space: nowrap;
  padding-top: 1px;
}
.evt__by {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 13px;
  color: var(--app-text-2);
}
.evt__by-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evt__comment {
  font-size: 13px;
  color: var(--app-text-2);
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- Detail Summary (cargo line items) ---------- */
.dsum { display: flex; flex-direction: column; }
.dsum__cols,
.dsum__head,
.dsum__row,
.dsum__foot {
  display: grid;
  grid-template-columns:
    minmax(260px, 1.8fr) 132px minmax(168px, 0.9fr)
    96px 104px 132px 116px;
  column-gap: 16px;
  align-items: center;
}
.dsum__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--app-divider);
}
.dsum__search { flex: 1; max-width: 460px; height: var(--field-h); }
.dsum__tools { display: flex; gap: 6px; margin-left: auto; }

.dsum__head {
  padding: 11px 24px;
  border-bottom: 1px solid var(--app-divider);
  background: var(--app-surface-2);
  position: sticky;
  top: 0;
  z-index: 2;
}
.dsum__hcell {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--app-text-3);
  white-space: nowrap;
}
.dsum__hcell[data-align="right"] { text-align: right; justify-content: flex-end; }
.dsum__sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}
.dsum__sort.is-active { color: var(--app-text); }
.dsum__sort:hover { color: var(--app-text-2); }

.dsum__scroll {
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dsum__row {
  padding: 12px 24px;
  border-bottom: 1px solid var(--app-divider);
}
.dsum__row:last-child { border-bottom: 0; }
.dsum__row:hover { background: var(--app-row-hover); }

.dsum__item { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.dsum__item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dsum__title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--app-text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dsum__code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--app-text-3);
  letter-spacing: -0.01em;
}
.dsum__unit {
  font-size: 10px;
  font-weight: 600;
  color: var(--app-text-3);
  letter-spacing: 0.02em;
}
.dsum__po {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--app-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dsum__muted { color: var(--app-text-3); }

.dsum__eqwrap { display: flex; flex-wrap: wrap; gap: 5px; }
.dsum__eq {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--blue-500);
  background: var(--app-info-bg);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 9px 3px 7px;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}
.dsum__eq:hover {
  border-color: var(--blue-500);
  background: var(--app-surface);
}
.dsum__eq svg { opacity: 0.75; }
[data-theme="dark"] .dsum__eq { color: var(--blue-300); }

.dsum__num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--app-text);
  white-space: nowrap;
}
.dsum__pkg { color: var(--app-text-2); }

.dsum__foot {
  padding: 12px 24px;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface-2);
  font-weight: 700;
}
.dsum__foot-label {
  grid-column: 1 / 3;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--app-text-3);
}
.dsum__foot-spacer { grid-column: 3 / 5; }
.dsum__foot-num { color: var(--app-text); font-weight: 700; }

@media (max-width: 980px) {
  .dsum__head, .dsum__row, .dsum__foot { min-width: 940px; }
  .dsum__scroll, .dsum__head, .dsum__foot { overflow-x: auto; }
}

/* Inputs */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-text-3);
}
.field__label .req { color: var(--red-700); margin-left: 2px; }
.input, .select, .textarea {
  height: var(--field-h);
  padding: 0 12px;
  background: var(--app-input-bg);
  border: 1px solid var(--app-input-bd);
  border-radius: 4px;
  font-size: 14px;
  color: var(--app-text);
  width: 100%;
  transition: all 0.15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--app-input-focus);
  box-shadow: 0 0 0 3px rgba(8, 69, 162, 0.12);
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 72px; }
.input::placeholder, .textarea::placeholder { color: var(--app-text-3); }
.field__hint { font-size: 12px; color: var(--app-text-3); }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 999px;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge--success { background: var(--app-success-bg); color: var(--app-success-fg); }
.badge--warning { background: var(--app-warning-bg); color: var(--app-warning-fg); }
.badge--danger  { background: var(--app-danger-bg); color: var(--app-danger-fg); }
.badge--info    { background: var(--app-info-bg); color: var(--app-info-fg); }
.badge--teal    { background: var(--app-teal-bg); color: var(--app-teal-fg); }
.badge--neutral { background: var(--app-neutral-bg); color: var(--app-neutral-fg); }
.badge--plain   { background: var(--app-neutral-bg); color: var(--app-text-2); }
.badge--plain::before { display: none; }

/* Pill / chip (filter chip) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-input-bd);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--app-text);
  transition: all 0.12s ease;
}
.chip:hover { border-color: var(--app-border-2); background: var(--app-surface-2); }
.chip__x {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--app-text-3);
}
.chip__x:hover { background: var(--app-row-hover); color: var(--app-text); }
.chip--add {
  border-style: dashed;
  color: var(--app-text-2);
}

/* Table */
.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.tbl thead th {
  position: sticky;
  top: 64px;
  background: var(--app-surface-2);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-text-3);
  padding: 12px var(--row-pad-x);
  border-bottom: 1px solid var(--app-border);
  white-space: nowrap;
  user-select: none;
}
.tbl thead th.sortable { cursor: pointer; }
.tbl thead th.sortable:hover { color: var(--app-text-2); }
.tbl thead th .sort {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.4;
  transition: opacity 0.15s ease;
}
.tbl thead th.is-sorted .sort { opacity: 1; color: var(--blue-500); }
/* Static header — sits locked directly under the search/filter toolbar */
.tbl--static-head thead th { position: static; top: auto; }

/* Tight density — shrink the gutters between columns */
.tbl--tight thead th,
.tbl--tight tbody td { padding-left: 12px; padding-right: 12px; }
.tbl--tight thead th.col-mode,
.tbl--tight tbody td.col-mode { padding-left: 6px; padding-right: 6px; text-align: center; }
.th-2line { display: inline-block; line-height: 1.2; white-space: normal; }
.tbl tbody tr {
  transition: background 0.12s ease;
}
.tbl tbody tr:hover { background: var(--app-row-hover); }
.tbl tbody td {
  padding: var(--row-pad-y) var(--row-pad-x);
  border-bottom: 1px solid var(--app-divider);
  vertical-align: middle;
  color: var(--app-text);
}
.tbl tbody td.num { font-variant-numeric: tabular-nums; }
.tbl tbody td.muted { color: var(--app-text-2); }
.tbl tbody tr.is-selected { background: var(--app-info-bg); }
.tbl tbody tr.is-expanded { background: var(--app-row-hover); }
.tbl .cell-link {
  font-weight: 600;
  color: var(--blue-500);
}
[data-theme="dark"] .tbl .cell-link { color: var(--blue-300); }
.tbl .cell-link:hover { text-decoration: underline; }
.tbl .cell-id {
  font-family: var(--font-mono);
  font-size: 12px;
}
.cell-sub {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  max-width: 100%;
}
.cell-sub__k {
  flex: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-text-3);
  border: 1px solid var(--app-divider);
  border-radius: 3px;
  padding: 1px 4px;
  line-height: 1.3;
}
.cell-sub__v {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--app-text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-sub--muted {
  font-size: 11px;
  color: var(--app-text-3);
  font-style: italic;
}
.ext-ref {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--app-text-2);
}

/* Accounts cell */
.accounts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 220px;
}
.accounts__row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
}
.accounts__k {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--app-text-3);
}
.accounts__v {
  flex: 1;
  min-width: 0;
  color: var(--app-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shipment References cell */
.ship-refs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.ship-refs .cell-id {
  font-weight: 700;
}
.ship-refs__ext {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--app-text-3);
  margin-top: 1px;
}
.ship-refs__consol {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
  max-width: 100%;
}
.ship-refs__consol.cell-sub--muted {
  display: inline-block;
}

/* Clickable HBL link on a booking (shipment created after approval) */
.bk-hbl {
  text-decoration: none;
  cursor: pointer;
  color: var(--blue-600, var(--app-text-2));
  border-radius: 4px;
}
.bk-hbl .bk-hbl__k {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--app-text-3);
  background: var(--app-neutral-bg);
  padding: 1px 4px;
  border-radius: 3px;
}
.bk-hbl .cell-sub__v {
  color: var(--blue-600, var(--app-text-2));
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, currentColor 35%, transparent);
  text-underline-offset: 2px;
}
.bk-hbl:hover .cell-sub__v {
  text-decoration-color: currentColor;
}

/* Booking date that hasn't been set yet */
.lane__t--missing { color: var(--app-text-3); font-style: italic; }
.lane__t--missing .lane__t-k { font-style: normal; }

/* Empty cell */
.em { color: var(--app-text-3); }

/* Status dot inline */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  vertical-align: middle;
}
.dot--ok { background: var(--success); }
.dot--warn { background: var(--warning); }
.dot--err { background: var(--red-700); }
.dot--muted { background: var(--app-text-3); }

/* Mode icon */
.mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--app-text);
}
.mode-tag svg { color: var(--app-text-3); }
.mode-tag--icon {
  gap: 0;
  cursor: default;
}
.mode-tag--icon svg { color: var(--app-text-2); }

/* Skewed angle accent on hero / panels */
.angle-stripe {
  position: absolute;
  background: var(--blue-700);
  transform: skewX(-12deg);
  pointer-events: none;
}

/* Two-col layout */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) {
  .cols, .cols-3, .cols-4 { grid-template-columns: 1fr; }
}

/* KPI tile */
.kpi {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.kpi__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-text-3);
  margin-bottom: 8px;
}
.kpi__value {
  font-family: var(--font-branded);
  font-weight: 900;
  font-style: italic;
  font-size: 32px;
  letter-spacing: -0.01em;
  color: var(--app-text);
  line-height: 1;
}
.kpi__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-top: 10px;
}
.kpi__delta--up { color: var(--success); }
.kpi__delta--down { color: var(--red-700); }
.kpi__delta--flat { color: var(--app-text-3); }
.kpi__accent {
  position: absolute;
  right: -12px; top: -12px;
  width: 56px; height: 56px;
  background: var(--app-info-bg);
  color: var(--app-info-fg);
  border-radius: 4px;
  transform: skewX(-12deg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kpi__accent svg { transform: skewX(12deg); }

/* Tabs */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--app-border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--app-text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  cursor: pointer;
}
.tab:hover { color: var(--app-text); }
.tab.is-active {
  color: var(--app-text);
  border-bottom-color: var(--blue-700);
}
[data-theme="dark"] .tab.is-active { border-bottom-color: var(--blue-300); }
.tab__count {
  display: inline-block;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  background: var(--app-neutral-bg);
  color: var(--app-text-3);
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
}
.tab.is-active .tab__count { background: var(--app-info-bg); color: var(--app-info-fg); }

/* Toolbar (table head) */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--app-divider);
  flex-wrap: wrap;
}
.toolbar__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-input-bd);
  border-radius: 6px;
  min-width: 260px;
  flex: 1;
  max-width: 380px;
}
.toolbar__search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 13px;
}
.toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Login splash */
.login-splash {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-splash__visual {
  position: relative;
  background: var(--blue-900);
  overflow: hidden;
}
.login-splash__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(at 30% 20%, rgba(16, 97, 223, 0.4), transparent 40%),
    radial-gradient(at 80% 80%, rgba(0, 54, 133, 0.6), transparent 50%);
}
.login-splash__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      102deg,
      transparent 0,
      transparent 40px,
      rgba(255,255,255,0.02) 40px,
      rgba(255,255,255,0.02) 41px
    );
}
.login-splash__panel {
  background: var(--app-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 48px;
}
.login-card {
  width: 100%;
  max-width: 420px;
}

/* Step / progress */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
  color: var(--app-text-3);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.step__num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--app-surface-3);
  color: var(--app-text-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.step.is-active { color: var(--app-text); }
.step.is-active .step__num { background: var(--blue-700); color: #fff; }
.step.is-done .step__num { background: var(--success); color: #fff; }
.step.is-done { color: var(--app-text-2); }
.step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--app-border);
  margin-left: 12px;
}
.step.is-done::after { background: var(--success); }

/* Form section */
.form-section {
  padding: var(--section-pad);
  border-top: 1px solid var(--app-divider);
}
.form-section:first-child { border-top: none; }
.form-section__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-text-3);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-section__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--app-divider);
}

/* Party card (Shipper / Consignee in booking) */
.party {
  border: 1px dashed var(--app-input-bd);
  border-radius: 6px;
  padding: 14px;
  background: var(--app-surface-2);
  transition: all 0.15s ease;
  cursor: pointer;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.party:hover {
  border-style: solid;
  border-color: var(--blue-500);
  background: var(--app-surface);
}
.party.is-filled {
  border-style: solid;
  border-color: var(--app-border);
  background: var(--app-surface);
  cursor: default;
}
.party__role {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-text-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.party__name { font-size: 15px; font-weight: 600; color: var(--app-text); margin-top: 6px; }
.party__addr { font-size: 12px; color: var(--app-text-2); line-height: 1.5; }
.party__empty { color: var(--app-text-3); font-size: 13px; margin-top: 6px; }

/* Pre-built shipment map */
.route {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.route__pt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.route__pt-name { font-weight: 600; color: var(--app-text); }
.route__pt-meta { font-size: 11px; color: var(--app-text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.route__line {
  flex: 1;
  height: 2px;
  background: var(--app-border-2);
  position: relative;
  min-width: 24px;
}
.route__line::after {
  content: '';
  position: absolute;
  right: -4px; top: -3px;
  width: 0; height: 0;
  border-left: 8px solid var(--app-border-2);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* Lane cell — UNLOCODE + estimated/actual departure & arrival */
.lane {
  display: flex;
  align-items: stretch;
  gap: 16px;
  min-width: 320px;
}
.lane__leg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lane__head { display: flex; align-items: center; gap: 6px; }
.lane__code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--app-text);
}
.lane__city { font-size: 12px; color: var(--app-text-2); white-space: nowrap; }
.lane__code.geo {
  text-decoration: underline dotted;
  text-decoration-color: var(--app-text-3);
  text-underline-offset: 2px;
  cursor: help;
}
.lane__times { display: flex; flex-direction: column; gap: 2px; }
.lane__t {
  font-size: 11px;
  color: var(--app-text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lane__t-k {
  display: inline-block;
  width: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--app-text-3);
}
.lane__t--act { color: var(--app-text); }
.lane__t--act .lane__t-k { color: var(--app-success, var(--blue-500)); }
.lane__arrow {
  display: flex;
  align-items: center;
  color: var(--app-text-3);
  flex: 0 0 auto;
}

/* Star favorite button (row leading control) */
.star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--app-text-3);
  transition: color .12s ease, background .12s ease;
}
.star-btn:hover { background: var(--app-hover, rgba(0,0,0,0.05)); color: var(--app-text-2); }
.star-btn.is-on { color: #e6a700; }
.star-btn.is-on:hover { color: #d49a00; }

/* Notification row */
.notif-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--app-divider);
}
.notif-row:last-child { border-bottom: none; }
.notif-row__icon {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--app-info-bg);
  color: var(--app-info-fg);
  display: inline-flex; align-items: center; justify-content: center;
}
.notif-row__title { font-size: 14px; font-weight: 500; color: var(--app-text); }
.notif-row__sub { font-size: 12px; color: var(--app-text-3); margin-top: 2px; }
.notif-row__sel {
  height: 30px;
  border: 1px solid var(--app-input-bd);
  background: var(--app-input-bg);
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--app-text);
}

/* Toggle switch */
.switch {
  --w: 36px;
  --h: 20px;
  width: var(--w);
  height: var(--h);
  background: var(--app-border-2);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.switch.is-on { background: var(--success); }
.switch.is-on::after { transform: translateX(16px); }
.switch--blue.is-on { background: var(--blue-500); }
.switch--lg { --w: 44px; --h: 24px; }
.switch--lg::after { width: 20px; height: 20px; }
.switch--lg.is-on::after { transform: translateX(20px); }

/* Container card (expanded row) */
.cont-detail {
  background: var(--app-surface-2);
  border-top: 1px solid var(--app-divider);
  border-bottom: 1px solid var(--app-divider);
  padding: 24px;
}
.cont-detail__grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}
@media (max-width: 1100px) {
  .cont-detail__grid { grid-template-columns: 1fr; }
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.timeline--scroll {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}
.timeline__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: flex-start;
  position: relative;
}
.timeline__title { font-size: 13px; font-weight: 600; color: var(--app-text); }
.timeline__meta { font-size: 12px; color: var(--app-text-3); margin-top: 2px; }
.timeline__time { font-size: 12px; color: var(--app-text-3); white-space: nowrap; }

/* Mini-tbl (within expanded container) */
.mini-tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  overflow: hidden;
}
.mini-tbl th, .mini-tbl td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--app-divider);
}
.mini-tbl th {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-text-3);
  background: var(--app-surface-2);
}
.mini-tbl tr:last-child td { border-bottom: none; }
.mini-tbl tbody tr:hover { background: var(--app-row-hover); }
.mini-tbl .num { font-variant-numeric: tabular-nums; }

/* HBLs Loaded — expandable per-container line breakdown */
.mini-tbl--hbl .hbl-row.is-open { background: var(--app-surface-2); }
.mini-tbl--hbl .hbl-row.is-open td { border-bottom-color: transparent; }
.hbl-chev { display: inline-flex; transition: transform 0.15s ease; }
.hbl-break-row:hover { background: transparent !important; }
.hbl-break-row > td { background: var(--app-surface-2); }
.hbl-break {
  padding: 4px 0 12px 0;
}
.hbl-break__cap {
  font-size: 11px;
  color: var(--app-text-3);
  padding: 2px 0 10px 0;
}
.hbl-break__cap b { color: var(--app-text-2); font-family: var(--font-mono); font-weight: 600; }
.hbl-break__tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  overflow: hidden;
}
.hbl-break__tbl th, .hbl-break__tbl td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--app-divider);
  vertical-align: top;
}
.hbl-break__tbl th {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-text-3);
  background: var(--app-surface-2);
}
.hbl-break__tbl tr:last-child td { border-bottom: none; }
.hbl-break__tbl .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbl-break__item { display: flex; align-items: center; gap: 8px; }
.hbl-break__ref { font-family: var(--font-mono); font-weight: 600; color: var(--app-text); }
.hbl-break__desc { font-size: 11.5px; color: var(--app-text-2); margin-top: 2px; }
.hbl-break__title { font-size: 12px; font-weight: 600; color: var(--app-text); }
.hbl-break__refsub { font-family: var(--font-mono); font-size: 11px; color: var(--app-text-3); margin-top: 2px; }
.hbl-split {
  flex: none;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--app-warning-fg);
  background: var(--app-warning-bg);
  border-radius: 999px;
  padding: 1px 7px;
  cursor: help;
}

/* Map placeholder */
.map {
  width: 100%;
  aspect-ratio: 2 / 1;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(16, 97, 223, 0.15), transparent 60%),
    radial-gradient(ellipse at 20% 60%, rgba(56, 189, 0, 0.08), transparent 50%),
    var(--app-surface-3);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

/* Permission group */
.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--app-divider);
}
.perm-row:last-child { border-bottom: none; }
.perm-row__main { flex: 1; }
.perm-row__title { font-size: 14px; font-weight: 500; color: var(--app-text); }
.perm-row__sub { font-size: 12px; color: var(--app-text-3); margin-top: 2px; }

/* Avatar uploader */
.avatar-up {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar-up__pic {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-branded);
  font-weight: 900;
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0.02em;
}

/* Profile — read-only display value (e.g. user type) */
.readonly-value {
  display: flex; align-items: center;
  min-height: 38px;
  font-size: 14px; font-weight: 500;
  color: var(--app-text);
}
.readonly-value--muted { font-weight: 400; color: var(--app-text-2); }

/* Section header row with a control on the right (e.g. Active toggle) */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.active-toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.active-toggle__label {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--app-text-3);
}
.active-toggle__label.is-on { color: var(--blue-600, var(--blue-500)); }

/* ===== User profile page — two-column composed layout ===== */
.profile-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}
.profile-rail { position: sticky; top: 20px; }
.profile-main { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1040px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-rail { position: static; }
}

/* Left rail identity / status / audit card */
.profile-card { overflow: hidden; }
.profile-card__head {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; border-bottom: 1px solid var(--app-divider);
}
.profile-card__avatar {
  width: 60px; height: 60px; flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-branded);
  font-weight: 900; font-style: italic; font-size: 20px; letter-spacing: 0.02em;
}
.profile-card__photo { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.profile-card__body {
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.profile-card__pw { font-size: 13px; color: var(--blue-500); margin-top: 2px; }

.status-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 13px; margin-top: 2px;
  border: 1px solid var(--app-border); border-radius: 6px;
  background: var(--app-row-hover);
}
.status-row__label { font-size: 13px; font-weight: 600; color: var(--app-text); }
.status-row__hint { font-size: 11.5px; color: var(--app-text-3); margin-top: 2px; }

.profile-card__audit {
  padding: 14px 20px; border-top: 1px solid var(--app-divider);
  display: flex; flex-direction: column; gap: 7px;
  background: var(--app-row-hover);
}
.audit-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.audit-item__k {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--app-text-3); font-weight: 600;
}
.audit-item__v { font-size: 12px; color: var(--app-text-2); font-weight: 500; }

/* Accounts & addresses — compact two-column grid */
.acct-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 720px) { .acct-grid { grid-template-columns: 1fr; } }
.acct {
  padding: 13px 18px;
  border-bottom: 1px solid var(--app-divider);
}
.acct:nth-child(odd) { border-right: 1px solid var(--app-divider); }
.acct__head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.acct__head--btn {
  width: 100%; background: transparent; border: none; cursor: pointer;
  text-align: left; padding: 2px 0; border-radius: 4px;
}
.acct__head--btn .ico { margin-left: auto; color: var(--app-text-3); opacity: 0; transition: opacity 0.12s ease; }
.acct__head--btn:hover .acct__name { color: var(--blue-600, var(--blue-500)); }
.acct__head--btn:hover .ico { opacity: 1; }
.acct__name {
  font-size: 13px; font-weight: 600; color: var(--app-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct__code {
  flex: 0 0 auto;
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
  color: var(--app-text-2); background: var(--app-neutral-bg);
  border-radius: 3px; padding: 1px 6px; font-family: var(--app-font-mono, monospace);
}
.acct__addrs { display: flex; flex-direction: column; gap: 2px; }
.acct-addr {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; line-height: 1.4;
}
.acct-addr--btn {
  width: 100%; background: transparent; border: none; cursor: pointer;
  text-align: left; padding: 4px 6px; margin-left: -6px; border-radius: 5px;
  transition: background 0.12s ease;
}
.acct-addr--btn:hover { background: var(--app-row-hover); }
.acct-addr--btn:hover .acct-addr__text { color: var(--app-text); }
.acct-addr__code {
  flex: 0 0 auto; min-width: 56px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--blue-600, var(--blue-500));
  font-family: var(--app-font-mono, monospace);
}
.acct-addr__text {
  min-width: 0; color: var(--app-text-2);
  overflow: hidden; text-overflow: ellipsis;
}
.acct-addr__loc { color: var(--app-text-3); white-space: nowrap; }

/* Read-only / locked input */
.input--locked {
  display: flex; align-items: center; gap: 8px;
  background: var(--app-neutral-bg);
  color: var(--app-text-2);
  cursor: not-allowed;
}
.input--locked input {
  border: none; background: transparent; outline: none;
  width: 100%; color: inherit; cursor: not-allowed;
  font: inherit;
}
.input--locked .ico { color: var(--app-text-3); flex: 0 0 auto; }

/* Tweaks panel position override */
.tweaks-panel { font-family: var(--app-font); }

/* Splash plane illustration (CSS only) — small accent on login */
.plane {
  position: absolute;
  width: 56px;
  height: 56px;
  color: rgba(255, 255, 255, 0.18);
}

/* Pagination */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--app-divider);
  font-size: 13px;
  color: var(--app-text-2);
}
.pager__btns { display: flex; gap: 4px; align-items: center; }
.pager__btn {
  width: 30px; height: 30px;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--app-text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.pager__btn:hover { background: var(--app-row-hover); }
.pager__btn.is-active {
  background: var(--blue-700); color: #fff;
}
[data-theme="dark"] .pager__btn.is-active { background: var(--blue-300); color: var(--blue-900); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--app-border-2);
  border-radius: 999px;
  border: 2px solid var(--app-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--app-text-3); }

/* Inline expand chevron */
.exp-btn {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--app-text-3);
  border-radius: 4px;
  transition: all 0.15s ease;
}
.exp-btn:hover { background: var(--app-row-hover); color: var(--app-text); }
.exp-btn svg { transition: transform 0.2s ease; }
.exp-btn.is-open svg { transform: rotate(90deg); }

/* Flag chip */
.flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--app-text-2);
}
.flag__sq {
  width: 18px; height: 12px;
  border-radius: 1px;
  display: inline-block;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--app-border);
}
.flag__sq--ca { background: linear-gradient(to right, #db364a 0 25%, #fff 25% 75%, #db364a 75% 100%); }
.flag__sq--cn { background: #db364a; }
.flag__sq--nl { background: linear-gradient(to bottom, #ae1c28 0 33%, #fff 33% 66%, #21468b 66%); }
.flag__sq--us { background: linear-gradient(to bottom, #b22234 0 50%, #fff 50%); }
.flag__sq--vn { background: #db364a; }
.flag__sq--it { background: linear-gradient(to right, #008c45 0 33%, #fff 33% 66%, #cd212a 66%); }

/* Density toggle (inline) */
.seg {
  display: inline-flex;
  border: 1px solid var(--app-input-bd);
  border-radius: 6px;
  overflow: hidden;
  height: 32px;
}
.seg__btn {
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--app-text-2);
  background: var(--app-surface);
  border-right: 1px solid var(--app-input-bd);
}
.seg__btn:last-child { border-right: none; }
.seg__btn:hover { background: var(--app-row-hover); }
.seg__btn.is-active {
  background: var(--blue-700);
  color: #fff;
}
[data-theme="dark"] .seg__btn.is-active { background: var(--blue-300); color: var(--blue-900); }

/* ============================================================
   NOTIFICATIONS — bell badge, popup, and history dashboard
   ============================================================ */

/* Count badge on the bell */
.notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red-700);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 2px solid var(--app-nav-bg);
  letter-spacing: 0;
  pointer-events: none;
}
[dir="rtl"] .notif-badge { right: auto; left: 2px; }

/* Popup shell */
.notif-pop {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 392px;
  max-width: calc(100vw - 24px);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  box-shadow: var(--app-shadow-lift);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notif-in 0.14s ease;
}
[dir="rtl"] .notif-pop { right: auto; left: 0; }
@keyframes notif-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.notif-pop__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
}
.notif-pop__title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--app-text);
  letter-spacing: -0.01em;
}
.notif-pop__count {
  height: 19px; padding: 0 7px;
  border-radius: 999px;
  background: var(--app-info-bg); color: var(--app-info-fg);
  font-size: 10.5px; font-weight: 700; line-height: 19px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.notif-pop__action {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600;
  color: var(--blue-500);
  background: none; border: 0; cursor: pointer; padding: 2px 0;
  white-space: nowrap;
}
.notif-pop__action .ico { opacity: 0.85; }
.notif-pop__action:hover { color: var(--blue-700); }
.notif-pop__action:disabled { color: var(--app-text-3); cursor: default; opacity: 0.6; }

.notif-pop__tabs {
  display: flex; gap: 4px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--app-divider);
}
.notif-tab {
  font-size: 12.5px; font-weight: 600;
  color: var(--app-text-3);
  background: none; border: 0; cursor: pointer;
  padding: 5px 11px; border-radius: 999px;
  transition: background 0.12s ease, color 0.12s ease;
}
.notif-tab:hover { color: var(--app-text-2); background: var(--app-row-hover); }
.notif-tab.is-active { color: var(--blue-700); background: var(--app-info-bg); }
[data-theme="dark"] .notif-tab.is-active { color: var(--app-info-fg); }

.notif-pop__list {
  max-height: min(60vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--app-border) transparent;
}
.notif-pop__list::-webkit-scrollbar { width: 8px; }
.notif-pop__list::-webkit-scrollbar-track { background: transparent; }
.notif-pop__list::-webkit-scrollbar-thumb {
  background: var(--app-border);
  border-radius: 999px;
  border: 2px solid var(--app-surface);
}
.notif-pop__list::-webkit-scrollbar-thumb:hover { background: var(--app-text-3); }

.notif-group__label {
  position: sticky; top: 0; z-index: 1;
  background: var(--app-surface-2);
  padding: 6px 16px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--app-text-3);
  border-bottom: 1px solid var(--app-divider);
}

/* Row (shared by popup + history) */
.notif-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--app-divider);
  cursor: pointer;
  transition: background 0.12s ease;
}
.notif-row:last-child { border-bottom: 0; }
.notif-row:hover { background: var(--app-row-hover); }
.notif-row:focus-visible { outline: 2px solid var(--blue-500); outline-offset: -2px; }
.notif-row.is-unread { background: rgba(8, 69, 162, 0.045); box-shadow: inset 3px 0 0 var(--blue-500); }
.notif-row.is-unread:hover { background: rgba(8, 69, 162, 0.075); }
[data-theme="dark"] .notif-row.is-unread { background: rgba(16, 97, 223, 0.10); }
[data-theme="dark"] .notif-row.is-unread:hover { background: rgba(16, 97, 223, 0.16); }
/* read/unread dot, aligned with the message line */
.notif-row .nh-dot { margin-top: 5px; }

/* Skewed event chip — echoes the Delmar 12° brand angle */
.notif-chip {
  width: 32px; height: 32px;
  border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  transform: skewX(-12deg);
  flex: none;
  margin-top: 1px;
}
.notif-chip__inner { transform: skewX(12deg); display: inline-flex; }
.notif-chip--info    { background: var(--app-info-bg);    color: var(--app-info-fg); }
.notif-chip--teal    { background: var(--app-teal-bg);    color: var(--app-teal-fg); }
.notif-chip--success { background: var(--app-success-bg); color: var(--app-success-fg); }
.notif-chip--danger  { background: var(--app-danger-bg);  color: var(--app-danger-fg); }
.notif-chip--neutral { background: var(--app-neutral-bg); color: var(--app-neutral-fg); }

.notif-row__body { min-width: 0; }
.notif-row__msg {
  font-size: 13.5px;
  color: var(--app-text);
  line-height: 1.4;
  text-wrap: pretty;
}
.notif-row__wb {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--app-text);
  letter-spacing: -0.01em;
}
.notif-row__detail {
  font-size: 12px;
  color: var(--app-text-2);
  margin-top: 3px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-row__meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--app-text-3);
}
.notif-row__tag {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--app-text-3);
  background: var(--app-neutral-bg);
  padding: 1px 5px;
  border-radius: 3px;
}
.notif-row__sep { opacity: 0.6; }

.notif-row__view {
  align-self: center;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  color: var(--blue-500);
  background: none; border: 0; cursor: pointer;
  padding: 4px 2px;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity 0.12s ease, color 0.12s ease;
}
.notif-row__view .ico svg { width: 13px; height: 13px; }
.notif-row__view:hover { color: var(--blue-700); opacity: 1; }
[dir="rtl"] .notif-row__view .ico { transform: scaleX(-1); }

/* Empty state */
.notif-empty {
  padding: 40px 24px 44px;
  text-align: center;
}
.notif-empty__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--app-success-bg); color: var(--app-success-fg);
  margin-bottom: 12px;
}
.notif-empty__ico svg { width: 20px; height: 20px; }
.notif-empty__title { font-size: 14px; font-weight: 700; color: var(--app-text); }
.notif-empty__sub { font-size: 12.5px; color: var(--app-text-3); margin-top: 3px; }

/* Footer */
.notif-pop__foot {
  border-top: 1px solid var(--app-divider);
  background: var(--app-surface-2);
}
.notif-pop__history {
  width: 100%;
  padding: 12px;
  background: none; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: var(--blue-700);
  letter-spacing: 0.01em;
  transition: background 0.12s ease;
}
.notif-pop__history:hover { background: var(--app-row-hover); }
[data-theme="dark"] .notif-pop__history { color: var(--app-info-fg); }

/* ---- History dashboard (Shipments-style table) ---- */
/* read/unread dot in the leading column */
.nh-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--blue-500);
  cursor: pointer;
  vertical-align: middle;
}
.nh-dot--read {
  background: transparent;
  border: 1.5px solid var(--app-border);
}
/* unread rows get a subtle tint + accent on the leading cell */
.tbl tbody tr.is-unread-row { background: rgba(8, 69, 162, 0.045); }
.tbl tbody tr.is-unread-row:hover { background: rgba(8, 69, 162, 0.08); }
.tbl tbody tr.is-unread-row > td:first-child { box-shadow: inset 3px 0 0 var(--blue-500); }
[data-theme="dark"] .tbl tbody tr.is-unread-row { background: rgba(16, 97, 223, 0.12); }
[data-theme="dark"] .tbl tbody tr.is-unread-row:hover { background: rgba(16, 97, 223, 0.18); }
.tbl tbody tr.is-unread-row .nh-comment,
.tbl tbody tr.is-unread-row .nh-event,
.tbl tbody tr.is-unread-row .nh-obj__ref { color: var(--app-text); font-weight: 700; }

.nh-event { font-size: 13px; font-weight: 500; color: var(--app-text); }
.nh-obj { display: flex; align-items: center; gap: 8px; }
.nh-obj__ref {
  font-family: var(--font-mono); font-size: 12px; color: var(--app-text); font-weight: 600;
}
.nh-obj__type {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--app-text-3);
  background: var(--app-neutral-bg);
  padding: 2px 6px; border-radius: 3px;
  flex: none;
}
.nh-comment {
  max-width: 360px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nh-time { display: flex; flex-direction: column; line-height: 1.25; }
.nh-time__abs { font-size: 12.5px; color: var(--app-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nh-time__rel { font-size: 11px; color: var(--app-text-3); }
.nh-by { font-size: 12.5px; color: var(--app-text-2); white-space: nowrap; }
.nh-reftype { font-size: 13px; color: var(--app-text-2); white-space: nowrap; }

.nhist__empty {
  padding: 48px 24px; text-align: center;
  font-size: 13px; color: var(--app-text-3);
}
