/* HR OS — shared utility styles
 * Small set of component-y classes that are easier to read than long
 * Tailwind class strings. These use raw color values (matching the tokens
 * in tailwind-config.js) so they work without the Tailwind JIT @apply
 * machinery (the Play CDN doesn't process external stylesheets).
 */

/* ---- Body baseline ---- */
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1A1816;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
input, button, select, textarea { font-family: inherit; }
input::placeholder, textarea::placeholder { color: #9A968F; }

/* ---- Page canvas + content card (2026-06 design refresh) ----
   Soft paper canvas with a whisper of dot-grid texture; page content sits
   in a white card with a hairline border. Apply `page-canvas` on <body>,
   wrap the main content in `.page-card`, and lead the page header with a
   `.page-title-icon` chip. */
body.page-canvas {
  background-color: #F7F5F0;
  background-image: radial-gradient(rgba(122,118,111,0.13) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
.page-card {
  background: #fff;
  border: 1px solid #E8E3D9;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(28,24,18,0.04), 0 12px 32px -20px rgba(28,24,18,0.10);
  padding: 14px 16px 12px;
}
@media (max-width: 767px) { .page-card { padding: 10px 10px 12px; border-radius: 10px; } }
.page-title-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: #fff; border: 1px solid #E8E3D9;
  display: inline-flex; align-items: center; justify-content: center;
  color: #3A3833; flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(28,24,18,0.05);
}

/* ---- Left nav items ---- */
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #3A3833;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-link:hover { background: #F4F1EA; }
.nav-link.is-active { background: #F4F1EA; color: #1A1816; font-weight: 600; }
/* Expandable parents (Mailboxes, Org, Activity, Settings) are <button>s — must
   match the <a> nav-links exactly. Inherit only the font-FAMILY; a bare
   `font: inherit` shorthand would also reset font-size/weight to the inherited
   16px/400, making the expandable items render larger than the plain links. */
button.nav-link {
  width: 100%;
  border: 0; background: transparent;
  font-family: inherit; text-align: left;
  cursor: pointer;
}
button.nav-link:hover { background: #F4F1EA; }
.nav-link .nav-icon { color: #6B6862; display: inline-flex; }
.nav-link:hover .nav-icon { color: #3A3833; }
.nav-link.is-active .nav-icon { color: #DC2626; }
/* Nav icons ~15% smaller than their intrinsic 18px (CSS overrides the svg
   width/height attributes). Chevrons (.nav-group-chevron) are unaffected. */
.nav-icon svg { width: 15px; height: 15px; }

/* Small-caps group labels between nav sections */
.nav-section-label {
  padding: 16px 12px 5px;
  font-size: 10.5px; font-weight: 600;
  color: #9A968F;
  letter-spacing: 0.08em; text-transform: uppercase;
  user-select: none;
}

/* ---- Nav sub-items (auto-expanded under the active parent) ----
   Indented past the parent icon with a hairline tree rail; the active
   sub-item gets a red tick on the rail. */
.nav-group-chevron { margin-left: auto; color: #9A968F; transition: transform .15s; }
.nav-group-chevron.is-open { transform: rotate(180deg); }
.nav-subwrap { position: relative; margin: 1px 0 3px; }
.nav-subwrap::before {
  content: '';
  position: absolute; left: 19px; top: 3px; bottom: 3px;
  width: 1px; background: #E7E2D8;
}
.nav-sublink {
  display: flex; align-items: center;
  position: relative;
  padding: 6px 10px 6px 34px;       /* indent past the parent icon */
  border-radius: 7px;
  font-size: 12.5px; font-weight: 500;
  color: #6B6862; text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-sublink:hover { background: #F4F1EA; color: #1A1816; }
.nav-sublink.is-active { background: #F4F1EA; color: #1A1816; font-weight: 600; }
.nav-sublink.is-active::before {
  content: '';
  position: absolute; left: 19px; top: 6px; bottom: 6px;
  width: 2px; border-radius: 1px;
  background: #DC2626;
}

/* ---- Sidebar quick search (Ctrl+K) ---- */
.qs { position: relative; padding: 0 12px 6px; }
.qs-box {
  display: flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 7px 0 10px;
  border: 1px solid #E7E2D8; border-radius: 8px;
  background: #FBFAF7;
  cursor: text;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.qs-box:focus-within {
  background: #fff; border-color: #1A1816;
  box-shadow: 0 0 0 3px rgba(28,24,18,0.05);
}
.qs-box > svg { color: #ABA699; flex-shrink: 0; }
.qs-box input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-size: 12.5px; color: #1A1816;
}
.qs-kbd {
  font-size: 10px; color: #9A968F;
  border: 1px solid #E7E2D8; border-radius: 4px;
  padding: 1px 5px; background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.qs-pop {
  position: absolute; left: 12px; right: 12px; top: calc(100% + 2px);
  z-index: 60;
  background: #fff;
  border: 1px solid #E7E2D8; border-radius: 10px;
  box-shadow: 0 16px 40px rgba(28,24,18,0.14), 0 2px 8px rgba(28,24,18,0.06);
  padding: 4px;
  max-height: 332px; overflow-y: auto;
}
.qs-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 7px;
  cursor: pointer;
}
.qs-item:hover, .qs-item.is-hot { background: #F4F1EA; }
.qs-av {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 600; color: #1A1816;
  flex-shrink: 0;
}
.qs-name { font-size: 12.5px; font-weight: 500; color: #1A1816; line-height: 1.2; }
.qs-sub { font-size: 11px; color: #9A968F; line-height: 1.2; margin-top: 1px; }
.qs-empty { padding: 10px 12px; font-size: 12px; color: #9A968F; }

/* (In-page section sub-navs removed 2026-06-13 — the main sidebar now
   renders Mailboxes/Settings sub-links via [data-subnav-for].) */

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 6px;
  font-size: 12.5px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn-ghost   { background: #fff; border-color: #DDD8CE; color: #1A1816; }
.btn-ghost:hover { background: #FBFAF7; }
.btn-primary { background: #1A1816; border-color: #1A1816; color: #fff; }
.btn-primary:hover { background: #2E2A24; border-color: #2E2A24; }
.btn:disabled, .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-accent  { background: #DC2626; border-color: #DC2626; color: #fff; }
.btn-accent:hover { background: #B91C1C; border-color: #B91C1C; }
.btn-link    { color: #DC2626; font-weight: 500; padding: 0; background: transparent; }

/* ---- Inputs ---- */
.input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #DDD8CE;
  border-radius: 6px;
  background: #fff;
  color: #1A1816;
  font-size: 13px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus { border-color: #1A1816; box-shadow: 0 0 0 3px rgba(26,24,22,0.06); }
.input[disabled], .input:disabled { background: #FBFAF7; color: #7A766F; }

textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }

.label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #3A3833;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.help { font-size: 11.5px; color: #7A766F; margin-top: 4px; }

/* ---- Status pill ---- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 3px; }
.pill-active      { background: #E7F3EC; color: #0F7A3C; }
.pill-active .dot { background: #1F9D55; }
.pill-leave       { background: #FFF3DA; color: #8A5A00; }
.pill-leave .dot  { background: #D89B14; }
.pill-off         { background: #FBE1E1; color: #A02323; }
.pill-off .dot    { background: #D33A3A; }

/* ---- Department chip ---- */
.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F4F1EA;
  color: #3A3833;
  font-size: 12px;
  font-weight: 500;
}

/* ---- Filter pill button ---- */
.f-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 6px;
  background: #fff; border: 1px solid #E4DFD4;
  font-size: 12.5px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.f-pill:hover { background: #FBFAF7; }
.f-pill.is-active { background: #F4F1EA; border-color: #DDD8CE; }
.f-pill .f-label { color: #7A766F; font-weight: 500; }
.f-pill .f-value { color: #3A3833; font-weight: 500; }
.f-pill.is-active .f-value { color: #1A1816; font-weight: 600; }

/* ---- Keyboard chip ---- */
.kbd {
  font-size: 10.5px; color: #7A766F;
  border: 1px solid #E4DFD4; border-radius: 4px;
  padding: 2px 6px; letter-spacing: 0.05em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---- Popover menu ---- */
.menu {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #EDEAE3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  padding: 4px;
  min-width: 180px;
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 12.5px;
  color: #1A1816;
  cursor: pointer;
  text-decoration: none;
}
.menu-item:hover { background: #F4F1EA; }
.menu-item.danger { color: #A02323; }
.menu-divider { height: 1px; background: #EDEAE3; margin: 4px 2px; }

/* ---- Group bar (list grouping) ---- */
.group-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 8px;
  font-size: 12px; color: #1A1816;
  background: #FBFAF7;
  border-bottom: 1px solid #EDEAE3;
  cursor: pointer;
  user-select: none;
}
.group-bar .chev {
  transition: transform .15s;
  color: #7A766F;
  display: inline-flex;
}
.group-bar.is-open .chev { transform: rotate(90deg); }
.group-name { font-weight: 600; }
.group-count { font-size: 11px; color: #7A766F; font-weight: 500; }

/* ---- Table-like flex rows ---- */
.row {
  display: flex; align-items: center;
  padding: 0 8px;
  height: 44px;
  border-bottom: 1px solid #F4F1EA;
  background: #fff;
  font-size: 13px;
  color: #3A3833;
  transition: background .08s;
}
.row:hover { background: #FCFBF7; }
.row .cell {
  display: flex; align-items: center;
  padding: 0 10px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Toast (shared by employee + people pages) ---- */
.toast-stack {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  min-width: 260px; max-width: 420px;
  background: #1A1816; color: #fff;
  border-radius: 6px; padding: 10px 14px;
  font-size: 13px; line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  display: flex; gap: 10px; align-items: flex-start;
  pointer-events: auto;
}
.toast.success { background: #0F7A3C; }
.toast.error { background: #A02323; }

/* ---- Cards ---- */
.card {
  background: #fff;
  border: 1px solid #EDEAE3;
  border-radius: 8px;
}
.card-head {
  padding: 14px 16px;
  border-bottom: 1px solid #EDEAE3;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 13px; font-weight: 600; color: #1A1816; }
.card-body { padding: 16px; }

/* ---- Sidebar section header ---- */
/* Small uppercase muted label above a group of nav items (e.g. "TOOLS").
   Mirrors the look of .settings-nav-section on the Settings page. */
.nav-section {
  font-size: 10.5px;
  font-weight: 600;
  color: #9A968F;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 12px 4px;
}

/* ---- Indeterminate progress bar ---- */
/* Thin accent-red bar that slides back and forth while data loads. */
.progress-bar {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: #EDEAE3;
  overflow: hidden;
}
.progress-bar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 40%;
  border-radius: 999px;
  background: #DC2626;
  animation: progress-indeterminate 1.1s ease-in-out infinite;
}
@keyframes progress-indeterminate {
  0%   { left: -40%; }
  100% { left: 100%; }
}

/* Alpine hides x-cloak elements until it initialises; without this rule the
   attribute does nothing and hidden-by-default panels flash on page load. */
[x-cloak] { display: none !important; }

/* ---- Loading overlay ----
   Full-screen scrim + pill while a page fetches. Sits above the sidebar
   (z-50) but below nothing interactive — pointer events blocked on purpose
   so stale rows can't be clicked mid-reload. */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(28, 24, 18, 0.22);
}
.loading-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #E8E3D9;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #3F3A33;
  box-shadow: 0 1px 2px rgba(28,24,18,0.04), 0 12px 32px -20px rgba(28,24,18,0.25);
}
.loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2.5px solid #EDEAE3;
  border-top-color: #DC2626;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Org chart (org.html + org-company.html + org-leadership.html).
   Moved out of org.html's inline <style> 2026-06-14 so the three
   Org sub-pages share one stylesheet. Engine: d3-org-chart.
   ============================================================ */

/* ---- Org canvas ----
   Styled as a `.page-card` directly on the chart container — d3-org-chart
   sizes its <svg> off this element's clientWidth/Height, so the container
   must keep its layout role (no wrapper div). */
.org-canvas {
  position: relative;
  width: 100%;
  height: calc(100vh - 196px);
  min-height: 420px;
  border: 1px solid #E8E3D9;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(28,24,18,0.04), 0 12px 32px -20px rgba(28,24,18,0.10);
  background-image: radial-gradient(#E6E2D9 1px, transparent 1px);
  background-size: 22px 22px;
  overflow: hidden;
}
.org-canvas > .svg-chart-container { width: 100% !important; height: 100% !important; }

/* ---- Node card (compact, Airwallex density) ---- */
.org-node {
  position: relative;
  display: flex;
  height: 100%;
  background: #fff;
  border: 1px solid #EDEAE3;
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .12s, border-color .12s, transform .12s;
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
}
.org-node:hover { border-color: #D6D2C8; box-shadow: 0 6px 18px rgba(0,0,0,0.08); transform: translateY(-1px); }
.org-node.is-hot { border-color: #DC2626; box-shadow: 0 0 0 1px #DC2626, 0 8px 22px rgba(220,38,38,0.16); }

.org-accent { width: 4px; flex-shrink: 0; }
.org-node-inner { flex: 1; min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }

.org-node-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.org-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 11px; font-weight: 600; color: #1A1816;
}
.org-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.org-name { font-size: 13px; font-weight: 600; color: #1A1816; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-title { font-size: 11px; color: #7A766F; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.org-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Foreign-company badge — shown in the per-company view on a manager who
   belongs to a different company but connects this company's reporting line
   (e.g. a Paramount Liquor exec above Paramount Retail staff). */
.org-foreign {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 3px; align-self: flex-start;
  padding: 1px 6px; border-radius: 5px;
  background: #FBF3E6; color: #8A5A00; border: 1px solid #F0E2C8;
  font-size: 10px; font-weight: 600; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

/* Profile link in the card's top-right */
.org-open {
  display: grid; place-items: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 6px;
  color: #9A968F; background: transparent; text-decoration: none;
  transition: background .1s, color .1s;
}
.org-open:hover { background: #F4F1EA; color: #DC2626; }

.org-reports { display: flex; align-items: center; gap: 6px; }
.org-chip {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 600; line-height: 1;
  padding: 3px 7px; border-radius: 5px;
  background: #F4F1EA; color: #3A3833;
  font-variant-numeric: tabular-nums;
}
.org-chip.ghost { background: transparent; color: #9A968F; padding-left: 0; font-weight: 500; }
.org-leaf { font-size: 10.5px; color: #B7B2A8; font-weight: 500; }

/* ---- Synthetic root node (company name, "Paramount Group", "Leadership") ---- */
.org-node.org-company { background: #1A1816; border-color: #1A1816; cursor: default; }
.org-node.org-company:hover { transform: none; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.org-company .org-node-inner { flex-direction: row; align-items: center; gap: 11px; padding: 12px 16px; }
.org-company-logo { width: 34px; height: 34px; border-radius: 50%; background: #DC2626; color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; flex-shrink: 0; }
.org-company-name { font-size: 14px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.org-company-sub { font-size: 11px; color: #B7B2A8; margin-top: 1px; }

/* ---- Expand / collapse button (d3-org-chart buttonContent) ---- */
.org-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 11px;
  background: #fff; border: 1px solid #DDD8CE;
  font-size: 11px; font-weight: 600; color: #3A3833;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  font-variant-numeric: tabular-nums;
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
}
.org-btn svg { transition: transform .15s; }
.org-btn.is-open { background: #1A1816; border-color: #1A1816; color: #fff; }
.org-btn.is-open svg { transform: rotate(180deg); }

/* ---- Toolbar ---- */
.org-tool {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 11px; border-radius: 7px;
  border: 1px solid #EDEAE3; background: #fff; color: #3A3833;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .1s, border-color .1s;
}
.org-tool:hover { background: #F4F1EA; border-color: #DDD8CE; }
.org-search { height: 34px; }

/* Checkbox indicator inside the "Show disabled" toggle */
.org-toolcheck {
  width: 14px; height: 14px; flex-shrink: 0;
  border: 1.5px solid #C5C0B6; border-radius: 3.5px;
  display: inline-block; position: relative;
  transition: background .1s, border-color .1s;
}
.org-toolcheck.is-on { background: #DC2626; border-color: #DC2626; }
.org-toolcheck.is-on::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 3px; height: 6.5px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.org-legend-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #7A766F; }
.org-legend-dot { width: 9px; height: 9px; border-radius: 2.5px; flex-shrink: 0; }

/* ---- Company switcher tabs (per-company view only) ---- */
.org-tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid #EDEAE3; background: #fff; color: #3A3833;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .1s, border-color .1s, color .1s;
}
.org-tab:hover { background: #F4F1EA; border-color: #DDD8CE; }
.org-tab.is-active { background: #1A1816; border-color: #1A1816; color: #fff; }
.org-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: #F4F1EA; color: #7A766F;
  font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.org-tab.is-active .org-tab-count { background: rgba(255,255,255,0.16); color: #fff; }

/* ---- Mobile list cards (People + Mailboxes lists, below md:) ----
   Shared so list pages render as cards on small screens instead of a clipped
   desktop table. Title is the hero; secondary fields are full-width labelled
   lines (.p-card-field + .p-card-k). */
.p-card {
  display: block;
  background: #fff;
  border: 1px solid #EDEAE3;
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  color: #3A3833;
  transition: background .08s, border-color .08s;
}
.p-card:hover { background: #FCFBF7; border-color: #DDD8CE; }
.p-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-card-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #1A1816;
  flex-shrink: 0;
}
.p-card-name { font-size: 15px; font-weight: 600; color: #1A1816; line-height: 1.2; }
.p-card-email { font-size: 12px; color: #7A766F; margin-top: 2px; word-break: break-all; }
.p-card-meta { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.p-card-title-main { font-size: 14px; font-weight: 600; color: #1A1816; line-height: 1.25; }
.p-card-title-sub  { font-size: 12px; color: #7A766F; line-height: 1.3; margin-top: 1px; }
.p-card-field { font-size: 12.5px; color: #3A3833; line-height: 1.35; }
.p-card-k {
  color: #9A968F; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 600; margin-right: 7px;
}
.p-card-offshore {
  display: inline-block; margin-left: 7px; padding: 0 6px; border-radius: 4px;
  background: #FBF3E6; color: #8A5A00; font-size: 10px; font-weight: 600;
}

/* ============================================================
   Faceted list — shared filter panel + toolbar chrome.
   Used by the Mailboxes pages (and any page built on the
   window.hrFacetedList() factory). People/Groups carry their
   own inline copies for now.
   ============================================================ */
.flist-main { transition: margin-right .32s cubic-bezier(.22,.61,.36,1); }
@media (min-width: 768px) {
  .flist-wrap.is-docked .flist-main { margin-right: var(--fw, 320px); }
}
.flist-wrap.is-resizing { user-select: none; cursor: col-resize; }
.flist-wrap.is-resizing .flist-main,
.flist-wrap.is-resizing .fpanel { transition: none !important; }

.fpanel {
  position: fixed; top: 52px; right: 0; bottom: 0;
  width: min(var(--fw, 320px), calc(100vw - 24px));
  z-index: 40; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #FCFBF8 0%, #F8F6F0 100%);
  border-left: 1px solid #E7E2D8; box-shadow: -12px 0 32px rgba(28,24,18,0.07);
  transform: translateX(0); visibility: visible;
  transition: transform .32s cubic-bezier(.22,.61,.36,1), box-shadow .32s ease, border-radius .32s ease, top .32s ease, bottom .32s ease, right .32s ease, visibility 0s 0s;
}
.fpanel.is-closed { transform: translateX(calc(100% + 32px)); visibility: hidden; transition: transform .26s cubic-bezier(.45,.03,.65,.12), visibility 0s .26s; }
@media (min-width: 768px) {
  .fpanel.is-pinned { box-shadow: none; }
  .fpanel:not(.is-pinned) { top: 62px; right: 10px; bottom: 10px; border: 1px solid #E7E2D8; border-radius: 14px; box-shadow: 0 28px 64px rgba(28,24,18,0.16), 0 6px 20px rgba(28,24,18,0.07); overflow: hidden; }
}
.fgrip { position: absolute; left: -3px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 2; display: none; touch-action: none; }
@media (min-width: 768px) { .fgrip { display: block; } }
.fgrip::after { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; background: transparent; transition: background .15s; }
.fgrip:hover::after, .flist-wrap.is-resizing .fgrip::after { background: #DC2626; }

.fhead { display: flex; align-items: center; gap: 6px; height: 50px; padding: 0 12px 0 18px; border-bottom: 1px solid #EDE9DF; flex-shrink: 0; }
.fhead-title { font-size: 13px; font-weight: 600; color: #1A1816; }
.fbtn { width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #8A8579; background: transparent; border: 0; cursor: pointer; transition: background .12s, color .12s; }
.fbtn:hover { background: #F0EDE4; color: #1A1816; }
.fbtn.is-on { color: #DC2626; background: rgba(220,38,38,0.08); }

.fchips { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 18px 12px; border-bottom: 1px solid #EDE9DF; flex-shrink: 0; max-height: 132px; overflow-y: auto; }
.fchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 6px 3px 9px; border-radius: 6px; background: #fff; border: 1px solid #E4DFD4; font-size: 11.5px; color: #3A3833; box-shadow: 0 1px 1px rgba(28,24,18,0.03); }
.fchip .fchip-k { color: #9A968F; font-weight: 500; }
.fchip b { font-weight: 600; color: #1A1816; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip button { width: 15px; height: 15px; border-radius: 4px; border: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: #B5B0A4; cursor: pointer; transition: background .1s, color .1s; }
.fchip button:hover { background: #FBEAEA; color: #DC2626; }

.fbody { flex: 1; overflow-y: auto; padding: 4px 10px 16px; overscroll-behavior: contain; }
.fbody::-webkit-scrollbar { width: 10px; }
.fbody::-webkit-scrollbar-thumb { background: #E0DBD0; border-radius: 5px; border: 3px solid #F8F6F0; }

.fsec { padding: 4px 0 12px; }
.fsec + .fsec { border-top: 1px solid #EFEBE1; }
.fpanel:not(.is-closed) .fsec { animation: fsec-in .4s cubic-bezier(.22,.61,.36,1) both; animation-delay: calc(60ms + var(--i, 0) * 35ms); }
@keyframes fsec-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .fpanel, .flist-main { transition: none !important; } .fpanel:not(.is-closed) .fsec { animation: none; } }
.fsec-head { width: 100%; display: flex; align-items: center; gap: 7px; padding: 9px 8px 7px; border: 0; background: transparent; cursor: pointer; font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: #7A766F; border-radius: 6px; text-align: left; }
.fsec-head:hover { color: #1A1816; }
.fsec-n { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #DC2626; color: #fff; font-size: 10px; letter-spacing: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.fsec-chev { margin-left: auto; color: #B5B0A4; transition: transform .18s; flex-shrink: 0; }
.fsec.is-open .fsec-chev { transform: rotate(180deg); }
.fsec-body { padding: 1px 8px 0; }
.fsearch { position: relative; margin: 2px 0 7px; }
.fsearch svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: #ABA699; pointer-events: none; }
.fsearch input { width: 100%; height: 30px; padding: 0 9px 0 29px; border: 1px solid #E2DDD2; border-radius: 7px; background: #fff; color: #1A1816; font-size: 12px; outline: none; transition: border-color .12s, box-shadow .12s; }
.fsearch input:focus { border-color: #1A1816; box-shadow: 0 0 0 3px rgba(28,24,18,0.05); }
.fsearch input::placeholder { color: #ABA699; }
.fs-list { display: flex; flex-direction: column; gap: 1px; max-height: 218px; overflow-y: auto; margin: 0 -4px; padding-right: 2px; }
.fs-list::-webkit-scrollbar { width: 8px; }
.fs-list::-webkit-scrollbar-thumb { background: #E5E0D5; border-radius: 4px; border: 2px solid #F8F6F0; }
.fs-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; color: #3A3833; cursor: pointer; user-select: none; transition: background .1s; }
.fs-item:hover { background: #F1EDE3; }
.fs-item.is-active { color: #1A1816; }
.fs-item.is-active .fs-label { font-weight: 600; }
.fs-check { width: 15px; height: 15px; border: 1.5px solid #C9C4B9; border-radius: 4.5px; display: inline-flex; align-items: center; justify-content: center; background: #fff; flex-shrink: 0; transition: background .12s, border-color .12s, transform .12s; }
.fs-item:active .fs-check { transform: scale(0.88); }
.fs-item.is-active .fs-check { background: #DC2626; border-color: #DC2626; }
.fs-check svg { display: none; color: #fff; }
.fs-item.is-active .fs-check svg { display: block; }
.fs-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-count { font-size: 11px; color: #A39E92; font-variant-numeric: tabular-nums; }
.fs-item.is-active .fs-count { color: #DC2626; font-weight: 600; }
.ffoot { display: flex; align-items: center; gap: 8px; padding: 10px 14px 10px 18px; border-top: 1px solid #EDE9DF; background: #FBFAF6; flex-shrink: 0; font-size: 12px; color: #7A766F; }
.ffoot b { color: #1A1816; font-weight: 600; font-variant-numeric: tabular-nums; }
.ffoot-clear { margin-left: auto; border: 0; background: transparent; cursor: pointer; font-size: 11.5px; font-weight: 600; color: #DC2626; padding: 4px 8px; border-radius: 6px; transition: background .12s; }
.ffoot-clear:hover { background: rgba(220,38,38,0.07); }
.filter-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: #DC2626; color: #fff; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.pop { background: #fff; border: 1px solid #EDEAE3; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04); padding: 6px; min-width: 120px; max-height: 320px; overflow-y: auto; }
.pop-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; font-size: 12.5px; color: #1A1816; cursor: pointer; }
.pop-item:hover { background: #F4F1EA; }
.flist-page-btn { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; font-size: 12.5px; color: #3A3833; border: 1px solid transparent; cursor: pointer; user-select: none; }
.flist-page-btn:hover:not([disabled]) { background: #F4F1EA; }
.flist-page-btn.is-current { background: #1A1816; color: #fff; }
.flist-page-btn[disabled] { color: #C5C0B6; cursor: not-allowed; }
