/* ============================================================
   Design system component vocabulary — ported from the designers'
   "Design System and Nav - iFort / Design Library" (library.css + the page
   patterns in Navigation Shell). Tokens live in app.css :root; Syncfusion
   theme variables are mapped in sf-tokens.css. This file carries the shared
   component classes pages use directly.

   Class names deliberately mirror the library (and where the library mirrors
   Syncfusion — .e-btn, .e-chip, .e-avatar — these rules also bring the real
   Syncfusion components onto spec). Loaded last in index.html so they win
   over Bootstrap and the Syncfusion theme.
   ============================================================ */

/* ---- typography helpers (Design Library §2) ---- */
.t-h1 { font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.t-h2 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.t-h3 { font-size: 18px; font-weight: 600; }
.t-body { font-size: 15px; }
.t-small { font-size: 13px; color: var(--muted-text); }
.t-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-text); }
/* multi-sentence explanatory text — intros, help blurbs, empty-state guidance.
   Anything longer than one line of UI copy should sit in this, not .t-small/.help-text. */
.t-prose { font-size: 14px; line-height: 1.6; max-width: 70ch; }
.t-prose p { margin: 0 0 var(--space-2); }
.t-prose p:last-child { margin-bottom: 0; }

/* ---- buttons (§5) — one primary per view; outline secondary, flat tertiary,
   danger destructive only. Doubles as the skin for SfButton variants. ---- */
.e-btn {
  font-family: var(--font); font-size: 14px; font-weight: 600;
  border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: .15s; line-height: 1.3;
}
.e-btn:not(.e-icon-btn) { padding: 8px 18px; display: inline-flex; align-items: center; gap: 7px; }
.e-btn.e-primary, .e-btn.e-primary:focus { background: var(--accent); border-color: transparent; color: var(--white); }
.e-btn.e-primary:hover, .e-btn.e-primary:active { background: var(--accent-hover); color: var(--white); }
.e-btn.e-outline, .e-btn.e-outline:focus { background: transparent; color: var(--accent); border-color: var(--accent); box-shadow: none; }
.e-btn.e-outline:hover, .e-btn.e-outline:active { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); }
.e-btn.e-flat, .e-btn.e-flat:focus { background: transparent; border-color: transparent; color: var(--ink); box-shadow: none; }
.e-btn.e-flat:hover, .e-btn.e-flat:active { background: var(--surface); color: var(--ink); }
.e-btn.e-danger, .e-btn.e-danger:focus { background: var(--error); border-color: transparent; color: var(--white); }
.e-btn.e-danger:hover, .e-btn.e-danger:active { background: var(--error-bright); color: var(--white); }
.e-btn.sm, .e-btn.e-small { padding: 5px 13px; font-size: 13px; }
.e-btn.lg { padding: 11px 24px; font-size: 15px; }
.e-btn:disabled { opacity: .45; cursor: not-allowed; }
.e-btn .gi { font-size: 16px; line-height: 1; }

/* ---- float-label text input (§6) — scoped to the .e-float pattern so it
   doesn't fight Syncfusion's .e-input-group internals ---- */
.e-float { position: relative; margin-top: var(--space-3); }
.e-float > .e-input {
  width: 100%; font-family: var(--font); font-size: 14px; padding: 8px 0;
  border: none; border-bottom: 1px solid var(--muted); border-radius: 0;
  background: transparent; outline: none; color: var(--ink);
}
.e-float > .e-input:focus { border-bottom: 2px solid var(--accent); }
.e-float > .e-input:disabled { color: var(--muted); border-bottom-style: dashed; }
.e-float > label { position: absolute; top: -12px; left: 0; font-size: 11px; color: var(--accent); letter-spacing: .04em; }
.field-err > .e-input { border-bottom-color: var(--error); }
.field-err > label { color: var(--error) !important; }
.err-text { font-size: 11px; color: var(--error); margin-top: 4px; }
.help-text { font-size: 11px; color: var(--muted-text); margin-top: 4px; }

/* ---- checkbox / radio / switch (§7) — hand-rolled pattern; prefer
   SfCheckBox/SfSwitch (themed via sf-tokens.css) in new code ---- */
label.e-check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; user-select: none; }
label.e-check input { position: absolute; opacity: 0; width: 0; height: 0; }
label.e-check .box {
  width: 18px; height: 18px; border: 1.5px solid var(--muted); border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center; transition: .12s; flex-shrink: 0;
}
label.e-check .box::after {
  content: ""; width: 9px; height: 5px; border-left: 2px solid var(--white); border-bottom: 2px solid var(--white);
  transform: rotate(-45deg) scale(0); transition: .12s; margin-top: -2px;
}
label.e-check input:checked + .box { background: var(--accent); border-color: var(--accent); }
label.e-check input:checked + .box::after { transform: rotate(-45deg) scale(1); }
label.e-check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
label.e-check.radio .box { border-radius: 50%; }
label.e-check.radio .box::after { width: 8px; height: 8px; border: none; border-radius: 50%; background: var(--white); transform: scale(0); margin: 0; }
label.e-check.radio input:checked + .box::after { transform: scale(1); }
label.e-check input:disabled + .box { opacity: .4; }
label.e-check input:disabled ~ * { opacity: .5; }

label.e-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; }
label.e-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
label.e-switch .track { width: 38px; height: 20px; border-radius: 20px; background: var(--muted); position: relative; transition: .15s; flex-shrink: 0; }
label.e-switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: .15s;
}
label.e-switch input:checked + .track { background: var(--accent); }
label.e-switch input:checked + .track::after { transform: translateX(18px); }
label.e-switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- chips (§9) ---- */
.e-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 14px; background: var(--surface); color: var(--ink); }
.e-chip.active { background: var(--accent); color: var(--white); }
.e-chip.muted { background: transparent; border: 1px solid var(--line); color: var(--muted-text); }
.e-chip .x { cursor: pointer; font-size: 11px; opacity: .7; }
.e-chip .x:hover { opacity: 1; }

/* ---- cards (§12) — overrides Bootstrap's .card; padding stays on .card-body
   so existing .card > .card-body markup doesn't double up ---- */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.card > .card-body { padding: var(--space-4); }
.card.hoverable { transition: .15s; cursor: pointer; }
.card.hoverable:hover { box-shadow: var(--shadow-2); border-color: var(--accent); }
.card h3 { font-size: 15px; font-weight: 600; margin-bottom: var(--space-1); }
.card .card-media {
  height: 96px; border-radius: var(--radius); background: var(--accent-tint);
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-3);
  display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 28px;
}

/* ---- avatar (§13) ---- */
.e-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
  flex-shrink: 0; overflow: hidden;
}
.e-avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.e-avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.e-avatar.square { border-radius: var(--radius); }
.e-avatar.tint { background: var(--accent-tint); color: var(--accent); }
.avatar-stack { display: flex; }
.avatar-stack .e-avatar { border: 2px solid var(--white); margin-left: -10px; }
.avatar-stack .e-avatar:first-child { margin-left: 0; }

/* ---- tooltip (§14) ---- */
.tip { position: relative; display: inline-flex; }
.tip .bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--ink); color: var(--white); font-size: 12px; padding: 5px 9px; border-radius: var(--radius);
  white-space: nowrap; opacity: 0; pointer-events: none; transition: .13s; z-index: 30;
}
.tip .bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
.tip:hover .bubble, .tip:focus-within .bubble { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- progress + inline spinner (§15) ---- */
.e-progress { height: 8px; background: var(--surface); border-radius: 20px; overflow: hidden; }
.e-progress .fill { height: 100%; background: var(--accent); border-radius: 20px; transition: width .4s; }
.e-progress.success .fill { background: var(--success); }
.spinner {
  width: 24px; height: 24px; border: 2.5px solid var(--accent-tint); border-top-color: var(--accent);
  border-radius: 50%; animation: ds-spin .7s linear infinite;
}
.spinner.lg { width: 40px; height: 40px; border-width: 3.5px; }
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ---- skeleton loaders (§16) — placeholder shapes for content being replaced;
   keep them on --surface, swap out the moment data lands ---- */
.skel { background: var(--surface); border-radius: var(--radius); position: relative; overflow: hidden; }
.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: ds-shimmer 1.3s infinite;
}
@keyframes ds-shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } .skel { opacity: .85; } }
.skel.text { height: 11px; border-radius: 3px; }
.skel.text.lg { height: 15px; }
.skel.title { height: 20px; width: 55%; border-radius: 3px; }
.skel.line-90 { width: 90%; } .skel.line-75 { width: 75%; } .skel.line-60 { width: 60%; } .skel.line-40 { width: 40%; }
.skel.circle { border-radius: 50%; }
.skel.block { width: 100%; }
.skel-card { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.skel-row { display: flex; align-items: center; gap: var(--space-3); }
.skel-lines { display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }

/* ---- data table (§17) — hand-rolled <table class="e-grid"> during migration;
   prefer SfGrid (themed via sf-tokens.css) for new grids ---- */
/* display:table — the Syncfusion theme's SfGrid rule (.e-grid{display:block})
   also matches this selector and would shrink the columns to content width */
table.e-grid { display: table; width: 100%; border-collapse: collapse; font-size: 13px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.e-grid th {
  background: var(--surface); text-align: left; padding: 9px 12px; font-weight: 600; font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted-text); border-bottom: 1px solid var(--line);
}
table.e-grid td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
table.e-grid tr:last-child td { border-bottom: none; }
/* zebra striping — alternating row tint. Set on the row, not the cell, so
   explicit cell backgrounds (.green/.red variance, hover, tr.row-flag) still
   paint over it. */
table.e-grid tbody tr:nth-child(even) { background: var(--surface); }
table.e-grid tbody tr:hover td { background: var(--accent-tint); }
table.e-grid th.num, table.e-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.e-grid th .colfilter { float: right; color: var(--muted-text); font-size: 11px; cursor: pointer; }
table.e-grid th .colfilter.active { color: var(--accent); }

/* sortable column headers — click toggles asc/desc; faint ↕ marks the
   affordance, accent ▲/▼ marks the active column */
table.e-grid th.sortable { cursor: pointer; user-select: none; }
table.e-grid th.sortable:hover { color: var(--accent); }
table.e-grid th.sortable .sort-ico { margin-left: 5px; font-size: 8px; color: var(--muted); }
table.e-grid th.sortable.sorted { color: var(--accent); }
table.e-grid th.sortable.sorted .sort-ico { color: var(--accent); }

/* grid toolbar (§21) */
.grid-toolbar {
  display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; background: var(--surface);
}
.grid-toolbar .search { position: relative; flex: 1; max-width: 260px; }
.grid-toolbar .search input {
  width: 100%; font-family: var(--font); font-size: 14px; padding: 9px 12px 9px 38px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); outline: none;
}
.grid-toolbar .search input:focus { border-color: var(--accent); }
.grid-toolbar .search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-text); font-size: 18px; line-height: 1; pointer-events: none; }
.grid-toolbar .filter-chip {
  font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--white); color: var(--muted-text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.grid-toolbar .filter-chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.grid-toolbar.attached + table.e-grid { border-radius: 0 0 var(--radius) var(--radius); }
.grid-toolbar .count { margin-left: auto; font-size: 11px; color: var(--muted-text); }

/* row / cell highlight — amber means "matched your search", never a status (§21) */
tr.row-flag td { background: var(--highlight) !important; box-shadow: inset 3px 0 0 var(--highlight-line); }
mark.match { background: var(--highlight); color: var(--ink); padding: 0 1px; border-radius: 2px; }
.val-up { color: var(--success); font-weight: 600; }
.val-down { color: var(--error); font-weight: 600; }

/* ---- pagination (§18) ---- */
.e-pager button {
  font: inherit; font-size: 13px; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line);
  background: var(--white); border-radius: var(--radius); cursor: pointer; color: var(--muted-text);
  display: inline-flex; align-items: center; justify-content: center; transition: .12s;
}
.e-pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.e-pager button.cur { background: var(--accent); border-color: var(--accent); color: var(--white); font-weight: 600; }
.e-pager button:disabled { opacity: .4; cursor: not-allowed; }
.e-pager .gap { color: var(--muted); padding: 0 2px; }

/* ---- breadcrumb (§19) ---- */
.e-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.e-crumb a { color: var(--muted-text); text-decoration: none; }
.e-crumb a:hover { color: var(--accent); }
.e-crumb .sep { color: var(--muted); font-size: 11px; }
.e-crumb .cur { color: var(--ink); font-weight: 600; }

/* ---- modal (§20) — scoped under .modal-scrim so Bootstrap's .modal rules are
   neutralised only inside the design-system pattern ---- */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(16,24,40,.45); display: none;
  align-items: center; justify-content: center; z-index: 1100; padding: var(--space-4);
}
.modal-scrim.open { display: flex; }
.modal-scrim > .modal {
  position: static; display: block; height: auto; overflow: hidden;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-2);
  width: 100%; max-width: 420px; animation: ds-modal-in .18s ease;
}
@keyframes ds-modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-scrim .m-head { padding: var(--space-4) var(--space-4) var(--space-3); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-scrim .m-head h3 { font-size: 17px; font-weight: 600; margin: 0; }
.modal-scrim .m-head .close { border: none; background: none; font-size: 16px; color: var(--muted-text); cursor: pointer; line-height: 1; padding: 2px; }
.modal-scrim .m-body { padding: 0 var(--space-4) var(--space-4); font-size: 14px; color: var(--muted-text); }
.modal-scrim .m-foot {
  padding: var(--space-3) var(--space-4); background: var(--surface);
  display: flex; justify-content: flex-end; gap: var(--space-2); border-top: 1px solid var(--line);
}

/* ---- status (§22) — tint fills, hue marks; colour never the only signal ---- */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 14px; line-height: 1.3; }
.pill.s-success { background: var(--success-tint); color: var(--success); }
.pill.s-warning { background: var(--warning-tint); color: var(--warning); }
.pill.s-error { background: var(--error-tint); color: var(--error); }
.pill.s-info { background: var(--info-tint); color: var(--info); }
.pill.s-neutral { background: var(--surface); color: var(--muted-text); }
.dot.s-success { background: var(--success); } .dot.s-warning { background: var(--warning); }
.dot.s-error { background: var(--error); } .dot.s-info { background: var(--info); } .dot.s-neutral { background: var(--muted); }

/* ---- inline messages (§23) — persistent, in the page flow ---- */
.msg { display: flex; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); font-size: 13px; margin-bottom: var(--space-2); }
.msg .marker { width: 3px; border-radius: 2px; flex-shrink: 0; }
.msg .body { flex: 1; }
.msg .body strong { display: block; font-size: 13px; margin-bottom: 2px; }
.msg .body p { color: var(--muted-on-tint); font-size: 13px; line-height: 1.55; max-width: 70ch; margin: 0; }
.msg .close { margin-left: 0; font: inherit; border: none; background: none; color: var(--muted-on-tint); font-size: 14px; cursor: pointer; line-height: 1; }
.msg.success { background: var(--success-tint); border-color: transparent; } .msg.success .marker { background: var(--success); } .msg.success strong { color: var(--success); }
.msg.warning { background: var(--warning-tint); border-color: transparent; } .msg.warning .marker { background: var(--warning); } .msg.warning strong { color: var(--warning); }
.msg.error { background: var(--error-tint); border-color: transparent; } .msg.error .marker { background: var(--error); } .msg.error strong { color: var(--error); }
.msg.info { background: var(--info-tint); border-color: transparent; } .msg.info .marker { background: var(--info); } .msg.info strong { color: var(--info); }

/* ---- page patterns (Navigation Shell mock) ---- */
.page-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.page-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.page-head .spacer { flex: 1; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); margin-bottom: var(--space-5); }
.panel-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.panel-head .tick { width: 3px; height: 14px; background: var(--accent); border-radius: 2px; }
.panel-head h2 { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: var(--space-4); }

.fld { display: flex; flex-direction: column; gap: 5px; }
.fld label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-text); }
.fld select, .fld input {
  font-family: var(--font); font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); outline: none; min-width: 160px;
}
.fld select:focus, .fld input:focus { border-color: var(--accent); }

/* ---- dropdown (§8) — SfDropDownList onto the library spec: bordered field,
   floating 4px-radius menu with soft elevation, tick on the selected option.
   The field rules are scoped to the .fld pattern; the menu renders in a
   body-level portal so its rules are global. ---- */
/* !important: material3's focus selectors carry long :not() chains
   (border-width:0 0 1px 0 on .e-input-focus) that out-specify any sane
   selector here; the skin must hold through hover/focus/open. */
.fld .e-input-group.e-ddl,
.fld .e-input-group.e-ddl.e-control-wrapper,
.fld .e-input-group.e-ddl:not(.e-disabled):hover {
  border: 1px solid var(--muted) !important; border-radius: var(--radius); background: var(--white);
  padding: 0 8px 0 12px; margin-bottom: 0; min-width: 160px; box-shadow: none !important;
}
.fld .e-input-group.e-ddl::before, .fld .e-input-group.e-ddl::after { content: none !important; }
.fld .e-input-group.e-ddl.e-input-focus,
.fld .e-input-group.e-ddl.e-input-focus:not(.e-disabled):hover { border: 1px solid var(--accent) !important; }
.fld .e-input-group.e-ddl input.e-input {
  font-family: var(--font); font-size: 13px; padding: 7px 0; height: auto; min-height: 0;
  background: transparent; color: var(--ink);
}
.fld .e-input-group.e-ddl .e-input-group-icon,
.fld .e-input-group.e-ddl .e-clear-icon {
  color: var(--muted-text); font-size: 12px; background: transparent; min-height: 0; min-width: 24px;
}

.e-popup.e-ddl {
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); background: var(--white); overflow: hidden;
}
.e-popup.e-ddl .e-dropdownbase { padding: 4px; }
.e-popup.e-ddl .e-list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--font); font-size: 13px; color: var(--ink);
  padding: 7px 10px; border-radius: 3px; line-height: 1.4; min-height: 0; height: auto;
  text-indent: 0;
}
.e-popup.e-ddl .e-list-item.e-hover { background: var(--surface); color: var(--ink); }
.e-popup.e-ddl .e-list-item.e-active,
.e-popup.e-ddl .e-list-item.e-active.e-hover {
  background: var(--accent-tint); color: var(--accent); font-weight: 600;
}
.e-popup.e-ddl .e-list-item.e-active::after {
  content: "✓"; font-size: 12px; color: var(--accent); position: static; transform: none; opacity: 1;
}
.e-popup.e-ddl .e-nodata { font-family: var(--font); font-size: 13px; color: var(--muted-text); padding: 10px; }

/* the type-ahead box inside the popup: flat field over a hairline, no
   material underline / shadow bar */
.e-popup.e-ddl .e-filter-parent { box-shadow: none; border-bottom: 1px solid var(--line); padding: 4px; }
.e-popup.e-ddl .e-filter-parent .e-input-group,
.e-popup.e-ddl .e-filter-parent .e-input-group.e-input-focus,
.e-popup.e-ddl .e-filter-parent .e-input-group:not(.e-disabled):hover {
  border: none; background: transparent; margin: 0; box-shadow: none;
}
.e-popup.e-ddl .e-filter-parent .e-input-group::before,
.e-popup.e-ddl .e-filter-parent .e-input-group::after { content: none; }
.e-popup.e-ddl .e-filter-parent input.e-input-filter,
.e-popup.e-ddl .e-filter-parent .e-input-group.e-input-focus input.e-input-filter {
  font-family: var(--font); font-size: 13px; padding: 6px 8px;
}
.e-popup.e-ddl .e-filter-parent .e-input-group-icon { color: var(--muted-text); }

.summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 900px) { .summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .summary { grid-template-columns: 1fr; } }
.scell { background: var(--white); padding: var(--space-3); }
.scell .stitle { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-text); margin-bottom: var(--space-2); }
.scell .pair { display: flex; justify-content: space-between; gap: var(--space-3); }
.scell .pair .lbl { font-size: 11px; color: var(--muted-text); }
.scell .pair .val { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.tag { display: inline-flex; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius); background: var(--surface); color: var(--muted-text); }
.joblink { color: var(--accent); font-weight: 600; text-decoration: none; }
.joblink:hover { text-decoration: underline; }

/* ---- focus visibility — every interactive element (§24) ---- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---- responsive: reflow the shared patterns on phones. Desktop (>=901px) is
   untouched; the 900px tier above is the tablet step. Everything below only
   applies at <=640px so it never alters the base/desktop rules. ---- */
@media (max-width: 640px) {
  /* wide grids scroll inside their panel instead of widening the page; tighten
     the panel padding that would otherwise force horizontal overflow */
  .panel-body { padding: var(--space-3); overflow-x: auto; }
  /* relax the 160px floors so filter fields shrink and wrap instead of overflowing */
  .fld select, .fld input { min-width: 0; }
  .fld .e-input-group.e-ddl,
  .fld .e-input-group.e-ddl.e-control-wrapper,
  .fld .e-input-group.e-ddl:not(.e-disabled):hover { min-width: 0 !important; }
  /* page-head actions wrap onto a new line rather than overflowing the row */
  .page-head { flex-wrap: wrap; }
  /* modal stays within the viewport and scrolls if its content is taller */
  .modal-scrim { padding: var(--space-3); }
  .modal-scrim > .modal { max-height: calc(100vh - 2 * var(--space-3)); overflow-y: auto; }
}
