/*
 * global.css — Base styles + Sidebar + Login structural styles
 *
 * Loaded on every page regardless of theme.
 * All visual values come from CSS custom properties defined in
 * public/themes/<slug>/style.css which is loaded after this file.
 *
 * To restyle a component: override the relevant --sidebar-* or --brand-*
 * variables in your theme's style.css. For structural changes (different
 * HTML layout), register a custom Sidebar component via ThemeExports.Sidebar.
 */

/* ─────────────────────────────────────────────
   Base typography
   ─────────────────────────────────────────────
   --font-inter is injected by Next.js (next/font/google) onto <html>.
   --brand-font is the theme's preferred font name (default: Inter).
   System sans-serif is the final fallback.
   ───────────────────────────────────────────── */
html, body {
  font-family: var(--font-inter), var(--brand-font, Inter), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ─────────────────────────────────────────────
   Login page
   ───────────────────────────────────────────── */

.login-root {
  display: flex;
  min-height: 100vh;
  font-family: var(--brand-font, Inter), system-ui, sans-serif;
}

/* ── Left: form panel ── */
.login-left {
  display: flex;
  flex: 3;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--login-left-bg, #ffffff);
}

.login-form-wrapper {
  width: 100%;
  max-width: var(--login-form-width, 400px);
}

/* Logo */
.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.login-logo-img {
  height: 36px;
  object-fit: contain;
}

.login-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: var(--brand-primary, #0a3373);
  flex-shrink: 0;
}

.login-logo-mark-letter {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.login-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
}

/* Below 1024px the branded right panel (.login-right) is hidden, so this
   logo carries branding instead — hide it once .login-right takes over. */
@media (min-width: 1024px) {
  .login-logo {
    display: none;
  }
}

/* Header */
.login-header {
  margin-bottom: 32px;
}

.login-header-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  margin-top: 0;
}

.login-header-title {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  letter-spacing: -0.3px;
}

/* Magic-link sent state */
.login-magic-sent {
  padding: 24px;
  border-radius: 8px;
  background-color: color-mix(in srgb, var(--brand-primary, #0a3373) 8%, white);
  border: 1px solid color-mix(in srgb, var(--brand-primary, #0a3373) 20%, white);
  text-align: center;
}

.login-magic-sent-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-primary, #0a3373);
  margin-bottom: 8px;
  margin-top: 0;
}

.login-magic-sent-body {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.login-magic-back {
  margin-top: 16px;
  font-size: 13px;
  color: var(--brand-secondary, #4374f3);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
}

/* Form fields */
.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}

.login-input {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 0 14px;
  font-size: 14px;
  color: #111827;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.login-input:focus {
  border-color: var(--login-input-focus-border, var(--brand-accent, #ff6733));
}

.login-input-wrapper {
  position: relative;
}

.login-input--password {
  padding-right: 44px;
  font-size: 16px;
}

.login-input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.login-forgot {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-secondary, #4374f3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.login-error {
  font-size: 13px;
  color: #dc2626;
  margin-top: 12px;
  margin-bottom: 0;
}

/* Actions */
.login-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.login-submit {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  background-color: var(--login-submit-bg, #374151);
  color: var(--login-submit-color, #ffffff);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-switch-row {
  text-align: center;
}

.login-switch {
  font-size: 12px;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.login-terms {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  margin: 0;
}

.login-terms-link {
  color: var(--brand-secondary, #4374f3);
  cursor: pointer;
}

/* ── Right: branded panel ── */
.login-right {
  position: relative;
  flex: 2;
  overflow: hidden;
  display: none;
  background-color: var(--login-right-bg, color-mix(in srgb, var(--brand-secondary, #4374f3) 16%, white));
}

@media (min-width: 1024px) {
  .login-right {
    display: flex;
    flex-direction: column;
  }
}

/* Inner: logo + heading (positioned in upper area; circles are absolute at bottom) */
.login-right-inner {
  position: relative;
  z-index: 1;
  padding: 88px 44px 36px 76px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

/* Logo row */
.login-right-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-right-logo-img {
  height: 40px;
  object-fit: contain;
}

.login-right-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background-color: var(--brand-primary, #0a3373);
  flex-shrink: 0;
}

.login-right-logo-letter {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.login-right-logo-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
}

/* Main heading — max-width forces the 3-line break matching the reference design */
.login-right-heading {
  font-size: var(--login-right-heading-size, 46px);
  font-weight: var(--login-right-heading-weight, 800);
  font-family: var(--login-right-heading-font, var(--font-poppins), Poppins, system-ui, sans-serif);
  color: var(--login-right-heading-color, var(--brand-primary, #0a3373));
  text-align: left;
  margin: 0;
  line-height: var(--login-right-heading-line-height, 1.3);
  letter-spacing: -0.5px;
  max-width: 320px;
}

/* Decorative icon at bottom-right */
.login-right-decoration {
  position: absolute;
  width: var(--login-decoration-size, 500px);
  height: var(--login-decoration-size, 500px);
  bottom: -220px;
  right: -80px;
  z-index: 1;
  pointer-events: none;
  object-fit: contain;
}

/* Mobile: gutter padding so the form never touches the viewport edge,
   16px input font (prevents iOS Safari auto-zoom on focus), and larger
   tap targets on the secondary text-link buttons. */
@media (max-width: 768px) {
  .login-left {
    padding: 32px 20px;
    box-sizing: border-box;
  }

  .login-input {
    font-size: 16px;
  }

  .login-forgot,
  .login-switch,
  .login-magic-back {
    min-height: 44px;
    padding: 10px 0;
    display: inline-flex;
    align-items: center;
  }

  .login-forgot-row {
    margin-top: -4px;
  }
}

/* ─────────────────────────────────────────────
   Sidebar
   ───────────────────────────────────────────── */

.sidebar {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: var(--sidebar-width, 240px);
  background-color: var(--sidebar-bg, #ffffff);
  border-right: var(--sidebar-border-right, 1px solid #e5e7eb);
  padding: var(--sidebar-padding, 24px 0);
  font-family: var(--brand-font, Inter), system-ui, sans-serif;
}

/* Hamburger button — hidden on desktop, shown only on mobile */
.sidebar-hamburger-bar {
  display: none;
}

.sidebar-hamburger {
  display: none;
}

/* Close button inside sidebar — hidden on desktop */
.sidebar-close {
  display: none;
}

/* Overlay behind open sidebar — hidden on desktop */
.sidebar-overlay {
  display: none;
}

/* ── Logo ── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  margin-bottom: 24px;
  text-decoration: none;
}

.sidebar-logo-img {
  height: 24px;
  max-width: 120px;
  object-fit: contain;
  filter: var(--sidebar-logo-img-filter, none);
}

.sidebar-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: var(--brand-primary, #0a3373);
  flex-shrink: 0;
}

.sidebar-logo-mark-letter {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.sidebar-logo-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--sidebar-logo-text-color, var(--brand-primary, #0a3373));
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Desktop icon-rail collapse toggle — sits in the logo row, hidden on mobile
   (see `.sidebar-hamburger`-adjacent mobile media query below). */
.sidebar-collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: auto;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--sidebar-icon-color, #9ca3af);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.12s, color 0.12s;
}

.sidebar-collapse-toggle:hover {
  background-color: var(--sidebar-item-bg-hover, #f0f4ff);
  color: var(--sidebar-item-color, #374151);
}

/* ── Nav ── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--sidebar-item-gap, 10px);
  padding: var(--sidebar-item-padding, 10px 12px);
  margin: var(--sidebar-item-margin, 0 12px);
  border-radius: var(--sidebar-item-radius, 8px);
  font-size: var(--sidebar-item-font-size, 14px);
  font-weight: 500;
  color: var(--sidebar-item-color, #374151);
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
  cursor: pointer;
  background: none;
  border: none;
  /* width accounts for margin on both sides */
  width: calc(100% - 2 * var(--sidebar-item-margin-x, 12px));
  text-align: left;
}

.sidebar-item:hover {
  background-color: var(--sidebar-item-bg-hover, #f0f4ff);
  color: var(--sidebar-item-color, #374151);
}

.sidebar-item--active {
  background-color: var(--sidebar-item-bg-active, #0a3373);
  color: var(--sidebar-item-color-active, #ffffff);
  font-weight: 700;
}

.sidebar-item--active:hover {
  background-color: var(--sidebar-item-bg-active, #0a3373);
  color: var(--sidebar-item-color-active, #ffffff);
}

.sidebar-item-icon {
  color: var(--sidebar-icon-color, #6b7280);
  flex-shrink: 0;
}

.sidebar-item--active .sidebar-item-icon {
  color: var(--sidebar-icon-color-active, #ffffff);
}

.sidebar-item-label {
  flex: 1;
}

/* Tenant-module-disabled nav item (e.g. Contact Center off for the tenant) —
   stays visible AND clickable (navigates to the page's own disabled empty
   state), unlike the chatbot item which is hidden outright. Only the visual
   treatment changes: muted colors, no active-route tint, a trailing lock icon. */
.sidebar-item--disabled {
  opacity: 0.55;
}

.sidebar-item--disabled:hover {
  background-color: transparent;
  color: var(--sidebar-item-color, #374151);
}

.sidebar-item-lock {
  margin-left: auto;
  color: var(--sidebar-icon-color, #9ca3af);
  flex-shrink: 0;
}

/* Unread badge */
.sidebar-badge {
  margin-left: auto;
  background-color: var(--sidebar-badge-bg, #ff6733);
  color: var(--sidebar-badge-color, #ffffff);
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Sub-items (dependants, contact-center children) ── */
.sidebar-subitem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--sidebar-subitem-padding, 8px 12px 8px 40px);
  margin: 0 12px;
  border-radius: var(--sidebar-item-radius, 8px);
  font-size: var(--sidebar-subitem-font-size, 13px);
  font-weight: 400;
  color: var(--sidebar-subitem-color, #6b7280);
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
}

.sidebar-subitem:hover {
  background-color: var(--sidebar-item-bg-hover, #f0f4ff);
}

.sidebar-subitem--active {
  background-color: var(--sidebar-subitem-bg-active, #0a3373);
  color: var(--sidebar-subitem-color-active, #ffffff);
  font-weight: 500;
}

.sidebar-subitem--active:hover {
  background-color: var(--sidebar-subitem-bg-active, #0a3373);
  color: var(--sidebar-subitem-color-active, #ffffff);
}

.sidebar-subitem-icon {
  color: var(--sidebar-subitem-color, #6b7280);
  flex-shrink: 0;
}

.sidebar-subitem--active .sidebar-subitem-icon {
  color: var(--sidebar-subitem-color-active, #ffffff);
}

/* ── Collapsed icon rail (desktop only — see `.sidebar-collapse-toggle` /
   mobile media query for the ≤768px cutoff) ── */
@media (min-width: 769px) {
  .sidebar--collapsed {
    width: var(--sidebar-width-collapsed, 72px);
  }

  .sidebar--collapsed .sidebar-logo {
    flex-direction: column;
    gap: 8px;
    padding: 0 12px;
  }

  .sidebar--collapsed .sidebar-logo-text {
    display: none;
  }

  .sidebar--collapsed .sidebar-logo-img {
    max-width: 32px;
  }

  .sidebar--collapsed .sidebar-collapse-toggle {
    margin-left: 0;
  }

  .sidebar--collapsed .sidebar-item {
    justify-content: center;
    padding: 10px 0;
    gap: 0;
    position: relative;
  }

  .sidebar--collapsed .sidebar-item-label {
    display: none;
  }

  /* Unread count collapses to a plain dot instead of hiding entirely */
  .sidebar--collapsed .sidebar-badge {
    position: absolute;
    top: 4px;
    right: 14px;
    width: 8px;
    height: 8px;
    min-width: 0;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
  }

  /* No room for labelled children — collapse to the parent icon only */
  .sidebar--collapsed .sidebar-subitem {
    display: none;
  }

  /* Profile switcher: icon/avatar only, popover widens back out so its
     content stays readable (the sidebar has no overflow clipping, so the
     wider popover overlays the dashboard content instead of being cut off). */

  /* Zero the footer padding in the collapsed rail: the trigger's own
     symmetric padding defines the box. Without this, .profile-switcher's
     `margin: -16px -20px` cancels only the footer's TOP padding — the 16px
     BOTTOM padding survives (no following content to pull up) and left ~16px
     of dead space under the avatar, making the box too tall and pushing the
     avatar visually high. Border-top is preserved by re-declaring it. */
  .sidebar--collapsed .sidebar-footer {
    padding: 0;
  }

  .sidebar--collapsed .sidebar-footer .profile-switcher {
    margin: 0;
  }

  .sidebar--collapsed .profile-switcher-trigger {
    justify-content: center;
    padding: 10px 8px;
  }

  .sidebar--collapsed .profile-switcher-trigger-info,
  .sidebar--collapsed .profile-switcher-chevron {
    display: none;
  }

  .sidebar--collapsed .profile-switcher-popover {
    left: 8px;
    right: auto;
    width: 260px;
  }
}

/* ── Footer ── */
/* ── Profile Switcher ──────────────────────────────────────────────────────── */

.profile-switcher {
  position: relative;
}

/* When rendered inside .sidebar-footer, break out of the footer's padding so
   the trigger stretches edge-to-edge and flush to the bottom (no empty gap). */
.sidebar-footer .profile-switcher {
  margin: -16px -20px;
}

/* Trigger — full-width clickable row, looks like part of the footer */
.profile-switcher-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.profile-switcher-trigger:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.03);
}

.profile-switcher-trigger--open {
  background: rgba(0, 0, 0, 0.04);
}

.profile-switcher-trigger:disabled {
  cursor: default;
}

/* Company logo — shown instead of letter avatar when tenant has a logo_url */
.profile-switcher-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  background: #f1f5fe;
}

/* Shared avatar used in trigger and popover items */
.profile-switcher-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.profile-switcher-trigger-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.profile-switcher-trigger-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-footer-color, #374151);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.profile-switcher-trigger-role {
  font-size: 11px;
  color: var(--sidebar-footer-sub-color, #9ca3af);
  line-height: 1.3;
}

.profile-switcher-chevron {
  color: var(--sidebar-footer-sub-color, #9ca3af);
  flex-shrink: 0;
  opacity: 0.7;
}

.profile-switcher-spinner {
  color: var(--sidebar-footer-sub-color, #9ca3af);
  flex-shrink: 0;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Popover — slides up from above the trigger */
.profile-switcher-popover {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 12px;
  right: 12px;
  background: #ffffff;
  border: 1px solid #d2d9e5;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  z-index: 200;
  animation: popover-up 0.15s ease;
}

@keyframes popover-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-switcher-popover-label {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px 6px;
  margin: 0;
}

.profile-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.profile-switcher-item:last-child {
  margin-bottom: 4px;
}

.profile-switcher-item:hover:not(:disabled) {
  background: #f1f5fe;
}

.profile-switcher-item--active {
  cursor: default;
}

.profile-switcher-item-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.profile-switcher-item-name {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.profile-switcher-item-role {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
}

.profile-switcher-item-check {
  color: #4374f3;
  flex-shrink: 0;
}

.profile-switcher-divider {
  height: 1px;
  margin: 4px 0;
  background: #eef1f6;
  border: none;
}

.profile-switcher-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.profile-switcher-action:last-child {
  margin-bottom: 4px;
}

.profile-switcher-action:hover {
  background: #f1f5fe;
}

.profile-switcher-action-icon {
  color: #6b7280;
  flex-shrink: 0;
}

.profile-switcher-action--danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.profile-switcher-action--danger:hover .profile-switcher-action-icon {
  color: #dc2626;
}

/* ── Sidebar Footer ──────────────────────────────────────────────────────────── */

.sidebar-footer {
  padding: 16px 20px;
  border-top: var(--sidebar-footer-border, 1px solid #e5e7eb);
}


.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.sidebar-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  background-color: var(--sidebar-avatar-bg, #4374f3);
  flex-shrink: 0;
}

.sidebar-avatar-initials {
  font-size: 13px;
  font-weight: 600;
  color: var(--sidebar-avatar-color, #ffffff);
}

.sidebar-user-info {
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-footer-color, #374151);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--sidebar-footer-sub-color, #9ca3af);
  margin: 0;
  text-transform: capitalize;
}

.sidebar-signout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 0;
  font-size: 13px;
  color: var(--sidebar-footer-sub-color, #9ca3af);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.12s;
}

.sidebar-signout:hover {
  color: var(--sidebar-footer-color, #374151);
}

/* ─────────────────────────────────────────────
   Dashboard — shared components
   (dash-topbar, dash-bell, dash-body, dash-stats, dash-stat-card, dash-status)
   ───────────────────────────────────────────── */

/* ── Top bar ── */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--dash-topbar-padding, 12px 28px);
  background-color: var(--dash-topbar-bg, #f8fafd);
  flex-shrink: 0;
}

/* Separator below topbar — inset so it aligns with content padding */
.dash-topbar-sep {
  height: 1px;
  background-color: var(--dash-topbar-sep-color, #d2d9e5);
  flex-shrink: 0;
}

.dash-topbar-breadcrumb {
  margin-bottom: 4px;
}

.dash-topbar-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-topbar-title {
  font-size: var(--dash-topbar-title-size, 32px);
  font-weight: 800;
  color: var(--dash-topbar-title-color, #18181b);
  margin: 0;
  letter-spacing: -0.6px;
}

.dash-topbar-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dash-topbar-badge-color, var(--brand-accent, #ff6733));
  background-color: var(--dash-topbar-badge-bg, color-mix(in srgb, var(--brand-accent, #ff6733) 12%, white));
  padding: 3px 10px;
  border-radius: 100px;
}

.dash-topbar-title-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 3px 8px;
  margin-left: 6px;
  align-self: center;
}

.dash-topbar-company-suffix {
  font-size: var(--dash-topbar-title-size, 32px);
  font-weight: 800;
  color: var(--dash-topbar-title-color, #0f172a);
  margin-left: 4px;
}

.dash-topbar-date {
  font-size: 13px;
  color: var(--dash-topbar-date-color, #71717a);
  margin: 4px 0 0;
}

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

/* Insured lives mini-widget */
.hr-dash-insured-widget {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: var(--hr-dash-widget-bg, #ffffff);
  border: 1px solid var(--hr-dash-widget-border, #e5e7eb);
  border-radius: var(--hr-dash-widget-radius, 14px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.hr-dash-insured-widget-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--hr-dash-widget-label-color, #9ca3af);
  margin: 0;
}

.hr-dash-insured-widget-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--hr-dash-widget-value-color, #18181b);
  line-height: 1.1;
  margin: 0;
}

.hr-dash-insured-widget-divider {
  width: 1px;
  height: 34px;
  background-color: var(--hr-dash-widget-divider, #e5e7eb);
  flex-shrink: 0;
}

.hr-dash-insured-breakdown-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hr-dash-insured-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
}

.hr-dash-insured-breakdown-label {
  color: var(--hr-dash-widget-breakdown-label, #6b7280);
}

.hr-dash-insured-breakdown-value {
  font-weight: 600;
  color: var(--hr-dash-widget-breakdown-value, #18181b);
}

.dash-bell-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--dash-bell-bg, #ffffff);
  border: 1px solid var(--dash-bell-border, #e5e7eb);
  cursor: pointer;
  color: var(--dash-bell-color, #6b7280);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.dash-bell-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-accent, #ff6733);
  border: 1.5px solid var(--dash-topbar-bg, #ffffff);
}

/* ── Scrollable body ── */
.dash-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--dash-body-padding, 24px 28px);
  background-color: var(--dash-body-bg, #f8fafd);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Prevent children from shrinking — they must overflow into the scroll instead */
.dash-body > * {
  flex-shrink: 0;
}

/* ── Hero card ── */
.hr-dash-hero {
  background:
    var(--hr-dash-hero-bg,
      radial-gradient(ellipse at 88% 50%, rgba(255, 255, 255, 0.92) 0%, transparent 58%),
      linear-gradient(
        140deg,
        color-mix(in srgb, var(--brand-secondary, #4374f3) 16%, white) 0%,
        color-mix(in srgb, var(--brand-secondary, #4374f3) 10%, white) 100%
      )
    );
  border: 1px solid var(--hr-dash-hero-border, #c8d3e8);
  border-radius: var(--hr-dash-hero-radius, 20px);
  padding: var(--hr-dash-hero-padding, 40px 44px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hr-dash-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hr-dash-hero-eyebrow-color, var(--brand-accent, #ff6733));
  margin: 0;
}

.hr-dash-hero-title {
  font-size: var(--hr-dash-hero-title-size, 32px);
  font-weight: 800;
  color: var(--hr-dash-hero-title-color, #0d1526);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.6px;
}

.hr-dash-hero-subtitle {
  font-size: 15px;
  color: var(--hr-dash-hero-subtitle-color, #6b7280);
  margin: 0;
}

.hr-dash-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.hr-dash-hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 100px;
  background-color: var(--hr-dash-hero-btn-bg, var(--brand-primary, #0a3373));
  color: var(--hr-dash-hero-btn-color, #ffffff);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.hr-dash-hero-btn-primary:hover {
  opacity: 0.88;
}

.hr-dash-hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 100px;
  background-color: var(--hr-dash-hero-btn-secondary-bg, #ffffff);
  color: var(--hr-dash-hero-btn-secondary-color, var(--brand-primary, #0a3373));
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--hr-dash-hero-btn-secondary-border, rgba(0, 0, 0, 0.12));
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.hr-dash-hero-btn-secondary:hover {
  background-color: var(--hr-dash-hero-btn-secondary-bg-hover, #f5f5f5);
}

/* ── Stats row ── */
.dash-stats {
  display: flex;
  gap: 16px;
}

.dash-stat-card {
  flex: 1;
  background-color: var(--dash-stat-bg, #ffffff);
  border: 1px solid var(--dash-stat-border, #d2d9e5);
  border-radius: var(--dash-stat-radius, 14px);
  padding: var(--dash-stat-padding, 22px 24px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dash-stat-label-color, #9ca3af);
  margin: 0;
}

.dash-stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--dash-stat-value-color, #18181b);
  line-height: 1.1;
  margin: 4px 0 2px;
}

.dash-stat-sub {
  font-size: 13px;
  color: var(--dash-stat-sub-color, #9ca3af);
  margin: 0;
}

/* ── Action card (dark variant) ── */
.dash-stat-card--action {
  background-color: var(--dash-action-bg, var(--brand-primary, #0a3373));
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dash-action-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dash-action-eyebrow-color, rgba(255, 255, 255, 0.45));
  margin: 0 0 4px;
}

.dash-action-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dash-action-title-color, #ffffff);
  margin: 0 0 3px;
}

.dash-action-sub {
  font-size: 12px;
  color: var(--dash-action-sub-color, rgba(255, 255, 255, 0.5));
  margin: 0;
}

.dash-action-plus-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--dash-action-btn-bg, rgba(255, 255, 255, 0.15));
  border: none;
  cursor: pointer;
  color: var(--dash-action-btn-color, #ffffff);
  flex-shrink: 0;
  transition: background-color 0.15s;
}

.dash-action-plus-btn:hover {
  background-color: var(--dash-action-btn-bg-hover, rgba(255, 255, 255, 0.25));
}

/* ─────────────────────────────────────────────
   Dashboard — HR specific
   (hr-dash-hero, hr-dash-insured-widget, hr-dash-recent-*)
   ─────────────────────────────────────────────  */

/* ── Recent Employees table card ── */
.hr-dash-recent-card {
  background-color: var(--hr-dash-recent-card-bg, #ffffff);
  border: 1px solid var(--hr-dash-recent-card-border, #d2d9e5);
  border-radius: var(--hr-dash-recent-card-radius, 16px);
  overflow: hidden;
}

.hr-dash-recent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--hr-dash-recent-head-padding, 20px 24px 16px);
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.hr-dash-recent-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--hr-dash-recent-title-color, #18181b);
  margin: 0 0 3px;
}

.hr-dash-recent-subtitle {
  font-size: 13px;
  color: var(--hr-dash-recent-subtitle-color, #9ca3af);
  margin: 0;
}

.hr-dash-recent-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hr-dash-recent-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  background-color: var(--hr-dash-recent-btn-outline-bg, #ffffff);
  color: var(--hr-dash-recent-btn-outline-color, #374151);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--hr-dash-recent-btn-outline-border, #d1d5db);
  cursor: pointer;
  transition: background-color 0.15s;
  white-space: nowrap;
}

.hr-dash-recent-btn-outline:hover {
  background-color: var(--hr-dash-recent-btn-outline-bg-hover, #f9fafb);
}

.hr-dash-recent-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  background-color: var(--hr-dash-recent-btn-primary-bg, var(--brand-primary, #0a3373));
  color: var(--hr-dash-recent-btn-primary-color, #ffffff);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.hr-dash-recent-btn-primary:hover {
  opacity: 0.88;
}

.hr-dash-recent-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  background: transparent;
  color: var(--brand-primary, #0a3373);
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--brand-primary, #0a3373);
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.hr-dash-recent-btn-secondary:hover {
  opacity: 0.78;
}

.hr-dash-recent-btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  background-color: var(--hr-dash-recent-btn-accent-bg, var(--brand-accent, #ff6733));
  color: var(--hr-dash-recent-btn-accent-color, #ffffff);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.hr-dash-recent-btn-accent:hover {
  opacity: 0.88;
}

.hr-dash-recent-btn-soft-accent {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  background-color: var(--hr-dash-recent-btn-soft-accent-bg, color-mix(in srgb, var(--brand-accent, #ff6733) 12%, white));
  color: var(--hr-dash-recent-btn-soft-accent-color, var(--brand-accent, #ff6733));
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.hr-dash-recent-btn-soft-accent:hover {
  background-color: var(--hr-dash-recent-btn-soft-accent-bg-hover, color-mix(in srgb, var(--brand-accent, #ff6733) 20%, white));
}

.hr-dash-recent-btn-soft-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  background-color: var(--hr-dash-recent-btn-soft-primary-bg, color-mix(in srgb, var(--brand-primary, #0a3373) 12%, white));
  color: var(--hr-dash-recent-btn-soft-primary-color, var(--brand-primary, #0a3373));
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.hr-dash-recent-btn-soft-primary:hover {
  background-color: var(--hr-dash-recent-btn-soft-primary-bg-hover, color-mix(in srgb, var(--brand-primary, #0a3373) 20%, white));
}

/* Table */
.hr-dash-recent-table {
  width: 100%;
  border-collapse: collapse;
}

.hr-dash-recent-th {
  padding: var(--hr-dash-recent-th-padding, 11px 24px);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--hr-dash-recent-th-color, #9ca3af);
  text-align: left;
  border-bottom: 1px solid var(--hr-dash-recent-row-border, #eaeff6);
  white-space: nowrap;
}

.hr-dash-recent-tr:not(:last-child) .hr-dash-recent-td {
  border-bottom: 1px solid var(--hr-dash-recent-row-border, #eaeff6);
}

/* Census employee row expand/collapse + nested dependent rows (rendered as
   flattened <DataTable> rows, styled via rowClassName since the shared
   component only accepts a className per row, not inline style). */
.hr-dash-recent-tr--clickable { cursor: pointer; }
.hr-dash-recent-tr--expanded { background-color: #f8fafd; }
.hr-dash-recent-tr--dependent { background-color: #eaf0fb; }

/* Two-layer coverage status (spec: docs/specs/census/coverage-status.md):
   a binary COVERED/NOT COVERED badge with a lifecycle-state sub-label + dot. */
.cov-cell { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cov-cell--inline { flex-direction: row; align-items: center; gap: 8px; }
.cov-badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  white-space: nowrap;
}
.cov-badge--covered { background: #e6f4ec; color: #1f7a45; }
.cov-badge--not { background: #fbe9e9; color: #b42318; }
.cov-state {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: #64748b; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.cov-dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; }
.cov-dot--grey { background: #94a3b8; }
.cov-dot--amber { background: #eca04b; }
.cov-dot--blue { background: #4374f3; }
.cov-dot--green { background: #32a15e; }
.cov-dot--red { background: #dc2626; }

/* Prominent coverage status for the member-editor card (<CoverageStatusDetail>) — same
   colours/tokens as the compact .cov-* cell, but a larger pill + bigger dot/state text so
   it reads as a proper status row inside the card rather than a tiny table badge. */
.cov-detail { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cov-detail-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
.cov-detail-badge--covered { background: #e6f4ec; color: #1f7a45; }
.cov-detail-badge--not { background: #fbe9e9; color: #b42318; }
.cov-detail-state { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #374151; }
.cov-detail-dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }

/* Borderless cell input used inside the census spreadsheet editor — keeps the
   bare "grid cell" look while reusing shared inputs (e.g. <DateField>). */
.census-sheet-input {
  width: 100%;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 6px;
  font-size: 13px;
  outline: none;
  background-color: transparent;
}
.census-sheet-input:focus {
  border-color: #4374f3;
  background-color: #ffffff;
}

.hr-dash-recent-td {
  padding: var(--hr-dash-recent-td-padding, 14px 24px);
  font-size: 14px;
  color: var(--hr-dash-recent-td-color, #374151);
  vertical-align: middle;
}

.hr-dash-recent-td--name {
  font-weight: 600;
  color: var(--hr-dash-recent-name-color, #18181b);
}

.hr-dash-recent-td--id {
  text-align: right;
  color: var(--hr-dash-recent-id-color, #6b7280);
  font-size: 13px;
}

.hr-dash-recent-th--right {
  text-align: right;
}

.hr-dash-recent-th--center,
.hr-dash-recent-td--center {
  text-align: center;
}

.hr-dash-recent-td--right {
  text-align: right;
}

.hr-dash-recent-empty {
  color: var(--hr-dash-recent-empty-color, #d1d5db);
}

/* Status badges */
.dash-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dash-status--approved {
  background-color: var(--dash-status-approved-bg, #d1fae5);
  color: var(--dash-status-approved-color, #059669);
}

.dash-status--pending {
  background-color: var(--dash-status-pending-bg, #fef3c7);
  color: var(--dash-status-pending-color, #d97706);
}

.dash-status--rejected {
  background-color: var(--dash-status-rejected-bg, #fee2e2);
  color: var(--dash-status-rejected-color, #dc2626);
}

.dash-status--inactive {
  background-color: var(--dash-status-inactive-bg, #eef2f6);
  color: var(--dash-status-inactive-color, #6b7280);
}

/* Footer */
.hr-dash-recent-footer {
  display: flex;
  justify-content: flex-end;
  padding: var(--hr-dash-recent-footer-padding, 14px 24px);
  border-top: 1px solid var(--hr-dash-recent-row-border, #eaeff6);
}

.hr-dash-recent-view-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--hr-dash-recent-view-all-color, var(--brand-primary, #0a3373));
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.hr-dash-recent-view-all:hover {
  opacity: 0.75;
}

/* ─────────────────────────────────────────────
   Insurer Dashboard
   ───────────────────────────────────────────── */

/* Stat card: icon variant — label + icon on top row, value below */
.dash-stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dash-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--dash-stat-icon-bg, color-mix(in srgb, var(--brand-secondary, #4374f3) 12%, white));
  color: var(--dash-stat-icon-color, var(--brand-secondary, #4374f3));
  flex-shrink: 0;
}

/* Two-column grid: tasks (wider) + inbox (narrower) */
.ins-dash-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
}

/* Panel card (shared by tasks + inbox) */
.ins-dash-panel {
  background-color: var(--ins-dash-panel-bg, #ffffff);
  border: 1px solid var(--ins-dash-panel-border, #d2d9e5);
  border-radius: var(--ins-dash-panel-radius, 16px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ins-dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--ins-dash-panel-row-border, #eaeff6);
}

.ins-dash-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ins-dash-panel-title-color, #18181b);
  margin: 0;
}

.ins-dash-panel-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ins-dash-panel-link-color, var(--brand-primary, #0a3373));
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.ins-dash-panel-link:hover {
  opacity: 0.75;
}

/* Task rows */
.ins-dash-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ins-dash-panel-row-border, #eaeff6);
}

.ins-dash-task-row:last-child {
  border-bottom: none;
}

.ins-dash-task-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ins-dash-task-name-color, #18181b);
  margin: 0 0 2px;
}

.ins-dash-task-company {
  font-size: 12px;
  color: var(--ins-dash-task-company-color, #9ca3af);
  margin: 0;
}

.ins-dash-task-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.ins-dash-task-badge--overdue {
  background-color: var(--ins-dash-badge-overdue-bg, #fee2e2);
  color: var(--ins-dash-badge-overdue-color, #dc2626);
}

.ins-dash-task-badge--today {
  background-color: var(--ins-dash-badge-today-bg, #fef3c7);
  color: var(--ins-dash-badge-today-color, #d97706);
}

.ins-dash-task-badge--soon {
  background-color: var(--ins-dash-badge-soon-bg, #dbeafe);
  color: var(--ins-dash-badge-soon-color, #2563eb);
}

/* Inbox message rows */
.ins-dash-msg-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ins-dash-panel-row-border, #eaeff6);
}

.ins-dash-msg-row:last-child {
  border-bottom: none;
}

.ins-dash-msg-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ins-dash-msg-title-color, #18181b);
  margin: 0 0 2px;
}

.ins-dash-msg-sender {
  font-size: 12px;
  color: var(--ins-dash-msg-sender-color, #9ca3af);
  margin: 0;
}

.ins-dash-msg-time {
  font-size: 12px;
  color: var(--ins-dash-msg-time-color, #9ca3af);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Client portfolio: header row + card grid ── */
.ins-dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ins-dash-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ins-dash-panel-title-color, #18181b);
  margin: 0;
}

.ins-dash-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.ins-dash-client-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background-color: var(--ins-dash-panel-bg, #ffffff);
  border: 1px solid var(--ins-dash-panel-border, #d2d9e5);
  border-radius: var(--ins-dash-panel-radius, 16px);
  text-decoration: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.ins-dash-client-card:hover {
  border-color: var(--ins-dash-client-card-border-hover, color-mix(in srgb, var(--brand-primary, #0a3373) 25%, white));
  box-shadow: 0 2px 10px rgba(13, 21, 38, 0.06);
}

.ins-dash-client-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ins-dash-task-name-color, #18181b);
  margin: 0;
}

.ins-dash-client-meta {
  font-size: 12px;
  color: var(--ins-dash-task-company-color, #9ca3af);
  margin: 0 0 4px;
}

.ins-dash-client-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ins-dash-client-renewal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ins-dash-task-name-color, #18181b);
}

.ins-dash-client-renewal svg {
  color: var(--dash-stat-icon-color, var(--brand-secondary, #4374f3));
  flex-shrink: 0;
}

.ins-dash-client-arrow {
  color: var(--ins-dash-task-company-color, #9ca3af);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   Dashboard — responsive
   ───────────────────────────────────────────── */

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .dash-topbar {
    padding: var(--dash-topbar-padding, 18px 20px);
  }

  .dash-body {
    padding: var(--dash-body-padding, 20px);
  }


  .hr-dash-hero {
    padding: var(--hr-dash-hero-padding, 32px 32px);
  }

  .hr-dash-hero-title {
    font-size: var(--hr-dash-hero-title-size, 28px);
  }
}

/* ── Tablet (insurer grid) ── */
@media (max-width: 1024px) {
  .ins-dash-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ins-dash-portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  .ins-dash-grid {
    grid-template-columns: 1fr;
  }

  .ins-dash-portfolio-grid {
    grid-template-columns: 1fr;
  }

  /* Topbar sits below the fixed hamburger bar (~86px = 46px button + 40px padding). */
  .dash-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 86px 20px 12px;
  }


  .dash-topbar-right {
    width: 100%;
    justify-content: flex-end;
    gap: 12px;
  }

  /* Every wrapper div and every widget box in the right slot stretches full width. */
  .dash-topbar-right > div {
    width: 100%;
  }

  .hr-dash-insured-widget,
  .mf-policybox,
  .ins-pol-statbar,
  .pol-meta-widget {
    width: 100%;
    box-sizing: border-box;
  }

  .pol-meta-widget {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pol-meta-widget::-webkit-scrollbar { display: none; }

  /* Stat items share equal space across the full width. */
  .ins-pol-statbar .ins-pol-stat {
    flex: 1;
    justify-content: center;
  }

  .dash-topbar-title {
    font-size: var(--dash-topbar-title-size-mobile, 22px);
  }

  .dash-topbar-title-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Hero */
  .dash-body {
    padding: 16px;
    gap: 14px;
  }

  .hr-dash-hero {
    padding: 24px 20px;
    border-radius: var(--hr-dash-hero-radius-mobile, 14px);
  }

  .hr-dash-hero-title {
    font-size: var(--hr-dash-hero-title-size-mobile, 24px);
  }

  .hr-dash-hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hr-dash-hero-btn-primary,
  .hr-dash-hero-btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Page header: stack on mobile */
  .page-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
  }

  .page-header-right {
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 1;
  }

  /* Stats: 2-column grid on mobile */
  .dash-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Action card spans full row on mobile */
  .dash-stat-card--action {
    grid-column: 1 / -1;
  }

  /* Table: horizontal scroll on mobile */
  .hr-dash-recent-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hr-dash-recent-head {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .hr-dash-recent-btns {
    width: 100%;
    flex-wrap: wrap;
  }

  .hr-dash-recent-btn-outline,
  .hr-dash-recent-btn-primary {
    flex: 1;
    justify-content: center;
  }

  /* Policy tabs bar — scrollable on mobile */
  .ins-pol-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .ins-pol-tabs::-webkit-scrollbar { display: none; }

  /* Policy detail subheader */
  .pol-subheader {
    padding: 10px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pol-subheader-actions {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .pol-subheader-actions::-webkit-scrollbar { display: none; }

  .pol-split-btn-menu {
    right: auto;
    left: 0;
  }

  /* Census / policies filter toolbar: stack + wrap on mobile */
  .ins-pol-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .ins-pol-search {
    flex: 1 1 100%;
  }

  /* Hide Insurance ID column on small screens */
  .hr-dash-recent-th--right,
  .hr-dash-recent-td--id {
    display: none;
  }

  /* Sidebar: off-canvas drawer on mobile */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }

  .sidebar--open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  /* Icon-rail collapse is a desktop-only affordance — the mobile drawer
     already has its own open/close mechanism (hamburger + overlay). */
  .sidebar-collapse-toggle {
    display: none;
  }

  /* Overlay behind the open sidebar */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 49;
  }

  .sidebar-overlay--visible {
    display: block;
  }

  /* Hamburger button — only shown on mobile */
  .sidebar-hamburger-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: var(--dash-topbar-bg, #f8fafd);
    z-index: 48;
  }

  .sidebar-hamburger-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Bell already shown in hamburger bar — hide it from topbar right slot */
  .dash-topbar-right .dash-bell-btn {
    display: none;
  }

  .sidebar-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--dash-bell-border, #e5e7eb);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    color: #374151;
  }

  /* Close button inside sidebar — only shown on mobile */
  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: transparent;
    cursor: pointer;
    color: #374151;
  }

  .sidebar-close:hover {
    background: #f3f4f6;
  }
}

/* ── Small mobile (≤ 480px) ── */
@media (max-width: 480px) {

  .dash-topbar-title {
    font-size: var(--dash-topbar-title-size-sm, 19px);
  }
}

/* ─────────────────────────────────────────────
   Page header — white panel, rounded bottom corners
   Reusable across list/detail pages (breadcrumb + title
   + subtitle on the left, widgets + bell on the right).
   ───────────────────────────────────────────── */
/* Content surface behind the page header — must match the body bg so the
   header's rounded-corner notch is the same color as the rest of the page. */
.dash-surface {
  background-color: var(--dash-body-bg, #f8fafd);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-shrink: 0;
  padding: var(--page-header-padding, 24px 32px);
  background-color: var(--page-header-bg, #ffffff);
  border-bottom: var(--sidebar-border-right, 1px solid #e5e7eb);
  border-bottom-left-radius: var(--page-header-radius, 24px);
  border-bottom-right-radius: var(--page-header-radius, 24px);
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

/* Top-aligned variant — for taller headers (e.g. member identity) */
.page-header--top {
  align-items: flex-start;
}

/* Compact variant — smaller title/subtitle + tighter padding so list/detail
   pages fit more content above the fold. Matches the census list header. */
.page-header--compact {
  padding-top: 14px;
  padding-bottom: 12px;
}
.page-header--compact .page-header-title { font-size: 20px; }
.page-header--compact .page-header-subtitle { font-size: 13px; margin-top: 2px; }

/* Insurer policy detail header — reuses the shared compact scale (14/12 padding,
   20px title, 8px breadcrumb margin) so its breadcrumb/title height matches the
   HR census member-detail header. One scoped tweak: pull the meta-chip row a
   touch tighter under the smaller title (does not affect other .ins-pol-meta). */
/* ── Policy detail meta widget — white card in DashTopbar right slot ── */
.pol-meta-widget {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pol-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pol-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  line-height: 1;
}

.pol-meta-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pol-meta-item--dates {
  color: #6b7280;
}

.pol-meta-item--expiring {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #d97706;
  font-size: 12px;
  font-weight: 500;
}

.pol-meta-label {
  font-size: 10px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-right: 3px;
}

.pol-meta-val {
  font-size: 11.5px;
  font-weight: 600;
  color: #374151;
}

.pol-meta-val--num {
  color: var(--brand-secondary, #4374f3);
  font-family: monospace;
  letter-spacing: 0.3px;
}

.pol-meta-sep {
  display: inline-block;
  width: 1px;
  height: 10px;
  background: #e5e7eb;
  margin: 0 8px;
  flex-shrink: 0;
  align-self: center;
}

/* ── Policy detail subheader (actions bar below DashTopbar) ── */
.pol-subheader {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: var(--dash-topbar-bg, #f8fafd);
  border-bottom: 1px solid var(--dash-topbar-sep-color, #d2d9e5);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.pol-subheader-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pol-subheader-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-secondary, #4374f3);
  font-family: monospace;
  letter-spacing: 0.3px;
}

.pol-subheader-sep {
  font-size: 13px;
  color: #d1d5db;
}

.pol-subheader-company {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}

.pol-subheader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.ins-pol-detail-header .ins-pol-meta { margin-top: 8px; }

/* Compact action cluster — scoped to the policy detail header so the buttons
   sit small and top-aligned next to the breadcrumb (does not affect the shared
   button classes used on other pages). */
.ins-pol-header-actions {
  gap: 12px;
}

.ins-pol-header-actions .hr-dash-recent-btn-outline,
.ins-pol-header-actions .hr-dash-recent-btn-primary {
  padding: 6px 13px;
  font-size: 13px;
  gap: 6px;
}

.page-header-title {
  font-size: var(--page-header-title-size, 32px);
  font-weight: 800;
  color: var(--page-header-title-color, #18181b);
  letter-spacing: -0.6px;
  margin: 0;
}

.page-header-subtitle {
  font-size: 14px;
  color: var(--page-header-subtitle-color, #6b7280);
  margin: 6px 0 0;
  max-width: 640px;
}

.page-header-subtitle strong {
  font-weight: 700;
  color: var(--page-header-title-color, #18181b);
}

/* ─────────────────────────────────────────────
   Dashboard — breadcrumb + bell count (shared)
   ───────────────────────────────────────────── */
.dash-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-breadcrumb-color, #9ca3af);
}

.dash-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  color: var(--dash-breadcrumb-color, #9ca3af);
  text-decoration: none;
  transition: color 0.12s;
}

.dash-breadcrumb-link:hover {
  color: var(--brand-primary, #0a3373);
}

.dash-breadcrumb-current {
  color: var(--dash-breadcrumb-current-color, #374151);
}

/* Numeric count badge for the topbar bell */
.dash-bell-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  background-color: var(--brand-accent, #ff6733);
  border: 1.5px solid var(--dash-topbar-bg, #ffffff);
  border-radius: 100px;
}

/* ─────────────────────────────────────────────
   Insurer Policies — topbar stat bar
   ───────────────────────────────────────────── */
.ins-pol-statbar {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.ins-pol-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
}

.ins-pol-stat:not(:first-child) {
  border-left: 1px solid var(--ins-pol-statbar-divider, #eaeff6);
}

.ins-pol-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ins-pol-stat-icon-color, var(--brand-secondary, #4374f3));
  flex-shrink: 0;
}

.ins-pol-stat-icon--lives {
  color: var(--ins-pol-stat-lives-color, #32a15e);
}

.ins-pol-stat > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.ins-pol-stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ins-pol-stat-value-color, #18181b);
  line-height: 1;
  margin: 0;
}

.ins-pol-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ins-pol-stat-label-color, #9ca3af);
  margin: 0;
}

/* ── Toolbar inside the table card (chips + search + filter) ── */
.ins-pol-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: var(--ins-pol-toolbar-padding, 18px 24px);
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.ins-pol-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ins-pol-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--ins-pol-chip-border, #e5e7eb);
  background-color: var(--ins-pol-chip-bg, #ffffff);
  color: var(--ins-pol-chip-color, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.ins-pol-chip:hover {
  background-color: var(--ins-pol-chip-bg-hover, #f9fafb);
}

.ins-pol-chip--active {
  background-color: var(--ins-pol-chip-active-bg, color-mix(in srgb, var(--brand-primary, #0a3373) 8%, white));
  border-color: var(--ins-pol-chip-active-border, color-mix(in srgb, var(--brand-primary, #0a3373) 25%, white));
  color: var(--brand-primary, #0a3373);
}

.ins-pol-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  background-color: var(--ins-pol-chip-count-bg, #eef2f9);
  color: var(--ins-pol-chip-count-color, #6b7280);
  font-size: 11px;
  font-weight: 700;
}

.ins-pol-chip--active .ins-pol-chip-count {
  background-color: var(--brand-primary, #0a3373);
  color: #ffffff;
}

/* Status filter group (e.g. All / Active / Inactive / Expiring Soon) */
.ins-pol-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ins-pol-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: var(--ins-pol-filter-color, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.ins-pol-filter:hover {
  background-color: var(--ins-pol-filter-bg-hover, #f1f5fe);
}

.ins-pol-filter--active {
  background-color: var(--brand-primary, #0a3373);
  color: #ffffff;
}

.ins-pol-filter-count {
  color: var(--ins-pol-filter-count-color, #9ca3af);
  font-weight: 600;
}

.ins-pol-filter--active .ins-pol-filter-count {
  color: rgba(255, 255, 255, 0.7);
}

.ins-pol-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--ins-pol-search-border, #e5e7eb);
  background-color: var(--ins-pol-search-bg, #ffffff);
}

.ins-pol-search-icon {
  color: var(--ins-pol-search-icon-color, #9ca3af);
  flex-shrink: 0;
}

.ins-pol-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ins-pol-search-input-color, #374151);
}

.ins-pol-search-input::placeholder {
  color: var(--ins-pol-search-placeholder-color, #9ca3af);
}

/* ── Table cell helpers ── */
.ins-pol-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* When rendered as a real <button> (clickable sort header), reset native button
   chrome so it matches the decorative <span> usage elsewhere. */
button.ins-pol-th-sort {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.ins-pol-th-sort svg {
  color: var(--ins-pol-th-sort-color, #cbd5e1);
}

.ins-pol-company {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ins-pol-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 100px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  background-color: var(--ins-pol-avatar-bg, #eef2f9);
  color: var(--ins-pol-avatar-color, var(--brand-primary, #0a3373));
}

.ins-pol-company-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--hr-dash-recent-name-color, #18181b);
  margin: 0;
}

/* Clickable company name (links to the company's policies page) */
a.ins-pol-company-name {
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.12s;
}

a.ins-pol-company-name:hover {
  color: var(--brand-secondary, #4374f3);
}

.ins-pol-expiring {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background-color: var(--ins-pol-expiring-bg, #fef3c7);
  color: var(--ins-pol-expiring-color, #d97706);
}

.ins-pol-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  background-color: var(--ins-pol-count-bg, #e6f4ec);
  color: var(--ins-pol-count-color, #32a15e);
}

.ins-pol-members {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ins-pol-members-color, #374151);
  font-weight: 600;
}

.ins-pol-members svg {
  color: var(--ins-pol-members-icon-color, #9ca3af);
}

.ins-pol-premium {
  font-weight: 700;
  color: var(--ins-pol-premium-color, #18181b);
}

/* ── Policies-view cells ── */
.ins-pol-num {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ins-pol-num-color, #18181b);
}

.ins-pol-company--inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ins-pol-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.ins-pol-type {
  color: var(--ins-pol-type-color, #6b7280);
}

.ins-pol-status-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ins-pol-end {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ins-pol-end-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--ins-pol-end-date-color, #374151);
}

.ins-pol-end-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--ins-pol-end-sub-color, #d97706);
}

.ins-pol-end-sub--expired {
  color: var(--ins-pol-end-sub-expired-color, #dc2626);
}

.ins-pol-end--muted .ins-pol-end-date {
  color: var(--ins-pol-end-date-muted-color, #9ca3af);
  font-weight: 500;
}

/* ── Row actions menu ── */
.ins-pol-actions {
  position: relative;
  text-align: right;
}

.ins-pol-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ins-pol-action-color, #9ca3af);
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.ins-pol-action-btn:hover,
.ins-pol-action-btn--open {
  background-color: var(--ins-pol-action-bg-hover, #f1f5fe);
  color: var(--brand-primary, #0a3373);
}

/* Danger variant (e.g. delete document) */
.ins-pol-action-btn--danger {
  color: var(--brand-error, #dc2626);
}

.ins-pol-action-btn--danger:hover {
  background-color: var(--ins-pol-action-danger-bg-hover, #fef2f2);
  color: var(--brand-error, #dc2626);
}

/* Right-aligned cluster of icon actions inside a table cell */
.ins-pol-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

/* ─────────────────────────────────────────────
   Dropdown menu — shared, app-wide component.
   Use inside a position:relative anchor (e.g. .ins-pol-actions).
   Variants: .dropdown-item--danger, separator .dropdown-sep.
   ───────────────────────────────────────────── */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 168px;
  padding: 6px;
  background-color: var(--dropdown-bg, #ffffff);
  border: 1px solid var(--dropdown-border, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(13, 21, 38, 0.12);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dropdown-item-color, #374151);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s;
}

.dropdown-item:hover {
  background-color: var(--dropdown-item-bg-hover, #f1f5fe);
}

.dropdown-item svg {
  color: var(--dropdown-item-icon-color, #9ca3af);
  flex-shrink: 0;
}

.dropdown-sep {
  height: 1px;
  margin: 4px 4px;
  background-color: var(--dropdown-border, #e5e7eb);
}

.dropdown-item--danger {
  color: var(--brand-error, #dc2626);
}

.dropdown-item--danger:hover {
  background-color: var(--dropdown-item-danger-bg-hover, #fef2f2);
}

.dropdown-item--danger svg {
  color: inherit;
}

/* ── Footer pagination ── */
.ins-pol-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ins-pol-footer-padding, 16px 24px);
  border-top: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.ins-pol-footer-info {
  font-size: 13px;
  color: var(--ins-pol-footer-info-color, #9ca3af);
}

.ins-pol-footer-info strong {
  color: var(--ins-pol-footer-info-strong-color, #374151);
  font-weight: 700;
}

.ins-pol-pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ins-pol-pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--ins-pol-pager-border, #e5e7eb);
  background-color: var(--ins-pol-pager-bg, #ffffff);
  font-size: 13px;
  font-weight: 600;
  color: var(--ins-pol-pager-color, #6b7280);
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.ins-pol-pager-btn:hover:not(:disabled) {
  background-color: var(--ins-pol-pager-bg-hover, #f9fafb);
  color: var(--brand-primary, #0a3373);
}

.ins-pol-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Clickable policy number */
a.ins-pol-num {
  text-decoration: none;
  cursor: pointer;
  transition: color 0.12s;
}

a.ins-pol-num:hover {
  color: var(--brand-secondary, #4374f3);
}

/* ─────────────────────────────────────────────
   Employee claims / pre-approvals table cells
   (parity with the .ins-pol-* portfolio table)
   ───────────────────────────────────────────── */
.emp-claim-tr {
  cursor: pointer;
}

.emp-claim-ref {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 13px;
  font-weight: 600;
  color: var(--emp-claim-ref-color, #18181b);
}

.emp-claim-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background-color: var(--emp-claim-badge-bg, #f3f4f6);
  color: var(--emp-claim-badge-color, #6b7280);
}

.emp-claim-badge--preapproval {
  margin-left: 0;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background-color: var(--emp-claim-badge-preapproval-bg, #ede9fe);
  color: var(--emp-claim-badge-preapproval-color, #6d28d9);
}

.emp-claim-treatment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--emp-claim-treatment-color, #374151);
}

.emp-claim-cell {
  font-size: 13px;
  color: var(--emp-claim-cell-color, #374151);
}

.emp-claim-amount {
  font-size: 13px;
  color: var(--emp-claim-amount-color, #18181b);
}

.emp-claim-amount strong {
  font-weight: 700;
}

.emp-claim-amount-currency {
  margin-left: 4px;
  font-weight: 400;
  color: var(--emp-claim-amount-currency-color, #6b7280);
}

.emp-claim-updated {
  font-size: 12px;
  color: var(--emp-claim-updated-color, #9ca3af);
}

.emp-claim-chevron {
  color: var(--emp-claim-chevron-color, #cbd5e1);
}

/* ─────────────────────────────────────────────
   Policy detail page
   ───────────────────────────────────────────── */

/* Vertical divider used between the "Back" link and the breadcrumb path */
.ins-pol-crumb-divider {
  width: 1px;
  height: 14px;
  background-color: var(--ins-pol-crumb-divider, #d2d9e5);
  margin: 0 2px;
}

/* Meta row under the title (policy no. / status / premium / dates …) */
.ins-pol-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.ins-pol-meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ins-pol-meta-label-color, #9ca3af);
}

.ins-pol-meta-val {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ins-pol-meta-val-color, #374151);
}

.ins-pol-meta-val svg {
  color: var(--ins-pol-meta-icon-color, #9ca3af);
}

.ins-pol-meta-sep {
  width: 1px;
  height: 16px;
  background-color: var(--ins-pol-meta-sep-color, #e5e7eb);
}

/* ── Policy detail split button ── */
.pol-split-btn {
  position: relative;
  display: flex;
  align-items: stretch;
}

.pol-split-btn-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--brand-primary, #0a3373);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.pol-split-btn-primary:hover { background: #0c3d8a; }

.pol-split-btn-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background: var(--brand-primary, #0a3373);
  color: #ffffff;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.2);
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background 0.15s;
}

.pol-split-btn-chevron:hover { background: #0c3d8a; }

.pol-split-btn-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 50;
  padding: 4px;
}

.pol-split-btn-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.pol-split-btn-item:hover { background: #f3f4f6; }

.pol-split-btn-item--danger { color: #dc2626; }
.pol-split-btn-item--danger:hover { background: #fef2f2; }

.pol-split-btn-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 4px 0;
}

/* Danger variant of the outline button (Terminate) */
.hr-dash-recent-btn-outline--danger {
  color: var(--brand-error, #dc2626);
  border-color: var(--hr-dash-btn-danger-border, color-mix(in srgb, var(--brand-error, #dc2626) 35%, white));
}

.hr-dash-recent-btn-outline--danger:hover {
  background-color: var(--hr-dash-btn-danger-bg-hover, #fef2f2);
}

/* Tab bar */
.ins-pol-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background-color: var(--ins-pol-tabs-bg, #ffffff);
  border: 1px solid var(--ins-pol-tabs-border, #d2d9e5);
  border-radius: 14px;
}

.ins-pol-tabs-divider {
  width: 1px;
  height: 22px;
  background: #e5e7eb;
  margin: 0 10px;
  flex-shrink: 0;
}

.ins-pol-tabs-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding-right: 2px;
}

.ins-pol-tab {
  padding: 9px 18px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--ins-pol-tab-color, #6b7280);
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.ins-pol-tab:hover {
  background-color: var(--ins-pol-tab-bg-hover, #f1f5fe);
}

.ins-pol-tab--active {
  background-color: var(--ins-pol-tab-active-bg, color-mix(in srgb, var(--brand-primary, #0a3373) 8%, white));
  color: var(--brand-primary, #0a3373);
}

/* Stat-card head: icon + label inline */
.ins-pol-stat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

/* Generic padded card body */
.ins-pol-card-body {
  padding: var(--ins-pol-card-body-padding, 22px 24px);
}

/* Compact variant — used by the policy Overview timeline card to reduce
   vertical footprint now that Census sits below it on the same page. */
.ins-pol-card-body--compact {
  padding: 14px 24px 16px;
}

/* Compact stat-card row — scoped to the policy Overview page only; the base
   .dash-stat-card/.dash-stats classes stay untouched for every other page. */
.ins-pol-stats--compact .dash-stat-card {
  padding: 14px 16px;
}

.ins-pol-stats--compact .dash-stat-value {
  font-size: 24px;
  margin: 2px 0;
}

.ins-pol-stats--compact .dash-stat-label {
  font-size: 9px;
}

.ins-pol-stats--compact .dash-stat-sub {
  font-size: 12px;
}

/* Prominent "days until expiry" figure, styled with similar weight to
   .dash-stat-value but smaller — sits next to the timeline card title in
   place of the previous small grey note. */
.ins-pol-timeline-days {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  line-height: 1.1;
}

/* Progress bar */
.ins-pol-progress {
  width: 100%;
  height: 8px;
  border-radius: 100px;
  background-color: var(--ins-pol-progress-track, #eef2f9);
  overflow: hidden;
}

.ins-pol-progress-fill {
  height: 100%;
  border-radius: 100px;
  background-color: var(--brand-primary, #0a3373);
}

/* Slim variant — used inside the compact topbar meta widget where an 8px bar
   would overwhelm the row height. */
.ins-pol-progress--slim {
  height: 3px;
  margin-top: 2px;
}

.ins-pol-timeline-note {
  font-size: 13px;
  color: var(--ins-pol-timeline-note-color, #9ca3af);
}

.ins-pol-timeline-dates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ins-pol-timeline-date-color, #6b7280);
}

/* Recent activity list */
.ins-pol-activity {
  padding: 8px 24px 16px;
}

.ins-pol-activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.ins-pol-activity-row:not(:last-child) {
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.ins-pol-activity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--ins-pol-activity-icon-bg, #eef2f9);
  color: var(--ins-pol-activity-icon-color, var(--brand-primary, #0a3373));
}

.ins-pol-activity-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--ins-pol-activity-text-color, #18181b);
  margin: 0;
}

.ins-pol-activity-time {
  font-size: 12px;
  color: var(--ins-pol-activity-time-color, #9ca3af);
  margin: 2px 0 0;
}

/* ─────────────────────────────────────────────
   Census page
   ───────────────────────────────────────────── */

/* Colored stat values */
.dash-stat-value--success { color: var(--dash-status-approved-color, #059669); }
.dash-stat-value--warning { color: var(--dash-status-pending-color, #d97706); }
.dash-stat-value--danger  { color: var(--dash-status-rejected-color, #dc2626); }

/* Segmented toggle pills (All / Covered / Not covered) */
.ins-pol-segs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.ins-pol-seg {
  padding: 8px 16px;
  border: none;
  border-radius: 100px;
  background-color: var(--ins-pol-seg-bg, #eef2f9);
  color: var(--ins-pol-seg-color, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.ins-pol-seg:hover {
  background-color: var(--ins-pol-seg-bg-hover, #e2e8f3);
}

.ins-pol-seg--active {
  background-color: var(--brand-primary, #0a3373);
  color: #ffffff;
}

/* Reset link-button */
.ins-pol-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--ins-pol-reset-color, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s;
}

.ins-pol-reset:hover {
  color: var(--brand-primary, #0a3373);
}

/* Select-style filter row */
.ins-pol-selects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.ins-pol-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--ins-pol-select-border, #e5e7eb);
  background-color: var(--ins-pol-select-bg, #ffffff);
  font-size: 13px;
  font-weight: 500;
  color: var(--ins-pol-select-color, #374151);
  cursor: pointer;
  transition: border-color 0.12s;
}

.ins-pol-select:hover {
  border-color: var(--ins-pol-select-border-hover, #c8d3e8);
}

.ins-pol-select svg {
  color: var(--ins-pol-select-icon-color, #9ca3af);
  flex-shrink: 0;
}

/* Small muted secondary text inside a table cell (e.g. member email) */
.ins-pol-subtext {
  font-size: 12px;
  color: var(--ins-pol-subtext-color, #9ca3af);
  margin: 1px 0 0;
}

/* Stacked status cell: badge on top, sub-status below */
.ins-pol-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* Blue/info status badge (e.g. Pending document) */
.dash-status--info {
  background-color: var(--dash-status-info-bg, #dbeafe);
  color: var(--dash-status-info-color, #2563eb);
}

/* ─────────────────────────────────────────────
   Member detail page
   ───────────────────────────────────────────── */

/* Large avatar */
.ins-pol-avatar--lg {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

/* Family member selector pills */
.ins-pol-mtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  background-color: var(--ins-pol-mtabs-bg, #ffffff);
  border: 1px solid var(--ins-pol-mtabs-border, #d2d9e5);
  border-radius: 16px;
}

.ins-pol-mtab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 100px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.12s;
}

.ins-pol-mtab:hover {
  background-color: var(--ins-pol-mtab-bg-hover, #f1f5fe);
}

/* Simple text-only tab variant — used for section tabs (Information / Insurance / Documents) */
.ins-pol-mtab--text {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ins-pol-tab-color, #6b7280);
}
.ins-pol-mtab--text.ins-pol-mtab--active {
  background-color: var(--brand-primary, #0a3373);
  color: #ffffff;
  font-weight: 600;
}

.ins-pol-mtab--active {
  background-color: var(--brand-primary, #0a3373);
}

.ins-pol-mtab-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ins-pol-mtab-name-color, #18181b);
  margin: 0;
  line-height: 1.2;
}

.ins-pol-mtab-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ins-pol-mtab-sub-color, #9ca3af);
  margin: 1px 0 0;
}

.ins-pol-mtab--active .ins-pol-mtab-name { color: #ffffff; }
.ins-pol-mtab--active .ins-pol-mtab-sub { color: rgba(255, 255, 255, 0.75); }

.ins-pol-mtab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand-error, #dc2626);
}

/* Identity card */
.ins-pol-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ins-pol-identity-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--ins-pol-identity-name-color, #18181b);
  margin: 0;
}

.ins-pol-identity-role {
  font-size: 14px;
  color: var(--ins-pol-identity-role-color, #6b7280);
  margin: 3px 0 0;
}

.ins-pol-identity-email {
  font-size: 13px;
  color: var(--ins-pol-identity-email-color, #9ca3af);
  margin: 2px 0 0;
}

.ins-pol-identity-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Section head with icon */
.ins-pol-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Form grid */
.ins-pol-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}

.ins-pol-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ins-pol-field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ins-pol-field-label-color, #9ca3af);
}

.ins-pol-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--ins-pol-input-border, #e5e7eb);
  background-color: var(--ins-pol-input-bg, #ffffff);
  font-size: 14px;
  color: var(--ins-pol-input-color, #374151);
  outline: none;
  transition: border-color 0.12s;
}

.ins-pol-input::placeholder {
  color: var(--ins-pol-input-placeholder-color, #9ca3af);
}

.ins-pol-input:focus {
  border-color: var(--brand-secondary, #4374f3);
}

.ins-pol-select--field {
  width: 100%;
  height: 44px;
}

/* Documents: two columns split by a divider */
.ins-pol-docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.ins-pol-doc-col {
  padding: 20px 24px;
}

.ins-pol-doc-col:first-child {
  border-right: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.ins-pol-doc-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ins-pol-doc-col-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ins-pol-doc-col-title-color, #18181b);
}

.ins-pol-doc-link {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-primary, #0a3373);
  cursor: pointer;
}

.ins-pol-doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.ins-pol-doc-row:not(:last-child) {
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.ins-pol-doc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  background-color: var(--ins-pol-doc-icon-bg, #eef2f9);
  color: var(--ins-pol-doc-icon-color, #6b7280);
}

.ins-pol-doc-info {
  flex: 1;
  min-width: 0;
}

.ins-pol-doc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ins-pol-doc-name-color, #18181b);
  margin: 0 0 4px;
}

.ins-pol-doc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ins-pol-doc-expiry {
  font-size: 12px;
  color: var(--ins-pol-doc-expiry-color, #9ca3af);
}

.ins-pol-doc-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.ins-pol-doc-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--ins-pol-doc-action-color, #6b7280);
  cursor: pointer;
  transition: color 0.12s;
}

.ins-pol-doc-action:hover {
  color: var(--brand-primary, #0a3373);
}

/* Audit log */
.ins-pol-audit {
  padding: 6px 24px 16px;
}

.ins-pol-audit-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.ins-pol-audit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background-color: var(--brand-primary, #0a3373);
}

/* ── Settings page ───────────────────────────────────────────────────────── */

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 760px;
}

.settings-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.settings-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background-color: #f1f5fe;
  color: var(--brand-primary, #0a3373);
}

.settings-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-primary, #0a3373);
}

.settings-card-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: #7d93b3;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 560px) {
  .settings-row { grid-template-columns: 1fr; }
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.settings-input {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  color: #111827;
  background-color: #ffffff;
  border: 1px solid #d2d9e5;
  border-radius: 8px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.settings-input:focus {
  outline: none;
  border-color: var(--brand-secondary, #4374f3);
  box-shadow: 0 0 0 3px rgba(67, 116, 243, 0.15);
}

.settings-input--readonly {
  background-color: #f8fafc;
  color: #6b7280;
}

.settings-input-adorn {
  color: #9ca3af;
  flex-shrink: 0;
}

.settings-hint {
  font-size: 12px;
  color: #9ca3af;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

.settings-feedback {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-right: auto;
}

.settings-feedback--error { color: #dc2626; }
.settings-feedback--success { color: #32a15e; }

.settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background-color: var(--brand-primary, #0a3373);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.12s, background-color 0.12s;
}

.settings-btn:hover:not(:disabled) {
  background-color: var(--brand-secondary, #4374f3);
}

.settings-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-spin {
  animation: settings-spin 0.8s linear infinite;
}

@keyframes settings-spin {
  to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────
   Modal — shared, app-wide dialog component.
   Structure: .modal-overlay > .modal-card
     > .modal-head (.modal-title / .modal-subtitle / .modal-close)
     > .modal-body (.modal-section-label, .modal-grid, .modal-field …)
     > .modal-foot (.modal-btn-text / .modal-btn-primary)
   ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  /* Scroll the backdrop (not the card) only when the modal can't fit the
     viewport. `margin: auto` on the card centres it when it fits. The scrollbar
     is visually hidden so a tall modal still looks "glued", never showing a bar. */
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 20px;
  background-color: var(--modal-overlay-bg, rgba(13, 21, 38, 0.45));
  animation: modal-fade 0.12s ease;
}

.modal-overlay::-webkit-scrollbar {
  display: none;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--modal-max-width, 560px);
  /* Natural height — grows with content, never scrolls internally. Centred via
     auto margins; the overlay scrolls if it ever exceeds the viewport. */
  margin: auto;
  background-color: var(--modal-bg, #ffffff);
  border-radius: var(--modal-radius, 16px);
  box-shadow: 0 20px 60px rgba(13, 21, 38, 0.25);
  animation: modal-pop 0.14s ease;
}

@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
  flex-shrink: 0;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--modal-title-color, #18181b);
  margin: 0;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--modal-subtitle-color, #9ca3af);
  margin: 4px 0 0;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--modal-close-color, #9ca3af);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.12s, color 0.12s;
}

.modal-close:hover {
  background-color: var(--ins-pol-action-bg-hover, #f1f5fe);
  color: var(--brand-primary, #0a3373);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 24px;
  flex-shrink: 0;
}

.modal-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand-primary, #0a3373);
  margin: 0;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--modal-label-color, #374151);
}

.modal-label-req {
  color: var(--brand-error, #dc2626);
}

.modal-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--ins-pol-input-border, #e5e7eb);
  background-color: var(--ins-pol-input-bg, #ffffff);
  font-size: 14px;
  color: var(--ins-pol-input-color, #374151);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.12s;
}

.modal-input:focus {
  border-color: var(--brand-secondary, #4374f3);
}

.modal-input--readonly {
  background-color: var(--modal-input-readonly-bg, #eef2f9);
  color: var(--modal-input-readonly-color, #6b7280);
  border-color: transparent;
}

.modal-total {
  padding: 14px 16px;
  border-radius: 12px;
  background-color: var(--modal-total-bg, #eef2f9);
  font-size: 15px;
  font-weight: 600;
  color: var(--modal-total-color, #374151);
}

.modal-total strong {
  color: var(--brand-primary, #0a3373);
  font-weight: 800;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 16px 24px;
  border-top: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
  flex-shrink: 0;
}

.modal-btn-text {
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--modal-btn-text-color, #6b7280);
  cursor: pointer;
  padding: 8px;
  transition: color 0.12s;
}

.modal-btn-text:hover {
  color: var(--brand-primary, #0a3373);
}

.modal-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 100px;
  background-color: var(--brand-primary, #0a3373);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.modal-btn-primary:hover:not(:disabled) {
  opacity: 0.88;
}

.modal-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Title with a leading icon */
.modal-title--icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Danger variants (e.g. Terminate Policy) */
.modal-title--danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-error, #dc2626);
}

.modal-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 100px;
  background-color: var(--brand-error, #dc2626);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.modal-btn-danger:hover:not(:disabled) {
  opacity: 0.88;
}

.modal-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Callout box — summary of consequences */
.modal-callout {
  padding: 16px 18px;
  border-radius: 12px;
  background-color: var(--modal-callout-bg, #f5f6fa);
}

.modal-callout--danger {
  background-color: var(--modal-callout-danger-bg, color-mix(in srgb, var(--brand-error, #dc2626) 7%, white));
}

.modal-callout-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  margin: 0 0 10px;
}

.modal-callout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-callout-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--modal-callout-item-color, #4b5563);
}

.modal-callout-item svg {
  color: var(--modal-callout-check-color, #9ca3af);
  flex-shrink: 0;
}

/* Multiline text field */
.modal-textarea {
  width: 100%;
  min-height: 92px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--ins-pol-input-border, #e5e7eb);
  background-color: var(--ins-pol-input-bg, #ffffff);
  font-size: 14px;
  font-family: inherit;
  color: var(--ins-pol-input-color, #374151);
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.12s;
}

.modal-textarea::placeholder {
  color: var(--ins-pol-input-placeholder-color, #9ca3af);
}

.modal-textarea:focus {
  border-color: var(--brand-secondary, #4374f3);
}

/* Custom select — styled dropdown (native <select> can't style its options) */
.modal-select {
  position: relative;
}

.modal-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--ins-pol-input-border, #e5e7eb);
  background-color: var(--ins-pol-input-bg, #ffffff);
  font-size: 14px;
  color: var(--ins-pol-input-color, #374151);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s;
}

.modal-select-trigger:hover {
  border-color: var(--ins-pol-select-border-hover, #c8d3e8);
}

.modal-select-trigger--open {
  border-color: var(--brand-secondary, #4374f3);
}

.modal-select-placeholder {
  color: var(--ins-pol-input-placeholder-color, #9ca3af);
}

.modal-select-chevron {
  color: var(--ins-pol-select-icon-color, #9ca3af);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.modal-select-trigger--open .modal-select-chevron {
  transform: rotate(180deg);
}

.modal-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
  background-color: var(--dropdown-bg, #ffffff);
  border: 1px solid var(--dropdown-border, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(13, 21, 38, 0.12);
  animation: modal-fade 0.12s ease;
}

.modal-select-option {
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  color: var(--modal-title-color, #18181b);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.modal-select-option:hover {
  background-color: var(--ins-pol-action-bg-hover, #f1f5fe);
}

.modal-select-option--active {
  background-color: var(--modal-select-active-bg, color-mix(in srgb, var(--brand-secondary, #4374f3) 14%, white));
  color: var(--brand-primary, #0a3373);
  font-weight: 600;
}

/* Check group — bordered list of circular checkboxes (e.g. Share modal) */
.modal-checkgroup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--ins-pol-input-border, #e5e7eb);
  border-radius: 12px;
}

.modal-check {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.12s;
}

.modal-check:hover {
  background-color: var(--ins-pol-action-bg-hover, #f1f5fe);
}

.modal-check-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--modal-check-border, #d2d9e5);
  background: transparent;
  color: transparent;
  transition: background-color 0.12s, border-color 0.12s;
}

.modal-check--on .modal-check-box {
  background-color: var(--brand-primary, #0a3373);
  border-color: var(--brand-primary, #0a3373);
  color: #ffffff;
}

.modal-check-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-primary, #0a3373);
}

.modal-check-sub {
  font-size: 13px;
  color: var(--ins-pol-subtext-color, #9ca3af);
  margin-left: 6px;
}

@media (max-width: 560px) {
  .modal-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────
   Policy Benefits — summary cards + accordion
   ───────────────────────────────────────────── */
.bnf-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bnf-summary-card {
  background-color: var(--dash-stat-bg, #ffffff);
  border: 1px solid var(--dash-stat-border, #d2d9e5);
  border-radius: var(--dash-stat-radius, 14px);
  padding: 18px 22px;
}

.bnf-summary-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dash-stat-label-color, #9ca3af);
  margin: 0 0 6px;
}

.bnf-summary-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--brand-primary, #0a3373);
  margin: 0;
}

/* Accordion card */
.bnf-accordion {
  background-color: var(--dash-stat-bg, #ffffff);
  border: 1px solid var(--dash-stat-border, #d2d9e5);
  border-radius: 16px;
  overflow: hidden;
}

.bnf-section:not(:last-child) {
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.bnf-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 22px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.12s;
}

.bnf-section-header:hover {
  background-color: var(--ins-pol-action-bg-hover, #f1f5fe);
}

.bnf-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  margin: 0;
}

.bnf-section-chevron {
  color: var(--bnf-section-chevron-color, #9ca3af);
  flex-shrink: 0;
}

.bnf-section-body {
  padding: 0 22px 6px;
}

.bnf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
}

.bnf-row:not(:last-child) {
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.bnf-row-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ins-pol-field-label-color, #9ca3af);
}

.bnf-row-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  text-align: right;
}

@media (max-width: 560px) {
  .bnf-summary { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────
   Policy Company — 2×2 info cards
   (rows reuse .bnf-row / .bnf-row-label / .bnf-row-value)
   ───────────────────────────────────────────── */
.cmp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cmp-card {
  background-color: var(--dash-stat-bg, #ffffff);
  border: 1px solid var(--dash-stat-border, #d2d9e5);
  border-radius: 16px;
  padding: 16px 22px 8px;
}

.cmp-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cmp-card-icon {
  display: flex;
  align-items: center;
  color: var(--brand-primary, #0a3373);
  flex-shrink: 0;
}

.cmp-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  margin: 0;
}

@media (max-width: 768px) {
  .cmp-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────
   Insurer — Claims & pre-approvals Kanban board
   Tones map to brand tokens:
     coral=accent, blue=secondary, navy=primary,
     amber=warning, green=success
   ───────────────────────────────────────────── */

/* Header title row + "N active" pill */
.ins-claim-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ins-claim-active-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  background-color: var(--ins-claim-active-bg, color-mix(in srgb, var(--brand-secondary, #4374f3) 12%, white));
  color: var(--brand-secondary, #4374f3);
}

/* Square icon button (e.g. fullscreen toggle) */
.ins-claim-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 100px;
  background-color: #ffffff;
  border: 1px solid var(--hr-dash-recent-btn-outline-border, #d1d5db);
  color: var(--ins-pol-filter-color, #6b7280);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}

.ins-claim-iconbtn:hover {
  background-color: var(--ins-pol-filter-bg-hover, #f1f5fe);
  color: var(--brand-primary, #0a3373);
}

.ins-claim-iconbtn[aria-pressed='true'] {
  background-color: var(--brand-primary, #0a3373);
  border-color: var(--brand-primary, #0a3373);
  color: #ffffff;
}

/* Fullscreen board — card fills the whole viewport above everything else */
.ins-claim-card-wrap--full {
  position: fixed;
  inset: 0;
  z-index: 120;
  border-radius: 0;
  border: none;
  display: flex;
  flex-direction: column;
}

.ins-claim-card-wrap--full .ins-claim-board-wrap,
.ins-claim-card-wrap--full .hr-dash-recent-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* In fullscreen there's ample width, so always keep 5 equal columns and let
   each column scroll its own cards vertically. */
.ins-claim-card-wrap--full .ins-claim-board:not(.ins-claim-board--single) {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: row;
}

.ins-claim-card-wrap--full .ins-claim-board {
  height: 100%;
  align-items: stretch;
}

.ins-claim-card-wrap--full .ins-claim-col {
  min-height: 0;
}

.ins-claim-card-wrap--full .ins-claim-col-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* Breathing room so the card hover lift + shadow isn't clipped by the
     scroll container edge (which was hiding the first card's top border). */
  padding: 6px 4px 8px 2px;
}

/* Toolbar: search + view toggle + statuses (card header row) */
.ins-claim-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.ins-claim-search {
  flex: 1;
  min-width: 240px;
  max-width: 460px;
}

/* Sub-bar: filters (left) + status tabs (right), wraps on narrow widths */
.ins-claim-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.ins-claim-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Board / List segmented control */
.ins-claim-viewtoggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 100px;
  background-color: var(--ins-claim-viewtoggle-bg, #eef2f9);
  border: 1px solid var(--ins-pol-chip-border, #e5e7eb);
}

.ins-claim-viewbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: var(--ins-pol-filter-color, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s, box-shadow 0.12s;
}

.ins-claim-viewbtn--active {
  background-color: #ffffff;
  color: var(--brand-primary, #0a3373);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

/* Filters row */
.ins-claim-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ins-claim-filters-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dash-breadcrumb-color, #9ca3af);
  margin-right: 2px;
}

.ins-claim-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 100px;
  border: 1px solid var(--ins-pol-chip-border, #e5e7eb);
  background-color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ins-pol-filter-color, #6b7280);
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s;
}

.ins-claim-filter:hover {
  background-color: var(--ins-pol-filter-bg-hover, #f1f5fe);
}

.ins-claim-filter-icon {
  color: var(--brand-primary, #0a3373);
}

.ins-claim-filter-label {
  color: var(--ins-pol-filter-color, #6b7280);
}

.ins-claim-filter-value {
  color: var(--brand-primary, #0a3373);
  font-weight: 700;
}

.ins-claim-filter-caret {
  color: #9ca3af;
}

/* Status tabs */
.ins-claim-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ins-claim-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 100px;
  border: 1px solid var(--ins-pol-chip-border, #e5e7eb);
  background-color: #ffffff;
  color: var(--ins-pol-filter-color, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.ins-claim-tab:hover {
  background-color: var(--ins-pol-filter-bg-hover, #f1f5fe);
}

.ins-claim-tab--active {
  background-color: var(--brand-primary, #0a3373);
  border-color: var(--brand-primary, #0a3373);
  color: #ffffff;
}

.ins-claim-tab-count {
  font-weight: 700;
  color: inherit;
  opacity: 0.7;
}

.ins-claim-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ins-claim-tab-dot--coral { background-color: var(--brand-accent, #ff6733); }
.ins-claim-tab-dot--blue  { background-color: var(--brand-secondary, #4374f3); }
.ins-claim-tab-dot--amber { background-color: var(--brand-warning, #eca04b); }
.ins-claim-tab-dot--navy  { background-color: var(--brand-primary, #0a3373); }
.ins-claim-tab-dot--green { background-color: var(--brand-success, #32a15e); }

/* Board area — light inset panel inside the white card */
.ins-claim-board-wrap {
  padding: 18px 20px;
  background-color: var(--dash-body-bg, #f8fafd);
  overflow-x: auto;
}

/* Board grid: 5 equal columns that shrink to fit (no overflow on wide screens) */
.ins-claim-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

/* Single-column view (when a status filter is active) */
.ins-claim-board--single {
  grid-template-columns: minmax(0, 420px);
}

.ins-claim-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Column header */
.ins-claim-col-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  padding: 10px 4px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--ins-claim-col-accent, #e5e7eb);
}

.ins-claim-col-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--ins-claim-col-accent, #9ca3af);
  flex-shrink: 0;
}

.ins-claim-col-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  white-space: nowrap;
}

.ins-claim-col-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 100px;
  background-color: var(--ins-pol-chip-count-bg, #eef2f9);
  color: var(--ins-pol-filter-color, #6b7280);
  font-size: 12px;
  font-weight: 700;
}

.ins-claim-col-overdue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  background-color: var(--dash-status-rejected-bg, #fee2e2);
  color: var(--dash-status-rejected-color, #dc2626);
  cursor: default;
}

/* Compact variant (collapsed board): icon + count only, full text on hover */
.ins-claim-col-overdue--compact {
  gap: 3px;
  padding: 2px 7px;
}

.ins-claim-col-head--coral { --ins-claim-col-accent: var(--brand-accent, #ff6733); }
.ins-claim-col-head--blue  { --ins-claim-col-accent: var(--brand-secondary, #4374f3); }
.ins-claim-col-head--amber { --ins-claim-col-accent: var(--brand-warning, #eca04b); }
.ins-claim-col-head--navy  { --ins-claim-col-accent: var(--brand-primary, #0a3373); }
.ins-claim-col-head--green { --ins-claim-col-accent: var(--brand-success, #32a15e); }

.ins-claim-col-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ins-claim-col-empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  border: 1px dashed var(--ins-pol-chip-border, #e5e7eb);
  border-radius: var(--brand-radius, 12px);
  margin: 0;
}

/* Card */
.ins-claim-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background-color: #ffffff;
  border: 1px solid var(--ins-pol-chip-border, #e5e7eb);
  border-radius: var(--brand-radius, 12px);
  cursor: grab;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.14s, border-color 0.14s, transform 0.14s;
}
.ins-claim-card:active { cursor: grabbing; }

.ins-claim-card:hover {
  border-color: color-mix(in srgb, var(--brand-secondary, #4374f3) 40%, white);
  box-shadow: 0 4px 14px rgba(10, 51, 115, 0.08);
  transform: translateY(-1px);
}

.ins-claim-card--overdue {
  border-color: var(--dash-status-rejected-bg, #fecaca);
  background-color: var(--ins-claim-overdue-bg, #fffaf9);
}

.ins-claim-card--dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.ins-claim-col-rejected-sep {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-coral, #e05a3a);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ins-claim-col-rejected-sep::before,
.ins-claim-col-rejected-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
}

.ins-claim-card--skeleton {
  pointer-events: none;
  cursor: default;
  gap: 10px;
  display: flex;
  flex-direction: column;
}

.ins-claim-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: var(--dash-body-bg, #eef2fb);
  animation: pulse 1.5s ease-in-out infinite;
  width: 100%;
}

.ins-claim-skeleton-line--short { width: 45%; }
.ins-claim-skeleton-line--med   { width: 70%; }

.ins-claim-col--can-drop {
  outline: 2px dashed var(--brand-primary, #0a3373);
  outline-offset: -4px;
  border-radius: 10px;
}

.ins-claim-col--drop-over {
  outline-color: var(--brand-accent, #ff6733);
  background: rgba(255, 103, 51, 0.04);
}

/* Approve / generic modal */
.ins-claim-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ins-claim-modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px 28px 24px;
  width: 340px;
  max-width: 90vw;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ins-claim-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  margin: 0;
}

.ins-claim-modal-sub {
  font-size: 13px;
  color: var(--color-text-muted, #6b7280);
  margin: 0;
}

.ins-claim-modal-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text, #111);
}

.ins-claim-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.ins-claim-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ins-claim-ref {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #9ca3af;
}

.ins-claim-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ins-claim-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ins-claim-tag--direct {
  background-color: color-mix(in srgb, var(--brand-success, #32a15e) 14%, white);
  color: var(--brand-success, #32a15e);
}

.ins-claim-tag--net {
  background-color: var(--ins-pol-chip-count-bg, #eef2f9);
  color: var(--brand-primary, #0a3373);
}

.ins-claim-tag--pre {
  background-color: color-mix(in srgb, var(--brand-secondary, #4374f3) 14%, white);
  color: var(--brand-secondary, #4374f3);
}

.ins-claim-tag--no {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  background-color: #f3f4f6;
  color: #6b7280;
}

.ins-claim-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background-color: var(--dash-status-rejected-bg, #fee2e2);
  color: var(--dash-status-rejected-color, #dc2626);
}

.ins-claim-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  margin: 0;
  line-height: 1.35;
}

.ins-claim-member {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ins-claim-member-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ins-claim-member-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #18181b;
}

.ins-claim-relation {
  display: inline-flex;
  align-items: center;
  height: 15px;
  padding: 0 6px;
  border-radius: 100px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background-color: color-mix(in srgb, var(--brand-accent, #ff6733) 14%, white);
  color: var(--brand-accent, #ff6733);
}

.ins-claim-member-sub {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ins-claim-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--hr-dash-recent-row-border, #eaeff6);
}

.ins-claim-amount {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.ins-claim-amount strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
}

.ins-claim-foot-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ins-claim-date {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

.ins-claim-ago {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

/* List-view status badges (reuse .dash-status base) */
.ins-claim-status--coral { background-color: color-mix(in srgb, var(--brand-accent, #ff6733) 14%, white); color: var(--brand-accent, #ff6733); }
.ins-claim-status--blue  { background-color: color-mix(in srgb, var(--brand-secondary, #4374f3) 14%, white); color: var(--brand-secondary, #4374f3); }
.ins-claim-status--amber { background-color: var(--dash-status-pending-bg, #fef3c7); color: var(--dash-status-pending-color, #d97706); }
.ins-claim-status--navy  { background-color: var(--ins-pol-chip-count-bg, #eef2f9); color: var(--brand-primary, #0a3373); }
.ins-claim-status--green { background-color: var(--dash-status-approved-bg, #d1fae5); color: var(--dash-status-approved-color, #059669); }

/* Responsive: below ~1180px, 5 equal columns get too cramped, so switch the
   board to a horizontal scroller with comfortable fixed-width columns. */
@media (max-width: 1180px) {
  .ins-claim-board {
    grid-auto-flow: column;
    grid-auto-columns: 264px;
    grid-template-columns: none;
  }
  .ins-claim-board--single {
    grid-auto-columns: minmax(0, 1fr);
  }
}

.ins-claim-list-link {
  text-decoration: none;
  transition: color 0.12s;
}

.ins-claim-list-link:hover {
  color: var(--brand-secondary, #4374f3);
}

/* ─────────────────────────────────────────────
   Claim detail page
   ───────────────────────────────────────────── */

/* Breadcrumb chips (insurer ref, channel) */
.ins-claim-crumb-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background-color: var(--ins-pol-chip-count-bg, #eef2f9);
  color: var(--brand-primary, #0a3373);
}

.ins-claim-crumb-tag strong {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-weight: 700;
}

.ins-claim-crumb-tag--muted {
  background-color: transparent;
  color: var(--dash-breadcrumb-color, #9ca3af);
  font-weight: 600;
}

/* Header meta row */
.ins-claim-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}

.ins-claim-detail-member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ins-claim-detail-member-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
}

.ins-claim-meta-sep {
  width: 1px;
  height: 18px;
  background-color: var(--ins-pol-chip-border, #e5e7eb);
}

.ins-claim-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.ins-claim-meta-icon {
  color: #9ca3af;
}

.ins-claim-meta-key {
  color: #9ca3af;
  font-weight: 600;
}

.ins-claim-meta-val {
  color: #374151;
  font-weight: 600;
}

.ins-claim-meta-val--mono {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-weight: 700;
  color: #18181b;
}

.ins-claim-plan-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background-color: color-mix(in srgb, var(--brand-secondary, #4374f3) 10%, white);
  color: var(--brand-secondary, #4374f3);
}

.ins-claim-detail-head-right {
  align-items: flex-start;
  gap: 12px;
}

/* Employee claim detail — two-column grid (documents | conversation) */
.claim-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 700px) {
  .claim-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Two-column layout: main + decision/activity sidebar */
/* Claim detail layout: full-height grid, sidebar flush to topbar */
.ins-claim-detail-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.ins-claim-detail-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  overflow: hidden;
}

.ins-claim-detail-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 24px 28px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
  background: var(--dash-body-bg, #f8fafd);
}

.ins-claim-detail-side {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid var(--dash-topbar-sep-color, #d2d9e5);
  background: var(--dash-topbar-bg, #f8fafd);
}

/* Sidebar panel fills the full column, no outer card radius */
.ins-claim-detail-side .ins-claim-side-panel {
  border-radius: 0;
  flex: 1;
}

@media (max-width: 980px) {
  .ins-claim-detail-body {
    flex-direction: column;
    overflow: visible;
  }
  .ins-claim-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: auto;
  }
  .ins-claim-detail-main,
  .ins-claim-detail-side {
    height: auto;
    overflow: visible;
    border-left: none;
    border-top: 1px solid var(--dash-topbar-sep-color, #d2d9e5);
  }
}

/* Member info card above reference */
.ins-claim-member-card {
  padding: 14px 18px;
}

.ins-claim-member-card-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
}

/* Reference ID card */
.ins-claim-ref-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}

.ins-claim-ref-field {
  flex: 1;
  min-width: 0;
}

.ins-claim-ref-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}

.ins-claim-ref-label svg {
  color: var(--brand-accent, #ff6733);
}

.ins-claim-ref-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ins-pol-chip-border, #e5e7eb);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #18181b;
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.ins-claim-ref-input:focus {
  border-color: var(--brand-secondary, #4374f3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-secondary, #4374f3) 15%, transparent);
}

.ins-claim-saved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-success, #32a15e);
  white-space: nowrap;
  padding-bottom: 10px;
}

/* Document tabs */
.ins-claim-doc-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.ins-claim-doc-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.ins-claim-doc-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brand-secondary, #4374f3);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  margin-left: 4px;
}

.ins-claim-doc-tab--active {
  color: var(--brand-primary, #0a3373);
  border-bottom-color: var(--brand-primary, #0a3373);
}

.ins-claim-doc-body {
  padding: 0;
  background-color: transparent;
}

.ins-claim-doc-preview {
  display: flex;
  justify-content: center;
}

.ins-claim-doc-sheet {
  width: 100%;
  max-width: 380px;
  background-color: #ffffff;
  border: 1px solid var(--ins-pol-chip-border, #e5e7eb);
  border-radius: 10px;
  padding: 16px 18px;
}

.ins-claim-doc-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ins-claim-doc-sheet-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand-primary, #0a3373);
}

.ins-claim-doc-sheet-ref {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
}

.ins-claim-doc-sheet-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin: 14px 0;
  border-radius: 8px;
  background-image: repeating-linear-gradient(
    45deg,
    #f3f6fb,
    #f3f6fb 10px,
    #eef2f9 10px,
    #eef2f9 20px
  );
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
}

.ins-claim-doc-sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.ins-claim-doc-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.ins-claim-doc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ins-claim-doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--color-bg-subtle, #f8fafc);
}
.ins-claim-doc-row:hover { background: #f1f5fe; }

.ins-claim-doc-row-icon { color: var(--brand-secondary, #4374f3); flex-shrink: 0; }

.ins-claim-doc-row-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ins-claim-doc-row-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text, #1a2233);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ins-claim-doc-row-type {
  font-size: 11px;
  color: var(--color-text-muted, #6b7280);
  margin-top: 1px;
}

.ins-claim-doc-row-actions { display: flex; gap: 4px; flex-shrink: 0; }

.ins-claim-doc-row-btn {
  padding: 5px 8px !important;
  min-width: unset !important;
  display: inline-flex;
  align-items: center;
}

.ins-claim-doc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
  color: var(--color-text-muted, #6b7280);
  font-size: 13px;
}

/* Sidebar cards */
/* Unified sidebar panel (replaces two separate cards) */
.ins-claim-side-panel {
  background: var(--ins-claim-side-bg, #eef2fb);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ins-claim-side-section {
  padding: 22px 20px;
}

.ins-claim-side-divider {
  height: 1px;
  background: rgba(10, 51, 115, 0.08);
  margin: 0 20px;
}

.ins-claim-side-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9ca3af;
  margin: 0 0 14px;
}

/* Keep old class for any remaining usages */
.ins-claim-side-card {
  padding: 18px 18px 20px;
}

.ins-claim-side-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin: 0 0 12px;
}

.ins-claim-decision-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
}

.ins-claim-decision-amount strong {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--brand-primary, #0a3373);
}

.ins-claim-decision-amount span {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
}

.ins-claim-decision-amount small {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
}

.ins-claim-decision-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ins-claim-decision-btn {
  justify-content: center;
}

.ins-claim-approve-btn {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  border: none;
  border-radius: 100px;
  background-color: var(--brand-secondary, #4374f3);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ins-claim-approve-btn:hover {
  opacity: 0.9;
}

/* Activity feed */
.ins-claim-activity {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ins-claim-activity-event {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
}

.ins-claim-activity-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ins-claim-activity-bubble {
  flex: 1;
  min-width: 0;
}

.ins-claim-activity-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  margin: 0 0 2px;
}

.ins-claim-activity-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.45;
  margin: 0;
}

.ins-claim-activity-time {
  font-size: 11px;
  color: #9ca3af;
  margin: 4px 0 0;
}

/* Flat timeline row (new sidebar design) */
.ins-claim-activity-timeline-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(10, 51, 115, 0.07);
  position: relative;
}
.ins-claim-activity-timeline-row:last-child {
  border-bottom: none;
}
.ins-claim-activity-line-text {
  font-size: 13px;
  color: #374151;
}
.ins-claim-activity-line-actor {
  font-size: 12px;
  color: #9ca3af;
}

/* Request info inline form */
.ins-claim-request-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ins-claim-request-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ins-claim-request-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-primary, #0a3373);
}

.ins-claim-request-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  cursor: pointer;
  color: #9ca3af;
  border-radius: 6px;
  transition: background 0.12s;
}
.ins-claim-request-close:hover { background: rgba(0,0,0,0.06); color: #374151; }

.ins-claim-request-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--ins-pol-chip-border, #e5e7eb);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #111;
  background: #fff;
  resize: vertical;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s;
}
.ins-claim-request-textarea:focus { border-color: var(--brand-secondary, #4374f3); }

.ins-claim-request-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ins-claim-request-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border: 1px solid var(--ins-pol-chip-border, #e5e7eb);
  border-radius: 100px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.ins-claim-request-chip:hover {
  border-color: var(--brand-secondary, #4374f3);
  background: #f0f4ff;
  color: var(--brand-secondary, #4374f3);
}

.ins-claim-request-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--brand-secondary, #4374f3);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ins-claim-request-send:hover { opacity: 0.88; }

/* Claim detail header meta row */
.ins-claim-detail-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-text-muted, #6b7280);
}

.ins-claim-detail-meta-name {
  font-weight: 600;
  color: var(--color-text, #111);
}

.ins-claim-detail-meta-item {
  color: var(--color-text-muted, #6b7280);
}

.ins-claim-detail-meta-item strong {
  font-weight: 600;
  color: var(--color-text, #111);
}

.ins-claim-detail-meta-company {
  font-weight: 700;
  color: var(--brand-primary, #0a3373);
  background: var(--brand-chip-bg, #eef2fb);
  padding: 2px 8px;
  border-radius: 6px;
}

.ins-claim-detail-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--brand-chip-bg, #eef2fb);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-secondary, #4374f3);
}

.ins-claim-pending-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-warning-text, #92400e);
  background: var(--brand-warning-bg, #fef3c7);
  border-radius: 8px;
  padding: 9px 12px;
}

.ins-claim-pending-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-warning, #eca04b);
  flex-shrink: 0;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===========================================================================
   Task Manager (insurer) — reuses .ins-claim-tab* tabs + .hr-dash-recent-table
   =========================================================================== */

/* Tabs row sits inside the card header */
.task-tabs {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

/* Filters row — bordered selects + date inputs */
.task-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6);
}

.task-filter {
  height: 38px;
  min-width: 180px;
  padding: 0 12px;
  border-radius: var(--brand-radius-input, 8px);
  border: 1px solid var(--ins-pol-chip-border, #d2d9e5);
  background-color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-primary, #0a3373);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.task-filter:hover {
  border-color: var(--brand-secondary, #4374f3);
}

.task-filter:focus {
  outline: none;
  border-color: var(--brand-secondary, #4374f3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-secondary, #4374f3) 14%, white);
}

.task-filter--date {
  min-width: 150px;
  color: #6b7280;
}

.task-filter::placeholder {
  color: #9ca3af;
  font-weight: 500;
}

/* Status badge with leading icon (reuses .dash-status base, normal case) */
.task-status {
  gap: 5px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 600;
}

.task-status--new {
  background-color: color-mix(in srgb, var(--brand-secondary, #4374f3) 12%, white);
  color: var(--brand-secondary, #4374f3);
}

.task-status--pending {
  background-color: var(--dash-status-pending-bg, #fef3c7);
  color: var(--dash-status-pending-color, #d97706);
}

.task-status--done {
  background-color: var(--dash-status-approved-bg, #d1fae5);
  color: var(--dash-status-approved-color, #059669);
}

/* "Related to" cell — name over company */
.task-related-name {
  display: block;
  font-weight: 600;
  color: var(--hr-dash-recent-name-color, #18181b);
}

.task-related-sub {
  display: block;
  font-size: 12px;
  color: var(--hr-dash-recent-subtitle-color, #9ca3af);
  margin-top: 2px;
}

/* =====================================================================
   Member form — shared census new + edit (<MemberForm>)
   Structural classes; brand colours come from --brand-* tokens so the
   form reskins per theme. Neutral greys are local, matching the rest of
   this stylesheet.
   ===================================================================== */
.mf-root { display: flex; height: 100%; overflow: hidden; }
.mf-col { position: relative; display: flex; flex-direction: column; flex: 1; min-width: 0; overflow: hidden; }

/* Compact form styles shared by both the HR member editor (mf-root) and the employee
   self-service page (mf-form). White card boxes are preserved — no transparency override. */
.mf-root .page-header-title { font-size: 20px; }
.mf-root .page-header--top { padding-top: 14px; padding-bottom: 12px; }
.mf-root .dash-stat-icon { width: 28px; height: 28px; }
.mf-root .hr-dash-recent-title { font-size: 13px; }

.mf-form .ins-pol-card-body { padding: 14px 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.mf-form .ins-pol-form-grid { gap: 12px 20px; }
.mf-form .ins-pol-field { gap: 5px; }
.mf-form .ins-pol-field-label { font-size: 10.5px; letter-spacing: 0.04em; }
.mf-form .ins-pol-input,
.mf-form select.ins-pol-input { height: 38px; border-radius: 8px; font-size: 13px; }
.mf-form .dash-body { gap: 16px; padding: 16px 20px 24px; }


/* header */
.mf-back { background: none; border: none; cursor: pointer; }
.mf-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mf-title-row .page-header-title { min-width: 0; overflow-wrap: anywhere; }
.mf-rel-badge { flex-shrink: 0; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #e5edfb; color: var(--brand-primary, #0a3373); }
.mf-rel-badge--dep { background: #eef3fe; }
/* Member-form header: title block left, policy stat-box right (wraps under on
   narrow screens). Mirrors the portfolio/HR rounded widget language. */
.mf-header { gap: 16px; flex-wrap: wrap; }
.mf-header-left { min-width: 0; }
.mf-header .page-header-right { flex-shrink: 1; min-width: 0; }
.mf-policy-empty { color: #94a3b8; }
.mf-status { padding: 4px 10px; border-radius: 999px; font-weight: 600; }

/* Condensed policy box: icon + (plan name / coverage) + status chip. */
.mf-policybox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.mf-policybox-icon { display: flex; align-items: center; justify-content: center; color: #9aa6bb; flex-shrink: 0; }
.mf-policybox-main { min-width: 0; }
.mf-policybox-name {
  margin: 0; font-size: 12.5px; font-weight: 600; line-height: 1.25; color: #374151;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px;
}
.mf-policybox-sub {
  margin: 1px 0 0; font-size: 11px; line-height: 1.2; color: #94a3b8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px;
}
.mf-policybox-status {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.mf-policybox-status .mf-policybox-dot { width: 6px; height: 6px; border-radius: 999px; }
/* Dot-driven status chip — colour matches the coverage spec dots (.cov-dot--*) so the
   header chip agrees with the census list / profile coverage surfaces. amber=pending,
   blue=future-start, green=active, red=rejected, grey/neutral=terminated. */
.mf-policybox-status.dot-amber { background: #fcf6e6; color: #8a6d1f; }
.mf-policybox-status.dot-amber .mf-policybox-dot { background: #eca04b; }
.mf-policybox-status.dot-blue { background: #eaf0fe; color: #2c4fb0; }
.mf-policybox-status.dot-blue .mf-policybox-dot { background: #4374f3; }
.mf-policybox-status.dot-green { background: #eef6ee; color: var(--brand-success, #2f6b43); }
.mf-policybox-status.dot-green .mf-policybox-dot { background: var(--brand-success, #32a15e); }
.mf-policybox-status.dot-red { background: #fbe9e9; color: #b42318; }
.mf-policybox-status.dot-red .mf-policybox-dot { background: #dc2626; }
.mf-policybox-status.dot-grey { background: #f1f5f9; color: #64748b; }
.mf-policybox-status.dot-grey .mf-policybox-dot { background: #94a3b8; }
.mf-status--pending { background: #fcf6e6; border: 1px solid #f0e0b6; color: #8a6d1f; }

/* Coverage summary box (Insurance tab) — informational card: status line (reuses
   .cov-badge/.cov-state/.cov-dot for list parity) + a phase explanation + read-only
   policy detail rows. Styled to match hr-dash-recent-card / mf-warn surfaces. */
.mf-coverage-box {
  /* No own margin: the parent .dash-body gap (18px) already spaces it from the
     Policy card — a margin-top here would double it. */
  margin-top: 0;
  padding: 14px 16px;
  background: var(--hr-dash-recent-card-bg, #ffffff);
  border: 1px solid var(--hr-dash-recent-card-border, #d2d9e5);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}
.mf-coverage-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mf-coverage-desc { margin: 9px 0 0; font-size: 12.5px; line-height: 1.5; color: #64748b; }
.mf-coverage-rows {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--ins-pol-statbar-border, #eef1f6);
  display: flex; flex-direction: column; gap: 7px;
}
.mf-coverage-row { display: flex; align-items: baseline; gap: 12px; font-size: 12.5px; }
.mf-coverage-label { flex-shrink: 0; width: 120px; color: #94a3b8; font-weight: 600; }
.mf-coverage-value { color: #374151; font-weight: 500; overflow-wrap: anywhere; }

/* Lifecycle action (Cancel enrollment / Terminate) — sits top-right of the
   coverage box header, in line with the status badge. */
.mf-coverage-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.mf-action-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid #d2d9e5; background: #fff; color: #374151; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background-color .12s; }
.mf-action-btn:hover { background: #f8fafc; }
.mf-action-btn:disabled { opacity: .6; cursor: not-allowed; }
.mf-action-btn--danger { color: var(--brand-error, #dc2626); border-color: #f3caca; }
.mf-action-btn--danger:hover { background: #fdf2f2; }

/* Assign-to-policy picker (Policy card, editable states). One flex row,
   bottom-aligned so the CTA sits level with the input controls (labels above
   don't offset it); wraps — the CTA drops below on narrow widths. */
.mf-assign-panel { display: flex; flex-direction: column; gap: 14px; }
.mf-assign-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 18px 28px; }
.mf-assign-field { flex: 1 1 220px; min-width: 200px; }
.mf-assign-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mf-ghost-btn { background: none; border: none; cursor: pointer; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: #64748b; transition: background-color .12s, color .12s; }
.mf-ghost-btn:hover { background: #f1f5fe; color: var(--brand-primary, #0a3373); }
.mf-ghost-btn:disabled { opacity: .5; cursor: not-allowed; }
.mf-ghost-btn--danger { color: var(--brand-error, #dc2626); }
.mf-ghost-btn--danger:hover { background: #fdf2f2; color: var(--brand-error, #dc2626); }

/* Staged (pending-save) markers — chip in the coverage box header, note under the picker. */
.mf-staged-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: #fcf6e6; color: #b08a2e; border: 1px solid #f0e0b6; }
.mf-staged-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: #64748b; }

/* Previous enrollments — modal (opened from a subtle link / contextual line).
   Rows follow the .bnf-section-header accordion pattern; the lazy timeline
   renders as a simple dotted vertical list. */
/* Quiet secondary link, right-aligned as a footer of the coverage box area —
   same voice as the dashboards' "View all" panel links. */
.mf-hist-link { align-self: flex-end; margin-top: -12px; display: inline-flex; align-items: center; gap: 3px; background: none; border: none; cursor: pointer; padding: 0; font-size: 12.5px; font-weight: 600; color: #64748b; transition: color .12s; }
.mf-hist-link:hover { color: var(--brand-primary, #0a3373); }
/* Compound selector on purpose: the base .mf-modal (width 380px) is defined
   LATER in this file — same specificity would let it win, so the variant must
   out-rank it, not out-order it. */
.mf-modal.mf-modal--wide { width: min(820px, calc(100vw - 48px)); }
.mf-hist-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mf-hist-modal-head .mf-modal-title { margin: 0; }
.mf-hist-body--modal { max-height: 66vh; overflow-y: auto; margin: 16px -24px -24px; border-top: 1px solid var(--hr-dash-recent-head-border, #eaeff6); border-radius: 0 0 12px 12px; }
/* Roomier rows + timeline inside the modal (the inline defaults are card-sized). */
.mf-hist-body--modal .mf-hist-row-head { padding: 16px 24px; gap: 16px; }
.mf-hist-body--modal .mf-hist-policy { font-size: 13.5px; }
.mf-hist-body--modal .mf-hist-row-main { gap: 4px; }
.mf-hist-body--modal .mf-hist-timeline { padding: 4px 24px 20px 44px; gap: 12px; }
.mf-hist-body--modal .mf-hist-empty { padding: 4px 24px 20px 44px; }
.mf-hist-chevron { color: #9ca3af; flex-shrink: 0; transition: transform .15s; }
.mf-hist-chevron.is-open { transform: rotate(180deg); }
.mf-hist-body { border-top: 1px solid var(--hr-dash-recent-head-border, #eaeff6); }
.mf-hist-row:not(:last-child) { border-bottom: 1px solid var(--hr-dash-recent-head-border, #eaeff6); }
.mf-hist-row-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; width: 100%; padding: 12px 16px; background: none; border: none; cursor: pointer; text-align: left; transition: background-color .12s; }
.mf-hist-row-head:hover { background: #fbfcfe; }
.mf-hist-row-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.mf-hist-policy { font-size: 13px; font-weight: 600; color: var(--brand-primary, #0a3373); overflow-wrap: anywhere; }
.mf-hist-sub { font-size: 12px; font-weight: 500; color: #64748b; }
.mf-hist-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mf-hist-date { font-size: 11.5px; color: #94a3b8; white-space: nowrap; }
.mf-hist-timeline { padding: 2px 16px 14px 32px; display: flex; flex-direction: column; gap: 10px; }
.mf-hist-event { position: relative; padding-left: 16px; font-size: 12.5px; color: #374151; }
.mf-hist-event::before { content: ''; position: absolute; left: 0; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #c7d2e8; }
.mf-hist-event-title { font-weight: 600; color: var(--brand-primary, #0a3373); }
.mf-hist-event-meta { color: #94a3b8; font-size: 11.5px; margin-left: 6px; }
.mf-hist-event-note { display: block; color: #64748b; margin-top: 2px; }
.mf-hist-empty { padding: 2px 16px 14px 32px; margin: 0; font-size: 12.5px; color: #94a3b8; }

/* body + rail */
.mf-body { flex: 1; min-height: 0; display: flex; }
.mf-rail { width: 216px; flex-shrink: 0; border-right: 1px solid #e5e7eb; padding: 12px; display: flex; flex-direction: column; gap: 3px; background: #fbfcfe; overflow: auto; }
.mf-rail-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9ca3af; margin: 0 0 6px 4px; }
.mf-member { position: relative; }
.mf-member-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 9px; border-radius: 8px; border: none; text-align: left; cursor: pointer; background: transparent; transition: background-color .12s; }
.mf-member-btn:hover { background: #eef2f7; }
.mf-member-btn.is-active { background: #e5edfb; box-shadow: inset 0 0 0 1px #cbdaf9; }
.mf-avatar { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; border: 1px solid transparent; }
.mf-avatar--emp { background: #e5edfb; color: var(--brand-primary, #0a3373); }
.mf-avatar--emp.is-active { background: var(--brand-primary, #0a3373); color: #fff; }
.mf-avatar--dep { background: #e2e8f0; color: #475569; }
.mf-avatar--dep.is-active { background: #eef3fe; border-color: var(--brand-secondary, #4374f3); }
.mf-member-textwrap { min-width: 0; }
.mf-member-textwrap--dep { padding-right: 26px; }
.mf-member-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--brand-primary, #0a3373); overflow: hidden; overflow-wrap: anywhere; }
.mf-member-sub { display: block; font-size: 12px; color: #64748b; }
.mf-member-remove { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 6px; border: none; background: transparent; color: #9aa6bb; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .12s, color .12s; }
.mf-member-remove:hover { background: #fbe9e9; color: var(--brand-error, #dc2626); }
.mf-member-remove:disabled { opacity: .4; cursor: not-allowed; }
.mf-add-dep { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; padding: 9px 10px; border-radius: 8px; border: 1px dashed #c7d2e8; background: #fff; color: var(--brand-primary, #0a3373); font-size: 13px; font-weight: 600; cursor: pointer; }
.mf-add-dep:disabled { color: #9aa6bb; cursor: not-allowed; opacity: .7; }
.mf-hint { font-size: 11px; color: #94a3b8; margin: 6px 4px 0; line-height: 1.5; }

/* content + tabs */
.mf-content { position: relative; flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
/* Underline tabs: read clearly as a view/context switch (whole panel below changes),
   not as an in-page pill filter. The row's bottom rule spans the content width and the
   active tab "owns" it via a brand-colored underline. */
.mf-tabs { display: flex; align-items: stretch; padding: 12px 28px 0; flex-shrink: 0; border-bottom: 1px solid #e5e7eb; }
.mf-seg { display: inline-flex; align-items: stretch; gap: 2px; }
.mf-seg-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; margin-bottom: -1px; cursor: pointer; font-size: 13px; font-weight: 600; border: none; border-bottom: 2px solid transparent; background: transparent; color: #64748b; transition: color .12s, border-color .12s; }
.mf-seg-btn:hover { color: var(--brand-primary, #0a3373); }
.mf-seg-btn.is-active { color: var(--brand-primary, #0a3373); border-bottom-color: var(--brand-secondary, #4374f3); }
.mf-lead { display: flex; flex-direction: column; gap: 14px; }
/* Single-column document list, flush with the flat form gutter. The descriptive note
   now lives in the card header (.mf-doc-subtitle), so the list gets a uniform, moderate
   top breathing room instead of an oversized empty band. */
.mf-root .mf-docs { grid-template-columns: 1fr; gap: 10px; }
/* Note-as-subtitle under the card title (above the header divider). */
.mf-doc-head-text { display: flex; flex-direction: column; min-width: 0; }
.mf-doc-subtitle { font-size: 12.5px; color: #7d93b3; margin: 0; line-height: 1.45; }
/* Secondary "Additional" subgroup inside the same documents card. */
.mf-doc-subgroup { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--hr-dash-recent-head-border, #eaeff6); display: flex; flex-direction: column; gap: 10px; }
.mf-doc-subgroup-head { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #9ca3af; margin: 0; }
/* padding-bottom clears the floating save/cancel cluster so the last field stays reachable */
.mf-scroll { flex: 1; min-height: 0; overflow: auto; padding-bottom: 84px; }
.mf-warn { display: flex; gap: 8px; padding: 10px 14px; border-radius: 12px; background: #fcf6e6; border: 1px solid #f0e0b6; color: #8a6d1f; font-size: 12.5px; line-height: 1.55; }
.mf-warn-icon { flex-shrink: 0; margin-top: 1px; }
.mf-warn-body { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mf-warn-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mf-warn-list li { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.mf-warn-cat {
  flex-shrink: 0; min-width: 76px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: #b08a2e;
}
.mf-warn-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.mf-warn-link {
  display: inline-flex; align-items: center; gap: 2px; padding: 0;
  background: none; border: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--brand-secondary, #4374f3);
}
.mf-warn-link:hover { text-decoration: underline; }
.mf-error { padding: 10px 12px; border-radius: 8px; background-color: #fde8e8; color: var(--brand-error, #dc2626); font-size: 13px; }

/* preview */
.mf-preview { width: 440px; flex-shrink: 0; height: 100%; background: #fff; border-left: 1px solid #e5e7eb; display: flex; flex-direction: column; }
.mf-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #e5e7eb; }
.mf-preview-title { font-size: 14px; font-weight: 600; color: #111827; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-preview-actions { display: flex; align-items: center; gap: 8px; margin-left: 12px; }
.mf-icon-btn { width: 32px; height: 32px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mf-preview-body { flex: 1; overflow: auto; background: #f1f5fe; }
.mf-preview-frame { width: 100%; height: 100%; border: none; }
.mf-preview-imgwrap { padding: 20px; display: flex; align-items: center; justify-content: center; height: 100%; }
.mf-preview-img { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; }
.mf-preview-fallback { padding: 40px; text-align: center; }
.mf-preview-fallback-icon { color: #7d93b3; margin-bottom: 16px; }
.mf-preview-dl { padding: 8px 20px; border-radius: 8px; background: var(--brand-secondary, #2563eb); color: #fff; font-size: 13px; font-weight: 600; border: none; cursor: pointer; }

/* footer — floating bottom-right cluster over the content (no full-width bar) */
.mf-footer {
  position: absolute;
  right: 20px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0;
  border: none;
  background: transparent;
  pointer-events: none;
}
.mf-footer-info {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: #7d93b3;
  pointer-events: auto;
}
/* Give the indicator its own readable pill when it carries content. */
.mf-footer-info:not(:empty) {
  padding: 6px 12px; border-radius: 100px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .1);
}
.mf-unsaved { color: var(--brand-warning, #eca04b); font-weight: 600; }
.mf-footer-actions {
  display: flex; align-items: center; gap: 8px;
  padding: 6px; border-radius: 14px;
  background: rgba(255, 255, 255, .55); backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, .16), 0 1px 3px rgba(15, 23, 42, .1);
  pointer-events: auto;
}
.mf-root .hr-dash-recent-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

/* leave modal */
.mf-modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.mf-modal { background: #fff; border-radius: 12px; padding: 24px; width: 380px; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); }
.mf-modal-title { font-size: 16px; font-weight: 700; color: var(--brand-primary, #0a3373); margin: 0 0 8px; }
.mf-modal-text { font-size: 13.5px; color: #64748b; margin: 0 0 18px; line-height: 1.5; }
.mf-modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.mf-modal-stay { padding: 9px 16px; border-radius: 8px; border: 1px solid #d2d9e5; background: #fff; color: #64748b; font-size: 13px; font-weight: 600; cursor: pointer; }
.mf-modal-leave { padding: 9px 16px; border-radius: 8px; border: none; background: var(--brand-error, #dc2626); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.mf-modal-leave:disabled { opacity: .6; cursor: not-allowed; }

/* required-field marker */
.mf-req { color: var(--brand-error, #dc2626); }

/* documents */
.mf-doc-note { font-size: 12.5px; color: #7d93b3; margin: 0; padding: 0 16px 6px; }
.mf-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; padding: 0; }
.mf-doc-col { display: flex; flex-direction: column; gap: 0; }
.mf-doc-col-title { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #9ca3af; margin: 0 0 2px 2px; padding: 0 16px; }
.mf-doc-row { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border: none; border-bottom: 1px solid #e5e7eb; border-radius: 0; background: #fff; }
.mf-doc-col .mf-doc-row:last-child { border-bottom: none; }
.ins-claim-doc-body .mf-doc-col .mf-doc-row:last-child { border-bottom: 1px solid #e5e7eb; }
.mf-doc-row--filled { background: #f7fcf8; }
.mf-doc-icon { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: #eef2f8; color: #64748b; }
.mf-doc-row--filled .mf-doc-icon { background: #eef6ee; color: var(--brand-success, #2f6b43); }
.mf-doc-info { flex: 1; min-width: 0; }
.mf-doc-name { font-size: 13px; font-weight: 600; color: var(--brand-primary, #0a3373); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-doc-sub { font-size: 12px; color: #94a3b8; margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-doc-row--filled .mf-doc-sub { color: var(--brand-success, #2f6b43); }
.mf-doc-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mf-doc-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 7px; border: 1px solid #d2d9e5; background: #fff; color: #475569; font-size: 12px; font-weight: 600; cursor: pointer; }
.mf-doc-btn:hover { background: #f8fafc; }
.mf-doc-btn:disabled { opacity: .5; cursor: not-allowed; }
.mf-doc-btn--primary { border-color: var(--brand-secondary, #4374f3); color: var(--brand-secondary, #4374f3); }
.mf-doc-btn--primary:hover { background: color-mix(in srgb, var(--brand-secondary, #4374f3) 8%, white); }
.mf-doc-iconbtn { width: 30px; height: 30px; padding: 0; justify-content: center; }
.mf-doc-iconbtn--danger:hover { background: #fef2f2; color: var(--brand-error, #dc2626); border-color: #f3c2c2; }
.mf-doc-iconbtn--ocr { color: var(--brand-secondary, #4374f3); border-color: #cfe0fb; }
.mf-doc-iconbtn--ocr:hover { background: color-mix(in srgb, var(--brand-secondary, #4374f3) 8%, white); }
.mf-doc-progress { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--brand-secondary, #4374f3); }

/* Drag-and-drop target highlight + upload progress bar */
.mf-doc-row--drag { border-color: var(--brand-secondary, #4374f3); border-style: dashed; background: color-mix(in srgb, var(--brand-secondary, #4374f3) 6%, white); }
.mf-doc-bar { display: block; height: 5px; margin-top: 6px; border-radius: 999px; background: #e5edf9; overflow: hidden; }
.mf-doc-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--brand-secondary, #4374f3); transition: width .15s ease; }
.mf-doc-sub--reading { color: var(--brand-secondary, #4374f3) !important; display: inline-flex; align-items: center; gap: 5px; }
.mf-spin-soft { animation: mf-pulse 1.1s ease-in-out infinite; }
@keyframes mf-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* OCR autofill confirm modal — document preview on the left, read fields on the right */
.mf-ocr-modal { width: 720px; max-width: calc(100vw - 32px); padding: 0; overflow: hidden; }
.mf-ocr-grid { display: grid; grid-template-columns: 280px 1fr; min-height: 0; }
.mf-ocr-preview {
  position: relative;
  background: #0f172a; display: flex; align-items: center; justify-content: center;
  padding: 14px; max-height: 74vh; overflow: hidden;
}
.mf-ocr-zoom {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(4px);
  transition: background .12s ease;
}
.mf-ocr-zoom:hover { background: rgba(255,255,255,.3); }
/* Fullscreen enlarge of the source document */
.mf-ocr-lightbox {
  position: fixed; inset: 0; z-index: 1200; background: rgba(8, 12, 22, .9);
  display: flex; align-items: center; justify-content: center; padding: 32px;
  animation: toast-in .15s ease-out;
}
.mf-ocr-lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 16px 48px rgba(0,0,0,.5); }
.mf-ocr-lightbox-frame { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 8px; background: #fff; }
.mf-ocr-lightbox-close {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; cursor: pointer; color: #fff; background: rgba(255,255,255,.14);
}
.mf-ocr-lightbox-close:hover { background: rgba(255,255,255,.28); }
.mf-ocr-preview-img { max-width: 100%; max-height: calc(74vh - 28px); border-radius: 8px; object-fit: contain; box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.mf-ocr-preview-frame { width: 100%; height: calc(74vh - 28px); border: 0; border-radius: 8px; background: #fff; }
.mf-ocr-preview-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #64748b; font-size: 12px; font-weight: 600; }
.mf-ocr-pane { display: flex; flex-direction: column; padding: 18px 20px; min-width: 0; max-height: 74vh; }
.mf-ocr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mf-ocr-head-text { min-width: 0; }
.mf-ocr-head .mf-modal-title { margin: 0; line-height: 1.25; }
.mf-ocr-head .mf-modal-text { margin: 1px 0 0; }
.mf-ocr-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; flex-shrink: 0;
  border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--brand-secondary, #4374f3); background: color-mix(in srgb, var(--brand-secondary, #4374f3) 10%, white);
}
.mf-ocr-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mf-ocr-count { font-size: 12px; font-weight: 600; color: #64748b; }
.mf-ocr-toggleall { font-size: 12px; font-weight: 600; color: var(--brand-secondary, #4374f3); background: none; border: 0; cursor: pointer; padding: 2px 4px; }
.mf-ocr-toggleall:hover { text-decoration: underline; }
.mf-ocr-list { display: flex; flex-direction: column; gap: 5px; flex: 1; min-height: 0; overflow: auto; margin-bottom: 14px; }
/* Compact single-line row: checkbox · muted caption · prominent value on the right */
.mf-ocr-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 11px; border: 1px solid #e8ecf3;
  border-radius: 8px; cursor: pointer; background: #fbfcfe;
}
.mf-ocr-row.is-on { border-color: #cfe0fb; background: #f5f9ff; }
.mf-ocr-row input { accent-color: var(--brand-secondary, #4374f3); flex-shrink: 0; }
.mf-ocr-field { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.mf-ocr-label { font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #9aa6b8; flex-shrink: 0; }
.mf-ocr-vals { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; margin-left: auto; min-width: 0; }
.mf-ocr-value { font-size: 14px; font-weight: 700; color: var(--brand-primary, #0a3373); word-break: break-word; text-align: right; line-height: 1.2; }
.mf-ocr-current { font-size: 11px; font-weight: 500; color: #b08a2e; text-align: right; }
@media (max-width: 560px) {
  .mf-ocr-grid { grid-template-columns: 1fr; }
  .mf-ocr-preview { max-height: 30vh; }
  .mf-ocr-preview-img { max-height: calc(30vh - 28px); }
  .mf-ocr-preview-frame { height: calc(30vh - 28px); }
}

/* =====================================================================
   Toasts (<ToastProvider> / useToast)
   ===================================================================== */
.toast-viewport {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1000;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: auto; max-width: calc(100vw - 32px); pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 14px; border-radius: 9999px; background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 36px rgba(15, 23, 42, .16);
  animation: toast-in .2s ease-out;
  min-width: 260px; max-width: min(520px, calc(100vw - 32px));
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* Green/red accent: tinted icon chip + colored border ring per variant. */
.toast--success { border-color: rgba(50, 161, 94, .35); }
.toast--error { border-color: rgba(220, 38, 38, .35); }
.toast--info { border-color: rgba(67, 116, 243, .35); }
.toast-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.toast--success .toast-icon { color: var(--brand-success, #32a15e); background: rgba(50, 161, 94, .12); }
.toast--error .toast-icon { color: var(--brand-error, #dc2626); background: rgba(220, 38, 38, .12); }
.toast--info .toast-icon { color: var(--brand-secondary, #4374f3); background: rgba(67, 116, 243, .12); }
.toast-body { flex: 1; min-width: 0; }
.toast-title { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--brand-primary, #0a3373); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-desc { margin: 2px 0 0; font-size: 12.5px; color: #64748b; line-height: 1.45; }
.toast-close { flex-shrink: 0; width: 24px; height: 24px; border: none; background: transparent; color: #94a3b8; cursor: pointer; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; }
.toast-close:hover { background: #f1f5f9; color: #475569; }

/* =====================================================================
   Member form — mobile (<= 768px)
   ===================================================================== */
@media (max-width: 768px) {
  /* Body stacks: the member rail becomes a horizontal scroller above content. */
  .mf-body { flex-direction: column; }
  .mf-rail {
    width: auto; flex-direction: row; align-items: center;
    overflow-x: auto; overflow-y: hidden;
    border-right: none; border-bottom: 1px solid #e5e7eb;
    padding: 10px 12px; gap: 8px;
  }
  .mf-rail-title { display: none; }
  .mf-member { flex-shrink: 0; }
  .mf-member-btn { width: auto; }
  .mf-member-name { max-width: 130px; }
  .mf-add-dep { flex-shrink: 0; margin-top: 0; white-space: nowrap; padding: 9px 12px; }
  .mf-hint { display: none; }

  /* Tabs + cards align to a tighter gutter; tabs scroll horizontally on mobile. */
  .mf-tabs { padding: 12px 16px 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .mf-tabs::-webkit-scrollbar { display: none; }
  .mf-seg { flex-shrink: 0; flex-wrap: nowrap; }
  .mf-seg-btn { white-space: nowrap; }
  .mf-root .dash-body { padding-left: 16px; padding-right: 16px; }

  /* Header compaction. */
  .mf-root .page-header--top { padding-left: 16px; padding-right: 16px; }
  .mf-root .page-header-title { font-size: 18px; }

  /* Document columns are already auto-fit; tighten the gutter. */
  .mf-docs { padding: 0; gap: 14px; }

  /* Preview becomes a full-screen overlay instead of a 440px side panel. */
  .mf-preview { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; border-left: none; }

  /* Footer stays a compact floating cluster bottom-right, never a full-width bar. */
  .mf-footer { right: 12px; bottom: 12px; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .mf-footer-actions { padding: 5px; }

  /* Toasts stay centered above the bottom on phones. */
  .toast-viewport { left: 50%; transform: translateX(-50%); bottom: 16px; width: auto; max-width: calc(100vw - 24px); }

  /* Phone splits to its own row on phones. */
  .mf-phone { flex-wrap: wrap; }
  .mf-phone-code { width: 100%; }

  /* ── Global: form input rows always stack vertically on mobile ── */

  /* The primary form grid used across HR, employee, and insurer pages */
  .ins-pol-form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Generic helper classes for any new form layouts */
  .form-row,
  .input-row,
  .field-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .form-row > *,
  .input-row > *,
  .field-row > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .form-grid,
  .input-grid,
  .field-grid {
    grid-template-columns: 1fr !important;
  }

  /* Member-form label+input pairs stack */
  .mf-field-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .mf-field-row label,
  .mf-field-row .mf-label {
    width: 100%;
    min-width: 0;
  }

  .mf-field-row input,
  .mf-field-row select,
  .mf-field-row textarea,
  .mf-field-row .mf-combo,
  .mf-field-row .mf-date {
    width: 100%;
    min-width: 0;
  }
}

/* ── Custom inputs: combobox / date field / phone (member form) ──────────── */
.mf-combo { position: relative; width: 100%; }
.mf-combo-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; text-align: left;
}
.mf-combo-trigger.is-disabled { opacity: 0.6; cursor: not-allowed; }
.mf-combo-trigger:focus-visible { border-color: var(--brand-secondary, #4374f3); }
.mf-combo-value { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.mf-combo-value-text { overflow: hidden; text-overflow: ellipsis; }
.mf-combo-placeholder { color: var(--ins-pol-input-placeholder-color, #9ca3af); }
.mf-combo-caret { color: #9ca3af; flex-shrink: 0; }

/* Positioned via inline style (position: fixed; top/bottom/left/width) computed in JS
   from the trigger's getBoundingClientRect() — see combobox.tsx. It's portaled to
   document.body so it escapes any `.mf-scroll`-style ancestor overflow clipping;
   z-index only needs to clear in-page chrome (modals sit at 50, toasts/fullscreen
   overlays at 1000+). */
.mf-combo-panel {
  z-index: 1000;
  background: #fff; border: 1px solid var(--ins-pol-input-border, #e5e7eb);
  border-radius: 10px; box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
  padding: 6px; display: flex; flex-direction: column; gap: 4px;
}
.mf-combo-search { position: relative; display: flex; align-items: center; padding: 2px 2px 6px; border-bottom: 1px solid #f1f5fe; }
.mf-combo-search-icon { position: absolute; left: 10px; color: #9ca3af; }
.mf-combo-search-input {
  width: 100%; height: 34px; border: 1px solid var(--ins-pol-input-border, #e5e7eb);
  border-radius: 8px; padding: 0 10px 0 30px; font-size: 13px; outline: none; color: #374151;
}
.mf-combo-search-input:focus { border-color: var(--brand-secondary, #4374f3); }
.mf-combo-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.mf-combo-opt {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border-radius: 7px; font-size: 13px; color: #374151;
  text-align: left; cursor: pointer; background: transparent; border: none;
}
.mf-combo-opt-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-combo-opt.is-active { background: #f1f5fe; }
.mf-combo-opt.is-selected { color: var(--brand-secondary, #4374f3); font-weight: 600; }
.mf-combo-opt-check { color: var(--brand-secondary, #4374f3); flex-shrink: 0; }
.mf-combo-empty { padding: 12px; text-align: center; color: #9ca3af; font-size: 13px; }

.mf-datefield { position: relative; width: 100%; }
.mf-datefield-text { padding-right: 38px; }
.mf-datefield-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; border: none; background: transparent;
  color: #6b7280; cursor: pointer;
}
.mf-datefield-btn:hover { background: #f1f5fe; color: var(--brand-secondary, #4374f3); }
.mf-datefield-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mf-datefield-native { position: absolute; right: 6px; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Phone: ONE control — dial picker embedded inside the input box. */
.mf-phone {
  display: flex; align-items: stretch; width: 100%; height: 38px;
  border: 1px solid var(--ins-pol-input-border, #e5e7eb); border-radius: 8px;
  background: var(--ins-pol-input-bg, #fff);
}
.mf-phone:focus-within { border-color: var(--brand-secondary, #4374f3); }
.mf-phone.is-disabled { opacity: 0.6; }
.mf-phone .mf-combo { width: auto; flex-shrink: 0; }
.mf-phone-codebtn {
  height: 100%; width: auto; border: none; background: transparent;
  border-radius: 8px 0 0 8px; padding: 0 6px 0 10px; gap: 6px; font-size: 13px; color: #374151;
}
.mf-phone-sep { width: 1px; align-self: center; height: 20px; background: var(--ins-pol-input-border, #e5e7eb); flex-shrink: 0; }
.mf-phone-number {
  flex: 1; min-width: 0; height: 100%; border: none; background: transparent;
  padding: 0 12px; font-size: 13px; color: #374151; outline: none;
}
.mf-phone-number::placeholder { color: var(--ins-pol-input-placeholder-color, #9ca3af); }
/* PhoneField's dial-code trigger is narrow (just the code button); the panel needs to
   be wider to fit country names. Since the panel is portaled (no longer a descendant
   of .mf-phone), width comes from the `panelMinWidth` prop, not an ancestor selector. */
.mf-phone-flag { font-size: 16px; line-height: 1; }

/* Clear (×) action inside a clearable combobox trigger. */
.mf-combo-clear {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0;
  color: #9ca3af; cursor: pointer;
}
.mf-combo-clear:hover { background: #f1f5fe; color: var(--brand-secondary, #4374f3); }

/* Date roller popover — Year / Month / Day scroll columns (good for birth dates). */
.mf-roll {
  position: absolute; z-index: 55; top: calc(100% + 4px); left: 0;
  width: 248px; background: #fff; border: 1px solid var(--ins-pol-input-border, #e5e7eb);
  border-radius: 12px; box-shadow: 0 12px 28px rgba(16, 24, 40, 0.16); padding: 10px;
}
.mf-roll-cols { display: grid; grid-template-columns: 1fr 1fr 0.8fr; gap: 6px; }
.mf-roll-colwrap { display: flex; flex-direction: column; min-width: 0; }
.mf-roll-label { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #9ca3af; padding-bottom: 4px; }
.mf-roll-col {
  height: 104px; overflow-y: auto; scroll-snap-type: y proximity;
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid #f1f5fe; border-radius: 8px; padding: 4px;
}
.mf-roll-col::-webkit-scrollbar { width: 6px; }
.mf-roll-col::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }
.mf-roll-item {
  padding: 7px 6px; text-align: center; border: none; background: transparent; cursor: pointer;
  border-radius: 7px; font-size: 13px; color: #6b7280; scroll-snap-align: center; flex-shrink: 0;
}
.mf-roll-item:hover:not(.is-sel) { background: #f1f5fe; }
.mf-roll-item.is-sel { background: var(--brand-secondary, #4374f3); color: #fff; font-weight: 600; }
.mf-roll-done {
  margin-top: 10px; width: 100%; height: 34px; border: none; border-radius: 8px;
  background: var(--brand-primary, #0a3373); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
}
.mf-roll-done:hover { filter: brightness(1.08); }

/* Member-type dropdown lives full-width above the name row. */
.mf-type-field { margin-bottom: 14px; max-width: 220px; }
/* Small leading icon inside dropdown option rows. */
.mf-opt-icon { color: #6b7280; flex-shrink: 0; }
.mf-combo-opt.is-selected .mf-opt-icon { color: var(--brand-secondary, #4374f3); }

/* Wizard action rows — right-aligned on desktop, centered on mobile */
.wizard-actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 32px;
}
.wizard-actions button { min-width: 140px; justify-content: center; }
@media (max-width: 768px) {
  .wizard-actions { justify-content: center; }
  .wizard-actions button { flex: 1; max-width: 180px; }

  .wizard-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-width: 100% !important;
  }
  .wizard-card-wrap {
    padding: 0 !important;
  }
}

/* =====================================================================
   Contact Center (thread list + detail) — WhatsApp-style two-pane LAYOUT
   and INTERACTION pattern for the rail CHROME + detail pane (fixed-width
   chat list, always-on search, aligned bubbles, pill composer, mobile
   one-screen-at-a-time nav) rendered entirely in this app's OWN design
   tokens — brand navy (`var(--brand-primary, #0a3373)`), the existing muted
   greys (`#64748b`/`#94a3b8`), `#e5e7eb` borders, `.mf-avatar`/`.mf-avatar--emp`
   for avatars and `.ins-pol-search` for the search field. No WhatsApp
   colors (green bubbles, grey/beige fills) are used — WhatsApp is the
   layout/interaction reference only, not the palette. Still reuses
   `.mf-modal`/`.hr-dash-recent-btn-*`/`.ins-pol-*` field primitives for the
   New Thread modal's chrome; the rail shell/bubbles/composer are their own
   `.cc-*` rule set. The individual thread ROWS, however, deliberately do
   NOT diverge from the census member-form rail — they reuse
   `.mf-member-btn`/`.mf-avatar`/`.mf-member-name`/`.mf-member-sub` as-is
   (`.cc-thread-btn` only adds a `<Link>`-specific tweak), so a "pick one of
   these" row looks identical across every rail in the app.
   ===================================================================== */
.cc-root { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.cc-body { flex: 1; min-height: 0; display: flex; }
.cc-root .hr-dash-recent-btn-primary:disabled,
.cc-root .hr-dash-recent-btn-outline:disabled { opacity: .6; cursor: not-allowed; }

/* A small square icon button, reused for every icon-only action in this
   feature: Archive, the mobile back chevron, and the composer's attachment
   button — `.mf-icon-btn`'s exact shape (32px, 6px radius, bordered white
   box, from the document-preview panel) rather than a circular WhatsApp-
   style button, plus a hover tint so it reads as clickable. */
.cc-icon-btn { width: 32px; height: 32px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #64748b; cursor: pointer; text-decoration: none; }
.cc-icon-btn:hover { background: #f8fafc; color: var(--brand-primary, #0a3373); }
.cc-icon-btn:disabled { opacity: .5; cursor: not-allowed; background: #fff; }

/* Left rail — fixed-width chat list, WhatsApp Web/Desktop proportions. */
.cc-rail { width: 380px; flex-shrink: 0; border-right: 1px solid #e5e7eb; padding: 10px 0 0; display: flex; flex-direction: column; background: #fff; overflow: hidden; }
.cc-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 10px 16px; }
.cc-rail-title { font-size: 16px; font-weight: 700; color: var(--brand-primary, #0a3373); margin: 0; }
/* "New thread" is `.mf-add-dep` verbatim (same dashed-border box as the
   census rail's "+ Add dependant") — `.cc-newchat-btn` only adds the
   horizontal inset the other rail sections use. It sits directly above the
   thread rows (after search + Archived), so — unlike `.mf-add-dep`'s default
   `margin-top` (meant to trail a list) — it keeps a small top gap from the
   Archived link above it and a bottom gap before the first thread row. */
.cc-newchat-btn { margin: 4px 12px 10px; flex-shrink: 0; }

/* Always-visible search (never collapses) — `.ins-pol-search`'s existing
   white/bordered field verbatim; `.cc-search` only adds rail-specific
   margins and overrides its `flex: 1` (meant for a horizontal toolbar) back
   to a fixed-height item inside this vertical rail. */
.cc-search { flex: 0 0 auto; margin: 0 12px 8px; }
.cc-search-clear { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: none; background: transparent; padding: 0; color: #9ca3af; cursor: pointer; }
.cc-search-clear:hover { color: #64748b; }

/* De-emphasized "Archived" row/link instead of a prominent filter — WhatsApp
   treats Archived as a single tucked-away row, not a peer tab. */
.cc-archived-link { display: flex; align-items: center; gap: 8px; margin: 0 12px 6px; padding: 8px 12px; border-radius: 8px; border: none; background: transparent; color: #64748b; font-size: 12.5px; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.cc-archived-link:hover { background: #eef2f7; color: var(--brand-primary, #0a3373); }

.cc-rail-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding: 0 12px 12px; }
.cc-rail-empty, .cc-rail-loading { padding: 24px 16px; text-align: center; font-size: 12.5px; color: #94a3b8; }

/* Thread row — reuses the census member-form rail's compact `.mf-member-btn`
   (avatar + two-line text block, ~44px tall) verbatim instead of a
   WhatsApp-spacious row; `.cc-thread-btn` only strips the underline a `<Link>`
   would otherwise get and keeps the row full-width inside `.cc-rail-list`'s
   own horizontal padding (mirroring how `.mf-member-btn` sits inside
   `.mf-rail`'s padding on the census page). */
.cc-thread-btn { width: 100%; text-decoration: none; }

/* Right pane */
.cc-detail { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
/* Compact single-row header (~59px), WhatsApp-style — avatar + name/subtitle
   + an icon-only Archive action; the thread name/counterparty are already
   visible on the selected rail row, so this stays a light context strip. */
.cc-detail-head { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid #e5e7eb; min-height: 59px; }
/* Hidden on desktop — shown only in the mobile media query below, where the
   rail and detail panes are never both on screen at once. */
.cc-back-btn { display: none; }
.cc-detail-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-detail-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--brand-primary, #0a3373); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-detail-sub { margin: 0; font-size: 12px; font-weight: 400; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cc-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: #fbfcfe; }
.cc-load-more { align-self: center; }
.cc-empty-state { margin: auto; text-align: center; font-size: 13px; color: #94a3b8; }

/* Message bubbles — WhatsApp's left/right alignment + in-bubble timestamp
   pattern, "mine" using the same light-navy tint as a selected rail row
   (#e5edfb) instead of WhatsApp green, "theirs" white with the app's
   standard card border. Uniform corner rounding (no speech-bubble tail). */
.cc-msg { display: flex; flex-direction: column; max-width: 65%; gap: 2px; }
.cc-msg--mine { align-self: flex-end; align-items: flex-end; }
.cc-msg--theirs { align-self: flex-start; align-items: flex-start; }
.cc-msg-meta { font-size: 11px; color: #94a3b8; }
.cc-msg-bubble { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.cc-msg-sender { font-size: 11.5px; font-weight: 700; color: var(--brand-secondary, #4374f3); margin-bottom: 2px; }
.cc-msg-text { white-space: pre-wrap; overflow-wrap: anywhere; color: #1f2937; }
.cc-msg-time { font-size: 10.5px; align-self: flex-end; margin-top: 3px; }
.cc-msg--mine .cc-msg-bubble { background: #e5edfb; }
.cc-msg--mine .cc-msg-time { color: #64748b; }
.cc-msg--theirs .cc-msg-bubble { background: #fff; border: 1px solid #e5e7eb; }
.cc-msg--theirs .cc-msg-time { color: #94a3b8; }
.cc-msg-attachments { display: flex; gap: 6px; flex-wrap: wrap; }

/* Small bordered pill for a file — shared by the composer's pending-upload
   chip and a message's downloadable attachment chip. */
.cc-attachment-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid #d2d9e5; background: #fff; color: var(--brand-primary, #0a3373); font-size: 12px; font-weight: 600; cursor: pointer; }
.cc-attachment-chip:disabled { opacity: .6; cursor: not-allowed; }
.cc-attachment-chip--pending { background: #f1f5fe; border-color: #d7e3fb; cursor: default; }

.cc-composer { padding: 10px 16px; border-top: 1px solid #e5e7eb; background: #fff; }
.cc-composer-archived { text-align: center; font-size: 13px; color: #94a3b8; padding: 8px 0; }
.cc-composer-files { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cc-composer-row { display: flex; gap: 6px; align-items: center; }
/* Rounded pill input (WhatsApp's LAYOUT), kept in the app's own bordered-
   white-field style (not a flat grey fill) — the shared `.cc-icon-btn`
   attach button and a circular send button (grey until there's something to
   send, brand navy once active) flank it. */
.cc-composer-textarea { flex: 1; resize: none; min-height: 40px; max-height: 160px; padding: 9px 16px; border: 1px solid #d2d9e5; border-radius: 20px; background: #fff; font-size: 13.5px; font-family: inherit; outline: none; }
.cc-composer-textarea:focus { border-color: var(--brand-secondary, #4374f3); }
.cc-send-btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 9999px; border: none; background: #e5e7eb; color: #94a3b8; cursor: pointer; }
.cc-send-btn--active { background: var(--brand-primary, #0a3373); color: #fff; }
.cc-send-btn:disabled { cursor: not-allowed; }

/* New-thread modal — .mf-modal with a wider, flex-column body (its own gap
   replaces each child's default bottom margin), a slightly larger corner
   radius for a more WhatsApp-"New chat"-picker feel, + a Back/Cancel/Next
   action row split left/right. */
.cc-modal { display: flex; flex-direction: column; gap: 16px; width: min(480px, calc(100vw - 48px)); border-radius: 16px; }
.cc-modal .mf-modal-text { margin: 0; }
.cc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-modal-head .mf-modal-title { margin: 0; }
.cc-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; border: none; background: transparent; color: #64748b; cursor: pointer; }
.cc-modal-close:hover { background: #f1f5fe; color: var(--brand-primary, #0a3373); }
.cc-modal-field { gap: 6px; }
.cc-modal-actions { justify-content: space-between; }
.cc-modal-actions-right { display: flex; align-items: center; gap: 8px; }

@media (max-width: 768px) {
  /* WhatsApp mobile shows exactly ONE pane at a time (full screen), not a
     side-by-side split: the list route shows only the rail, the thread
     route shows only the conversation. `.cc-rail--has-active` is set by
     <ThreadList> whenever `activeId` is passed (i.e. we're on
     `/[side]/contact-center/[id]`), so it's the rail that hides itself
     there; `.cc-detail-placeholder` (the list route's empty-state right
     pane) hides the same way so the list gets the whole screen instead.
     `.cc-back-btn` (hidden on desktop by default) becomes visible here as
     the only way back from a full-screen conversation to the list. */
  .cc-rail { width: 100%; }
  .cc-rail.cc-rail--has-active { display: none; }
  .cc-detail-placeholder { display: none; }
  .cc-detail { width: 100%; min-height: 0; }
  .cc-back-btn { display: inline-flex; }
  .cc-msg { max-width: 80%; }
  .cc-messages { padding: 14px; }
  .cc-composer { padding: 8px 10px; }
}
