.emp-verify {
  min-height: 100dvh;
  background:
    radial-gradient(
      900px 420px at 50% -20%,
      color-mix(in srgb, var(--emp-verify-accent, #0b6e4f) 28%, #fff) 0%,
      transparent 60%
    ),
    #f1f5f9;
  padding: 24px 16px 40px;
  color: #0f172a;
}

.emp-verify__shell {
  width: min(440px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.emp-verify__brand {
  text-align: center;
}

.emp-verify__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
}

.emp-verify__org {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #334155;
  font-size: 0.8rem;
}

.emp-verify__brand h1 {
  margin: 6px 0 0;
  font-size: 1.35rem;
}

.emp-verify__badge {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid transparent;
}

.emp-verify__badge p {
  margin: 4px 0 0;
  font-size: 0.92rem;
}

.emp-verify__badge-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.emp-verify__badge--ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.emp-verify__badge--ok .emp-verify__badge-mark {
  background: #10b981;
  color: #fff;
}

.emp-verify__badge--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.emp-verify__badge--warn .emp-verify__badge-mark {
  background: #f59e0b;
  color: #fff;
}

.emp-verify__badge--bad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.emp-verify__badge--bad .emp-verify__badge-mark {
  background: #ef4444;
  color: #fff;
}

.emp-verify__card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.emp-verify__photo {
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 18px;
  overflow: hidden;
  background: #e2e8f0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: #334155;
}

.emp-verify__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emp-verify__card h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.emp-verify__dl {
  display: grid;
  gap: 10px;
  margin: 0;
  text-align: left;
}

.emp-verify__dl dt {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.emp-verify__dl dd {
  margin: 2px 0 0;
  font-weight: 650;
}

.emp-verify__support {
  text-align: center;
  color: #64748b;
  font-size: 0.92rem;
}

.emp-verify__support a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.emp-verify__email {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.emp-verify__state {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 0;
}
/* Akansho employee ID — landscape card, ISO CR80 (~85.6 × 54 mm) */

.akanso-id-print-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.akanso-id-card {
  --id-green: var(--id-card-accent, #1b7a4e);
  --id-navy: #0f1c2e;
  --id-muted: #64748b;
  width: min(100%, 420px);
  aspect-ratio: 85.6 / 54;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--id-green) 16%, #dbe3ea);
  box-shadow:
    0 10px 28px rgba(15, 28, 46, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  display: flex;
  flex-direction: column;
  break-inside: avoid;
  isolation: isolate;
}

/* ── Silver / brushed header ─────────────────────────────── */
.akanso-id-card__silver {
  flex: 0 0 auto;
  height: 22%;
  min-height: 44px;
  max-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: relative;
  z-index: 2;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.32) 0px,
      rgba(255, 255, 255, 0.32) 1px,
      rgba(0, 0, 0, 0.035) 1px,
      rgba(0, 0, 0, 0.035) 2px
    ),
    linear-gradient(180deg, #f6f7f9 0%, #e2e5ea 48%, #c9ced4 100%);
  border-bottom: 1px solid rgba(15, 28, 46, 0.1);
}

.akanso-id-card__brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.akanso-id-card__logo {
  display: block;
  height: 34px;
  width: 34px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
}

.akanso-id-card__brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.akanso-id-card__wordmark {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  line-height: 1.15;
  color: var(--id-navy);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.akanso-id-card__tag {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  font-weight: 650;
  color: color-mix(in srgb, var(--id-navy) 62%, var(--id-muted));
  text-transform: uppercase;
  line-height: 1.2;
}

.akanso-id-card__chip {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  background: linear-gradient(
    135deg,
    #d4af37 0%,
    #f5e6a3 40%,
    #c9a227 70%,
    #a67c00 100%
  );
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* ── Front body: photo | info | QR ───────────────────────── */
.akanso-id-card__body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 1;
  background: linear-gradient(
    160deg,
    #ffffff 0%,
    color-mix(in srgb, var(--id-green) 4%, #fff) 100%
  );
}

.akanso-id-card__body--front {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 14px;
}

.akanso-id-card__photo-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.akanso-id-card__photo {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 2px solid color-mix(in srgb, var(--id-green) 45%, #fff);
  box-shadow: 0 2px 8px rgba(15, 28, 46, 0.12);
  background: #f1f5f9;
}

.akanso-id-card__photo--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--id-green) 12%, #fff);
  color: var(--id-navy);
  font-weight: 800;
  font-size: 1.6rem;
}

.akanso-id-card__info-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.akanso-id-card__name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--id-navy);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.akanso-id-card__role {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--id-green);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.akanso-id-card__fields {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
}

.akanso-id-card__field {
  min-width: 0;
}

.akanso-id-card__fields dt {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--id-muted);
  margin: 0 0 1px;
  font-weight: 600;
}

.akanso-id-card__fields dd {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--id-navy);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.akanso-id-card__qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  align-self: stretch;
}

.akanso-id-card__qr {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  display: block;
  flex-shrink: 0;
  padding: 4px;
  box-sizing: border-box;
  object-fit: contain;
}

.akanso-id-card__qr--lg {
  width: 96px;
  height: 96px;
  padding: 6px;
}

.akanso-id-card__footer-brand {
  font-weight: 750;
  color: var(--id-green);
  letter-spacing: 0.08em;
  font-size: 0.62rem;
  text-transform: uppercase;
}

/* ── Back body ───────────────────────────────────────────── */
.akanso-id-card__body--back {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.akanso-id-card__back-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.akanso-id-card__back-copy {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  color: #334155;
}

.akanso-id-card__back-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--id-muted);
  font-weight: 600;
}

.akanso-id-card__back-id strong {
  color: var(--id-navy);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 800;
}

.akanso-id-card__back-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.akanso-id-card__authorized {
  margin: 0;
  font-size: 0.55rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--id-green);
  text-align: center;
  white-space: nowrap;
}

/* Preview modal: side-by-side on wide screens */
@media (min-width: 720px) {
  .akanso-id-print-root {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  /*
   * Primary print path uses a dedicated iframe (employeeIdCardExport).
   * Keep a Dialog fallback that preserves CR80 card size.
   */
  .hs-dialog__header,
  .hs-dialog__footer,
  .hs-dialog__close,
  .no-print {
    display: none !important;
  }

  .akanso-id-print-root {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 14mm !important;
  }

  .akanso-id-card {
    width: 85.6mm !important;
    height: 54mm !important;
    min-width: 85.6mm !important;
    min-height: 54mm !important;
    max-width: 85.6mm !important;
    max-height: 54mm !important;
    aspect-ratio: auto !important;
    box-shadow: none !important;
    transform: none !important;
    zoom: 1 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
.emp-portal {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 500px at 10% -10%, #dbeafe 0%, transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: #0f172a;
  padding: 20px 16px 0;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.emp-portal__top {
  max-width: 960px;
  margin: 0 auto 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.emp-portal__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.emp-portal__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.emp-portal__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.emp-portal__brand h1 {
  margin: 2px 0 0;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
}

.emp-portal__signout {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 44px;
  font-weight: 650;
  cursor: pointer;
}

.emp-portal__body {
  max-width: 960px;
  margin: 0 auto;
}

.emp-portal__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 16px;
}

.emp-portal__card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.emp-portal__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.emp-portal__section-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.emp-portal__card-head .emp-portal__section-title {
  margin-bottom: 0;
}

.emp-portal__summary {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.emp-portal__photo {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  background: #e2e8f0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: #334155;
}

.emp-portal__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emp-portal__summary-body h2 {
  margin: 0;
  font-size: 1.25rem;
}

.emp-portal__muted {
  color: #64748b;
  margin: 4px 0 0;
}

.emp-portal__facts,
.emp-portal__dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 14px 0 0;
}

.emp-portal__facts dt,
.emp-portal__dl dt {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.emp-portal__facts dd,
.emp-portal__dl dd {
  margin: 2px 0 0;
  font-weight: 650;
}

.emp-portal__salary {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.emp-portal__link,
.emp-portal__linkbtn {
  color: #1d4ed8;
  font-weight: 650;
  text-decoration: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  min-height: 44px;
}

.emp-portal__docs,
.emp-portal__activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emp-portal__docs li,
.emp-portal__activity li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.emp-portal__docs li > div,
.emp-portal__activity li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.emp-portal__state {
  max-width: 480px;
  margin: 48px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.emp-portal__state--error {
  color: #b91c1c;
}

.emp-portal__quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.emp-portal__quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 88px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 650;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.emp-portal__quick-card .material-symbols-outlined {
  color: #1d4ed8;
  font-size: 1.5rem;
}

.emp-portal__nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e2e8f0;
  backdrop-filter: blur(8px);
}

.emp-portal__nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 4px;
  border-radius: 10px;
  color: #64748b;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 650;
}

.emp-portal__nav-item .material-symbols-outlined {
  font-size: 1.35rem;
}

.emp-portal__nav-item.is-active {
  color: #1d4ed8;
  background: #eff6ff;
}

.emp-portal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.emp-portal__form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 650;
  color: #64748b;
}

.emp-portal__form .text-input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  font: inherit;
  color: #0f172a;
  background: #fff;
}

.emp-portal__form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.emp-portal__primary {
  border: none;
  border-radius: 10px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 700;
  font: inherit;
  padding: 12px 16px;
  min-height: 44px;
  cursor: pointer;
}

.emp-portal__primary--link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 16px;
}

.emp-portal__form-error {
  margin: 0;
  color: #b91c1c;
  font-weight: 650;
}

.emp-portal__ok {
  margin: 0;
  color: #047857;
  font-weight: 650;
}

.emp-portal__req-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emp-portal__req-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.emp-portal__req-item p {
  margin: 8px 0 0;
  color: #334155;
  white-space: pre-wrap;
}

.emp-portal__req-status {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d4ed8;
}

.emp-portal__coming-soon {
  margin: 16px 0 0;
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
}

.emp-portal__link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.emp-portal__link-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  text-decoration: none;
  font-weight: 650;
}

.emp-portal__id-preview {
  overflow-x: auto;
  margin: 12px 0;
}

@media (min-width: 861px) {
  .emp-portal {
    padding-bottom: 40px;
  }

  .emp-portal__nav {
    position: static;
    grid-template-columns: repeat(5, auto);
    justify-content: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
  }

  .emp-portal__nav-item {
    flex-direction: row;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.875rem;
  }

  .emp-portal__body {
    display: flex;
    flex-direction: column;
  }

  .emp-portal__quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .emp-portal {
    padding: 16px 12px 0;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .emp-portal__summary {
    flex-direction: column;
  }

  .emp-portal__facts,
  .emp-portal__dl {
    grid-template-columns: 1fr;
  }
}
/**
 * AdminWeb shared UI — keep typography / spacing consistent product-wide.
 * Tokens: --font-size-* and --space-* from global.css
 *
 * Spacing system (4-px base):
 *   --space-1  4px   — icon gaps, tight inline
 *   --space-2  8px   — label→input, button gaps
 *   --space-3  12px  — helper-text gap, compact field gap
 *   --space-4  16px  — normal field-to-field gap
 *   --space-5  24px  — section separators
 *   --space-6  32px  — modal outer padding (desktop)
 *
 * Ownership rules:
 *   Modal shell    → outer padding (hs-dialog__body: 20px 24px 24px)
 *   .modal-form    → field-to-field gap (16px via flex gap)
 *   .modal-section → section-to-section separation (24px top border)
 *   .form-actions  → button group top border + gap
 *   label          → label→input gap (8px)
 *   .modal-lead    → subtitle under modal title (12px bottom margin)
 */

/* ============================================================
   MODAL / DIALOG SPACING SYSTEM
   Overrides for the sapvt-ltd Dialog component (.hs-dialog__*)
   These are the ONLY place that sets modal shell spacing.

   Architecture:
     .hs-modal-backdrop  — full-screen overlay, centers the modal
     .hs-modal           — shell: flex column, viewport-capped, no overflow
     .hs-dialog__header  — sticky top, never scrolls away
     .hs-dialog__body    — flex:1, min-height:0, overflow-y:auto  ← ONLY scrolling area
     .hs-dialog__footer  — sticky bottom (when used)
     .modal-actions      — when inside the body and is the last item, sticks to bottom
   ============================================================ */

/* ── Backdrop ─────────────────────────────────────────────── */
.hs-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  /* 20px breathing room top & bottom on desktop */
  padding: 20px 16px;
  /* Prevent the backdrop itself from scrolling */
  overflow: hidden;
}

/* Second nested modal (e.g. deactivate confirmation over edit) */
.hs-modal-backdrop + .hs-modal-backdrop,
.hs-modal-backdrop ~ .hs-modal-backdrop {
  z-index: 1100;
}

/* Lock the background page when any modal is open — prevents double scroll.
   padding-right compensates for the scrollbar width disappearing so the
   fixed sidebar + main content don't jump left when the modal opens. */
body:has(.hs-modal-backdrop) {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px);
}

/* Measure scrollbar width once at root level (JS sets it; CSS fallback = 0) */
:root {
  --scrollbar-width: 0px;
}

/* ── Modal shell ──────────────────────────────────────────── */
.hs-modal {
  /* Width: never wider than 480px, never wider than viewport − 32px */
  width: min(calc(100vw - 32px), 480px);
  /* Height: use all available viewport minus backdrop padding (2×20px) */
  max-height: calc(100dvh - 40px);
  display: block;
  /* Shell itself must NOT scroll — each zone handles its own overflow */
  overflow: hidden;
  background: var(--color-surface, #fff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

/*
 * .hs-dialog is the DIRECT child of .hs-modal injected by the Dialog component.
 * It must stretch to fill .hs-modal completely and itself be a flex column
 * so that .hs-dialog__body can shrink and scroll.
 * Without this, the flex: 1 1 0 on .hs-dialog__body has nothing to constrain
 * its parent height and overflow-y:auto never activates.
 */
.hs-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: inherit;
  overflow: hidden;
  /* Inherit border-radius from the modal shell */
  border-radius: inherit;
}

/* ── Header — sticky, never scrolls away ─────────────────── */
.hs-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--color-border);
  /* Prevent header from shrinking */
  flex-shrink: 0;
  /* Stack above scrolled body content */
  position: relative;
  z-index: 1;
  /* Ensure background covers scrolled content that slides under it */
  background: var(--color-surface, #fff);
  border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
}

.hs-dialog__title {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

.hs-dialog__close {
  flex-shrink: 0;
  min-width: 32px;
  min-height: 32px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
}

.hs-dialog__close:hover {
  background: var(--color-bg);
}

/* ── Body — the ONE scrolling region ─────────────────────── */
.hs-dialog__body {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  overflow-x: hidden;
  /* Smooth momentum scroll on iOS */
  -webkit-overflow-scrolling: touch;
  /* Content layout */
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4); /* 16px between every direct child */
}

/* ── Footer (when used as a separate element) ────────────── */
.hs-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-surface, #fff);
  border-radius: 0 0 var(--radius-lg, 12px) var(--radius-lg, 12px);
}

/* ── Modal lead — subtitle line under title ───────────────── */
.modal-lead {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
}

/* ── Modal form — field stack ─────────────────────────────── */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4); /* 16px between fields */
}

/* Two-column field row inside a modal */
.modal-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--space-4);
}

/* ── Modal section — account-access / partner-link etc. ───── */
/* Visual section break: top border + 24px padding above content */
.modal-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3); /* 12px between items inside the section */
  padding-top: var(--space-5); /* 24px */
  border-top: 1px solid var(--color-border);
  margin-top: calc(var(--space-5) - var(--space-4)); /* net 24px separation */
}

.modal-section__title {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text);
}

.modal-section__meta {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
}

/* ── Modal actions — button group ─────────────────────────── */
/*
 * Base style: non-sticky button group used mid-modal (e.g. Account Access
 * action buttons inside a section). Has a light top margin only.
 */
.modal-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

/*
 * When .modal-actions is the LAST direct child of .hs-dialog__body,
 * promote it to a sticky footer so Save/Cancel are always reachable.
 *
 * :last-child matches when it is the final element in the body,
 * regardless of preceding siblings.
 *
 * The negative margin trick extends the separator border edge-to-edge
 * across the body's padding area without extra whitespace.
 */
.hs-dialog__body > .modal-actions:last-child {
  margin-top: auto;
  position: sticky;
  bottom: -24px; /* offsets the body's 24px padding-bottom */
  z-index: 2;
  background: var(--color-surface, #fff);
  /* Wall-to-wall top separator */
  margin-left: -24px;
  margin-right: -24px;
  padding: var(--space-4) 24px 0;
  border-top: 1px solid var(--color-border);
}

/* ── Textarea in modals ───────────────────────────────────── */
.hs-dialog__body textarea,
.modal textarea {
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  min-height: 6rem;
  width: 100%;
  resize: vertical;
  background: var(--neutral-white);
  color: var(--color-text);
  line-height: var(--line-height-body);
  font-family: inherit;
}

.hs-dialog__body textarea:focus,
.modal textarea:focus {
  outline: 2px solid var(--primary-color-opacity-35);
  outline-offset: 1px;
}

/* ── Label spacing in modals ─────────────────────────────── */
.hs-dialog__body label {
  display: flex;
  flex-direction: column;
  gap: var(--space-2); /* 8px label→input */
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* ── Tablet: reduce width cap ────────────────────────────── */
@media (max-width: 640px) {
  .hs-modal-backdrop {
    padding: 12px;
    align-items: flex-end; /* sheet slides up from bottom on small screens */
  }

  .hs-modal {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
  }

  .hs-dialog__header {
    padding: 16px 16px 12px;
    border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
  }

  .hs-dialog__body {
    padding: 16px 16px 20px;
    gap: var(--space-3);
    max-height: calc(100dvh - 116px);
  }

  .modal-form-row {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions .btn,
  .modal-actions .hs-btn {
    width: 100%;
    justify-content: center;
  }

  /* Sticky last-child footer adjusts for smaller body padding on mobile */
  .hs-dialog__body > .modal-actions:last-child {
    bottom: -20px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ── Fallback for browsers without dvh (Safari <15.4) ──────── */
@supports not (height: 100dvh) {
  .hs-modal {
    max-height: calc(100vh - 40px);
  }

  @media (max-width: 640px) {
    .hs-modal {
      max-height: calc(100vh - 24px);
    }

    .hs-dialog__body {
      max-height: calc(100vh - 116px);
    }
  }
}

/* ============================================================
   END MODAL SYSTEM
   ============================================================ */

.admin-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.page-header {
  margin: 0;
}

.page-header h1 {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-lg);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.page-header p {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
  max-width: 40rem;
}

.panel {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: clip;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.panel + .panel {
  margin-top: 0;
}

.table-scroll {
  /* Prefer horizontal scroll over crushing columns on narrow screens */
  overflow-x: auto;
  overflow-y: auto;
  max-height: min(70vh, 40rem);
  min-height: 0;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th,
.table td {
  text-align: left;
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-body);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table th {
  font-size: var(--font-size-md);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 1;
}

.table th:first-child,
.table td:first-child {
  padding-left: var(--space-4);
}

.table th:last-child,
.table td:last-child {
  padding-right: var(--space-4);
}

.table .actions,
.table td:last-child .btn,
.table td:last-child .btn-ghost {
  white-space: nowrap;
}

.table .table-secondary,
.table td .muted,
.table td .btn,
.table td code + .btn,
.table td .btn-ghost {
  font-size: var(--font-size-xs);
}

.table tr:last-child td {
  border-bottom: none;
}

/* VirtualTable — fit wide data; scroll horizontally instead of crushing columns */
.hs-vtable {
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.hs-vtable__scroll {
  max-height: min(70vh, 40rem);
  border-color: var(--color-border);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: auto;
  width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.panel .hs-vtable__scroll {
  overflow-x: auto !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.hs-vtable__table {
  width: 100%;
  max-width: none;
  min-width: 56rem;
  table-layout: fixed;
}

.hs-vtable__table th,
.hs-vtable__table td {
  padding: var(--space-3);
  font-size: var(--font-size-sm);
  border-bottom-color: var(--color-border);
  overflow-wrap: break-word;
  word-break: normal;
}

.hs-vtable__table th {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  z-index: 2;
  white-space: nowrap;
  vertical-align: middle;
}

.hs-vtable__table td {
  vertical-align: top;
}

.hs-vtable__th-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.hs-vtable__table th.hs-vtable__th--filter-open {
  z-index: 30;
}

.hs-vtable__search-panel {
  z-index: 1000;
  background: var(--color-surface);
}

.hs-vtable__table th:first-child,
.hs-vtable__table td:first-child {
  padding-left: var(--space-4);
}

.hs-vtable__table th:last-child,
.hs-vtable__table td:last-child {
  padding-right: var(--space-4);
  position: sticky;
  right: 0;
  z-index: 4;
  background: var(--color-card);
  box-shadow: -6px 0 8px -6px rgba(0, 0, 0, 0.12);
}

.hs-vtable__table th:last-child {
  z-index: 5;
  background: var(--color-bg);
}

.hs-vtable__table .cell-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-height: var(--line-height-body);
}

.hs-vtable__meta,
.hs-vtable__footer {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  padding: 0 var(--space-1);
}

.hs-select-wrap,
.hs-field-label {
  font-size: var(--font-size-sm);
}

.hs-field-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* Do not put padding on .hs-select — it is an Ant Design root and pads itself */
.hs-select.ant-select,
.hs-multiselect.ant-select {
  width: 100%;
  max-width: 100%;
}

.hs-vtable__table .hs-select,
.hs-vtable__table .hs-select-wrap,
.hs-vtable__table .hs-multiselect,
.table .hs-select,
.table .hs-select-wrap {
  max-width: 100%;
  min-width: 0;
}

.hs-banner {
  margin-bottom: 0;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
}

.hs-banner__title {
  font-size: var(--font-size-md);
}

.hs-banner__detail {
  font-size: var(--font-size-sm);
}

.muted {
  color: var(--color-text-secondary);
  padding: 0;
  font-size: var(--font-size-sm);
  margin: 0;
}

.table .muted,
.table-scroll .muted {
  padding: 0;
}

.error-text {
  color: var(--color-error);
  padding: 0;
  margin: 0;
  font-size: var(--font-size-sm);
}

.success-text {
  color: var(--color-success);
  padding: var(--space-1) 0;
  margin: 0;
  font-size: var(--font-size-sm);
}

.success-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--color-success-opacity-12);
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-success) 40%, transparent);
  border-left: 4px solid var(--color-success);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin: 0;
  font-size: var(--font-size-sm);
}

.success-banner-body {
  min-width: 0;
  flex: 1;
}

.success-banner-title {
  display: block;
  color: var(--color-success);
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.success-banner-detail {
  margin: 0;
  color: var(--color-text-secondary);
  font-weight: 500;
  line-height: var(--line-height-body);
  font-size: var(--font-size-sm);
}

.success-banner-pin {
  margin: var(--space-2) 0 0;
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.success-banner-pin code {
  font-size: var(--font-size-md);
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--color-success);
}

.success-banner .btn {
  flex-shrink: 0;
}

.modal .error-text,
.hs-dialog .error-text,
.hs-modal .error-text {
  padding: var(--space-1) 0;
  margin: 0;
}

.password-field {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}

.password-field input {
  flex: 1;
  min-width: 0;
}

.actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}

.actions.stack-gap {
  margin-bottom: var(--space-4);
}

.btn,
a.btn,
a.hs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  min-height: var(--control-height);
  font-weight: 600;
  font-size: var(--font-size-sm);
  cursor: pointer;
  pointer-events: auto;
  text-decoration: none;
  line-height: var(--line-height-tight);
}

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

.btn-primary {
  background: var(--primary-color);
  color: var(--neutral-white);
}

.btn-primary:hover {
  background: var(--primary-color-2);
}

.btn-danger {
  background: transparent;
  color: var(--warning-red);
  border: 1px solid var(--warning-red);
}

.btn-danger:hover {
  background: var(--color-error-opacity-08);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-color-2);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--primary-color-opacity-05);
}

.table .btn,
.table .btn-ghost,
.hs-vtable__table .btn,
.hs-vtable__table .btn-ghost,
.hs-vtable__table .hs-btn {
  min-height: auto;
  padding: var(--space-1) var(--space-2);
  font-size: var(--font-size-xs);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--color-bg);
  color: var(--color-text-secondary);
}

.badge-pending {
  background: var(--color-warning-opacity-12);
  color: var(--color-warning);
}

.badge-approved {
  background: var(--color-success-opacity-12);
  color: var(--color-success);
}

.badge-rejected {
  background: var(--color-error-opacity-12);
  color: var(--color-error);
}

.pin-reveal-cell {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-4);
  margin: 0;
}

.stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}

.stat-card.interactive {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}

.stat-card.interactive:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.stat-card--active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color-opacity-20);
  background: var(--primary-color-opacity-05);
}

.overview-detail {
  margin-top: 0;
}

.overview-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
  align-items: start;
}

.overview-panels--charts {
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
}

.overview-detail--chart {
  min-width: 0;
}

@media (min-width: 70rem) {
  .overview-panels--charts {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .overview-panels--charts > .overview-detail:not(.overview-detail--chart):not(.overview-detail--trend) {
    grid-column: span 2;
  }

  .overview-detail--chart {
    grid-column: span 3;
  }

  .overview-detail--trend {
    grid-column: 1 / -1;
  }
}

.overview-trend-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

.overview-segmented {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
}

.overview-segmented__btn {
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  line-height: 1.2;
}

.overview-segmented__btn + .overview-segmented__btn {
  border-left: 1px solid var(--color-border);
}

.overview-segmented__btn.is-active {
  background: var(--primary-color);
  color: #fff;
}

.overview-trend {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.overview-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
}

.overview-trend-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.overview-trend-legend-item strong {
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.overview-trend-svg-wrap {
  width: 100%;
  overflow-x: auto;
}

.overview-trend-svg {
  width: 100%;
  min-width: 28rem;
  height: auto;
  display: block;
}

.overview-trend-grid {
  stroke: var(--color-border);
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.overview-trend-ytick,
.overview-trend-xtick {
  fill: var(--color-text-secondary);
  font-size: 10px;
  font-family: var(--font-sans, inherit);
}

.overview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.overview-toolbar-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 600;
}

.overview-state-select {
  min-width: 14rem;
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-card);
  color: var(--color-text);
  font: inherit;
}

.overview-chart-empty {
  margin: var(--space-4) 0 0;
}

.overview-vchart {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.overview-vchart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.overview-vchart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.overview-vchart-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2);
  align-items: stretch;
  min-width: 0;
}

.overview-vchart-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: 12.5rem;
  margin-bottom: 2.35rem;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  line-height: 1;
}

.overview-vchart-ytick {
  white-space: nowrap;
}

.overview-vchart-plot {
  position: relative;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.overview-vchart-grid {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 12.5rem;
  pointer-events: none;
}

.overview-vchart-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--color-border);
  opacity: 0.7;
}

.overview-vchart-groups {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  min-height: 12.5rem;
  padding: 0 0.25rem;
  width: max-content;
  min-width: 100%;
}

.overview-vchart-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1 0 auto;
  min-width: 3.5rem;
}

.overview-vchart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.3rem;
  height: 12.5rem;
  width: 100%;
}

.overview-vchart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  height: 100%;
  width: 1.1rem;
}

.overview-vchart-value {
  font-size: 0.65rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  line-height: 1;
  min-height: 0.7rem;
}

.overview-vchart-bar-track {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--color-bg);
  overflow: hidden;
}

.overview-vchart-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  min-height: 0;
  transition: height 0.35s ease;
}

.overview-vchart-xlabel {
  max-width: 5.5rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.overview-status-vchart {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  min-height: 11rem;
  padding-top: var(--space-2);
  overflow-x: auto;
}

.overview-status-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 0;
  min-width: 3.25rem;
}

.overview-status-value {
  font-size: var(--font-size-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  line-height: 1;
}

.overview-status-bar-track {
  width: 1.35rem;
  height: 7.5rem;
  border-radius: 4px 4px 0 0;
  background: var(--color-bg);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.overview-status-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.35s ease;
}

.overview-status-label {
  font-size: 0.68rem;
  text-align: center;
  color: var(--color-text-secondary);
  line-height: 1.2;
  max-width: 4.5rem;
}

.overview-pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}

.overview-pie-chart {
  flex: 0 0 auto;
  margin: 0 auto;
}

.overview-pie-total {
  fill: var(--color-text);
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-sans, inherit);
}

.overview-pie-caption {
  fill: var(--color-text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-sans, inherit);
}

.overview-pie-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 10rem;
  flex: 1 1 10rem;
}

.overview-pie-legend li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: var(--space-2);
  align-items: center;
}

.overview-pie-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.overview-pie-legend-label {
  color: var(--color-text);
}

.overview-pie-legend strong {
  font-variant-numeric: tabular-nums;
}

.overview-detail-lead {
  margin: 0 0 var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-body);
}

.overview-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.overview-bar-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.overview-bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.overview-bar-meta strong {
  font-size: var(--font-size-md);
  font-variant-numeric: tabular-nums;
}

.overview-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--color-bg);
  overflow: hidden;
}

.overview-bar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 0;
  transition: width 0.35s ease;
}

.overview-bar-fill--pending {
  background: var(--color-warning);
}

.overview-bar-fill--approved {
  background: var(--color-success);
}

.overview-bar-fill--rejected {
  background: var(--color-error);
}

.stat-card span {
  display: block;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-1);
}

.stat-card strong {
  font-size: var(--font-size-xl);
  letter-spacing: -0.02em;
  line-height: var(--line-height-tight);
}

.row-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
  flex-wrap: wrap;
}

.row-header > div:first-child {
  min-width: 0;
  flex: 1 1 12rem;
}

.row-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  flex: 0 1 auto;
  margin-left: auto;
}

.breadcrumb {
  margin: 0 0 var(--space-1);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  align-items: flex-end;
  justify-content: flex-start;
}

.filter-row .filter-inline {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.filter-row .filter-inline input {
  min-width: 10rem;
  max-width: 12rem;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-row .filter-row-spacer {
  margin-left: auto;
}

.filter-row .hs-select-wrap {
  margin: 0;
  min-width: 14rem;
  max-width: 22rem;
}

.form-panel {
  padding: var(--space-4);
}

.panel.form-panel {
  /* Let package Select/MultiSelect dropdowns paint and scroll outside the card */
  overflow: visible;
}

.panel.panel--dropdown-safe {
  overflow: visible;
}

.panel.panel--dropdown-safe .hs-vtable__scroll {
  overflow: auto;
}

.category-section-cell {
  min-width: 14rem;
  max-width: 18rem;
}

.category-section-cell .hs-dd__panel {
  z-index: 50;
}

.category-section-cell .hs-dd__list {
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.category-inline-input {
  display: block;
  width: 100%;
  min-width: 6rem;
  font: inherit;
  font-size: var(--font-size-sm);
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 6px);
  background: var(--color-card);
  color: var(--color-text);
}

.category-inline-input:focus {
  outline: 2px solid color-mix(in srgb, var(--color-primary) 45%, transparent);
  outline-offset: 1px;
}

.category-search-terms-cell {
  display: block;
  width: 100%;
  min-width: 14rem;
  max-width: 20rem;
  min-height: 2.75rem;
  resize: vertical;
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 400;
  line-height: 1.35;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 6px);
  background: var(--color-card);
  color: var(--color-text);
}

.category-search-terms-cell:focus {
  outline: 2px solid color-mix(in srgb, var(--color-primary) 45%, transparent);
  outline-offset: 1px;
}

.category-search-terms-cell:disabled {
  opacity: 0.65;
}

.category-discovery {
  margin: var(--space-2) 0 var(--space-5);
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.category-discovery > h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text);
}

.category-discovery > .muted {
  margin: 0 0 var(--space-3);
}

/* Ensure section Select list can scroll inside the anchored panel */
.category-discovery .hs-dd__panel {
  overflow: hidden;
}

.category-discovery .hs-dd__list {
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.form-row label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.form-row input,
.form-row select,
.form-row textarea,
.modal label input,
.modal label select,
.modal label textarea,
.hs-dialog label input,
.hs-dialog label select,
.hs-dialog label textarea,
.hs-modal label input,
.hs-modal label select,
.hs-modal label textarea,
.field input {
  font-weight: 400;
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  min-height: var(--control-height);
  background: var(--neutral-white);
  color: var(--color-text);
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: var(--space-2) !important;
  margin-top: var(--space-5);
}

.form-actions {
  /* In modals: parent gap (16px) + padding-top (12px) = ~28px section break */
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}

/* Stand-alone page form (outside a modal): restore top margin */
.form-panel > .form-actions {
  margin-top: var(--space-4);
}

.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: var(--space-2);
  vertical-align: middle;
}

.client-logo-thumb {
  display: inline-block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  margin-right: var(--space-2);
  vertical-align: middle;
  background: #fff;
  border: 1px solid var(--color-border, #e2e8f0);
}

.client-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 16px;
  flex-wrap: wrap;
}

.client-logo-preview {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--color-border, #e2e8f0);
  background: #fff;
}

.client-logo-upload {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.modal-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-title-block p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text-secondary);
}

.theme-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.theme-preset-control {
  min-width: 220px;
}

.theme-preset-control span {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.theme-preset-control select {
  width: 100%;
}

.theme-section-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.theme-color-section {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px;
  background: color-mix(in srgb, var(--color-surface) 96%, var(--color-background));
}

.theme-color-section__head {
  margin-bottom: 12px;
}

.theme-color-section__head h5 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.theme-color-section__head p {
  margin: 0;
}

.theme-colors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.theme-color-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-color-field > span {
  font-weight: 600;
}

.color-input-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.color-input-row input[type='color'] {
  width: 64px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: transparent;
}

.assignment-summary,
.assignment-job-context {
  display: grid;
  gap: 12px;
}

.assignment-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.assignment-job-context {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.assignment-job-context > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.assignment-candidate-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  margin-top: 12px;
}

.assignment-candidate-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  background: var(--color-surface);
}

.assignment-candidate-card.is-ineligible {
  opacity: 0.72;
}

.assignment-candidate-card.is-current {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

.assignment-candidate-main,
.assignment-candidate-actions {
  min-width: 0;
}

.assignment-candidate-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .theme-section-heading,
  .assignment-summary,
  .assignment-job-context,
  .assignment-candidate-card {
    grid-template-columns: 1fr;
  }

  .theme-section-heading {
    display: grid;
  }

  .theme-colors-grid {
    grid-template-columns: 1fr;
  }

  .assignment-candidate-actions .btn,
  .assignment-candidate-actions .hs-btn {
    width: 100%;
    justify-content: center;
  }
}

.hs-toggle {
  position: relative;
  width: 2.5rem;
  height: 1.35rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--color-border);
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s ease;
}

.hs-toggle.is-on {
  background: var(--primary-color);
}

.hs-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hs-toggle-thumb {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: var(--neutral-white);
  box-shadow: var(--shadow-sm, 0 1px 2px rgb(0 0 0 / 0.12));
  transition: transform 0.15s ease;
}

.hs-toggle.is-on .hs-toggle-thumb {
  transform: translateX(1.15rem);
}

.questionnaire {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.questionnaire h3,
.questionnaire h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-md);
  font-weight: 600;
}

.question-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.question-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--color-bg-opacity-60);
  font-size: var(--font-size-sm);
}

.add-question {
  background: var(--neutral-white);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-sidebar-opacity-45);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: var(--space-4);
  pointer-events: auto;
}

.modal {
  width: min(calc(100vw - 32px), 32rem);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-shrink: 0;
  z-index: 2;
  background: var(--color-card);
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--color-border);
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4); /* 16px between fields */
  padding: 20px 24px 24px;
}

.modal h3 {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

.modal-close {
  min-width: 32px;
  min-height: 32px;
  padding: var(--space-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  border: none;
  flex-shrink: 0;
}

.modal-close .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: 300;
  font-size: 20px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: var(--primary-color-opacity-05);
}

.inline-select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  min-height: var(--control-height);
  background: var(--neutral-white);
  cursor: pointer;
  font-size: var(--font-size-sm);
}

.inline-select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.doc-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.interactive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.partner-service-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.partner-service-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.partner-service-availability {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}

.partner-service-availability-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-align: right;
  max-width: 8rem;
  line-height: 1.35;
}

.service-availability-toggle {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  border: none;
  padding: 3px;
  flex-shrink: 0;
  background: #cbd5e0;
  cursor: pointer;
  transition: background 0.15s ease;
}

.service-availability-toggle.is-on {
  background: var(--color-primary, #2563eb);
}

.service-availability-toggle.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.service-availability-toggle-knob {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

.service-availability-toggle.is-on .service-availability-toggle-knob {
  transform: translateX(22px);
}

.partner-service-row:last-child {
  border-bottom: none;
}

.service-review-docs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.service-review-docs li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

.muted.compact {
  padding: var(--space-1) 0 0;
  margin: 0;
  font-size: var(--font-size-xs);
}

.detail-list {
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.detail-list div {
  display: grid;
  gap: var(--space-1);
}

.detail-list dt {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-secondary);
}

.detail-list dd {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.table-problem {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 16rem;
  line-height: var(--line-height-body);
}

.table-assign-cell {
  min-width: 12rem;
  max-width: 16rem;
}

.table-assign-cell .hs-select-wrap,
.table-actions-stack .hs-select-wrap,
.table-actions-row .hs-select-wrap {
  margin: 0;
  min-width: 8rem;
  max-width: 11rem;
  flex: 0 1 auto;
}

.table-actions-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  min-width: 16rem;
}

.table-actions-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
}

.table-actions-stack .btn,
.table-actions-row .btn,
.table-actions-stack .hs-btn,
.table-actions-row .hs-btn {
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.table-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.assign-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-opacity-60, transparent);
}

.modal--wide {
  width: min(calc(100vw - 32px), 36rem);
  /* Inherit the global viewport-relative max-height from .hs-modal */
}

.detail-list--grid {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.detail-list--grid .detail-span-2 {
  grid-column: 1 / -1;
}

.modal-section-title {
  margin: 0;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.detail-list dt {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.table-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}

.pin-cell {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2rem;
  height: 2rem;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: middle;
}

.pin-cell-value {
  display: inline-flex;
  align-items: center;
  min-width: 3.5rem;
  max-width: 4.75rem;
  height: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: var(--font-size-sm);
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-secondary);
}

.pin-cell-value code {
  font: inherit;
  color: var(--color-text);
  letter-spacing: 0.04em;
}

.pin-cell-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
  margin-left: var(--space-1);
}

.party-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.25;
}

.party-cell-primary {
  font-weight: 600;
}

.party-cell-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-phone-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
}

.jobs-geo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-end;
  margin-top: var(--space-3);
}

.jobs-geo-filters label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  min-width: 12rem;
}

.btn.icon-only,
.hs-btn.icon-only,
a.hs-btn.icon-only {
  padding: var(--space-1);
  min-width: 2rem;
  height: 2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-edit-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: nowrap;
}

.status-edit-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: 8rem;
  padding: var(--space-1);
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-edit-option {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  color: var(--color-text);
}

.status-edit-option:hover,
.status-edit-option.is-active {
  background: var(--color-surface-muted, #f5f5f5);
  color: var(--color-primary);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.detail-header-left {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  min-width: 0;
}

.detail-back {
  margin-top: 0.35rem;
}

.detail-save {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.detail-close {
  flex-shrink: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pin-create-fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin: var(--space-3) 0;
}

.pin-create-fieldset legend {
  padding: 0 var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.pin-create-check {
  margin: 0 0 var(--space-2);
}

.phone-input-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.phone-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-2);
  border: 1px solid var(--color-border);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--color-surface-muted, #f5f5f5);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.phone-input-row input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  flex: 1;
}

.password-generate-row {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}

.password-generate-row input {
  flex: 1;
  min-width: 0;
}

.password-generate-row .btn,
.password-generate-row .hs-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  margin-left: var(--space-3);
}

.phone-verify-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.phone-verify-cell.is-switch {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.phone-number-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.phone-number-text {
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.btn.icon-only.copy-feedback-ok,
.hs-btn.icon-only.copy-feedback-ok {
  color: var(--color-success, #1b7f3a);
}

.btn.icon-only.copy-feedback-ok:hover:not(:disabled),
.hs-btn.icon-only.copy-feedback-ok:hover:not(:disabled) {
  color: var(--color-success, #1b7f3a);
}

.phone-verified-toggle {
  margin-left: 0;
  font-size: 11px;
}

.table-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
}

.admin-action-row {
  max-width: 22rem;
}

.permissions-fieldset {
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius, 8px);
  padding: var(--space-3);
  margin: var(--space-3) 0;
}

.permissions-fieldset legend {
  padding: 0 var(--space-1);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.permission-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm, 0.875rem);
  margin: 0;
}


.permissions-matrix {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.9rem;
}
.permissions-matrix th,
.permissions-matrix td {
  border: 1px solid var(--border, #e2e8f0);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}
.permissions-matrix thead th {
  background: var(--surface-2, #f8fafc);
  font-weight: 700;
}
.permissions-matrix tbody th {
  font-weight: 600;
}
.permissions-matrix td {
  text-align: center;
  width: 5.5rem;
}
.permissions-matrix input[type='checkbox'] {
  width: 18px;
  height: 18px;
}

.permissions-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  max-height: 14rem;
  overflow: auto;
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius, 8px);
}

.admin-profile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-3);
}

.admin-profile-meta dt {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-secondary, #718096);
}

.admin-profile-meta dd {
  margin: 0;
  font-weight: 600;
}

.wrap-actions {
  flex-wrap: wrap;
}

.invite-link-field input {
  width: 100%;
  min-width: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: var(--font-size-xs);
}

.invite-qr-panel {
  display: flex;
  justify-content: center;
  padding: var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius);
}

.invite-qr-panel img {
  display: block;
  width: 180px;
  height: 180px;
  background: var(--neutral-white);
  border-radius: var(--radius);
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.invite-actions-secondary {
  margin-top: var(--space-1);
}

.feedback-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feedback-job-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--space-2);
}

.shared-by-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.job-party {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.job-party-name {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.job-party-address {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  line-height: var(--line-height-body);
}

.job-party-address .material-symbols-outlined {
  margin-top: 2px;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.job-party-label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 2px;
}

.job-comments {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.job-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 14rem;
  overflow: auto;
}

.job-comment {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-opacity-60, var(--neutral-white));
  border-left: 3px solid var(--color-border);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.job-comment--customer {
  border-left-color: var(--primary-color, #2563eb);
}

.job-comment--provider {
  border-left-color: var(--color-success, #16a34a);
}

.job-comment--admin {
  border-left-color: var(--color-warning, #ca8a04);
}

.job-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin-bottom: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.job-comment-role {
  font-weight: 600;
  color: var(--color-text);
}

.job-comment-author {
  color: var(--color-text-secondary);
}

.job-comment-time {
  margin-left: auto;
}

.job-comment-text {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  line-height: var(--line-height-body);
  white-space: pre-wrap;
}

.actions .btn,
.actions .hs-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}


@media (max-width: 860px) {
  .hs-vtable__table {
    min-width: 48rem;
  }

  .hs-vtable__table th,
  .hs-vtable__table td {
    padding: var(--space-2) var(--space-3);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row > label,
  .form-row > .hs-select-wrap {
    width: 100%;
  }

  .row-header-actions {
    width: 100%;
  }

  .modal {
    width: min(100%, 28rem);
  }

  .modal-body {
    padding: 16px 16px 20px;
    gap: var(--space-3);
  }

  .modal-header {
    padding: 16px 16px 12px;
  }
}

@media (max-width: 520px) {
  .detail-list--grid {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: var(--font-size-md);
  }

  .hs-vtable__footer {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .row-header-actions .btn,
  .row-header-actions .hs-btn {
    flex: 1 1 auto;
  }
}

.modal label,
.hs-dialog label,
.hs-modal label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.doc-list {
  margin: 0;
  padding-left: var(--space-5);
  line-height: var(--line-height-body);
  font-size: var(--font-size-sm);
}

.panel form-panel h3,
.panel > h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text);
}

.panel.form-panel > p {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-sm);
}

.panel-spaced {
  margin-bottom: var(--space-4);
}

.panel-spaced-top {
  margin-top: var(--space-4);
}

.pin-display {
  font-size: var(--font-size-md);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.modal.modal-wide {
  max-width: min(52rem, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
}

.theme-colors-fieldset {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.theme-colors-fieldset legend {
  padding: 0 var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
}

.theme-colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: var(--space-3);
}

.theme-color-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.color-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.color-input-row input[type='color'] {
  width: 2.25rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.color-input-row input[type='text'] {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
}

.contact-privacy-panel,
.policy-card {
  max-width: 40rem;
  padding: var(--space-4);
  gap: var(--space-4);
}

.contact-privacy-panel-head h2,
.policy-card-head h2 {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-md);
}

.contact-privacy-loading,
.contact-privacy-actions {
  margin-top: var(--space-2);
}

.contact-privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.policy-radios {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  border: 0;
}

.policy-radio {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  cursor: pointer;
}

.policy-radio input {
  margin-top: 0.35rem;
}

.role-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.2rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  text-decoration: none;
  line-height: 1.4;
}

.role-badge--partner {
  color: var(--color-text);
}

.name-with-roles {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.provider-services-cell {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.provider-services-cell li {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.account-access-block {
  /* Handled by .modal-section now — keep for backward compat on non-modal uses */
  margin: 0;
  padding: var(--space-5) 0 0;
  border: 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.account-access-block legend {
  font-size: var(--font-size-sm);
  font-weight: 700;
  padding: 0;
  float: left;
  width: 100%;
  margin-bottom: var(--space-3);
}

.also-registered {
  margin-top: var(--space-2);
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.section-header-row h3 {
  margin: 0;
}

.add-service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.add-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.add-service-row span {
  display: flex;
  flex-direction: column;
}

.geo-service-breakdown {
  display: block;
  margin-top: 0.15rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}



.feedback-detail__message {
  margin: 0 0 12px;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}

.feedback-detail .admin-textarea,
.admin-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
  resize: vertical;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

button.linkish {
  border: none;
  background: none;
  padding: 0;
  color: var(--primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.creatable-lookup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.creatable-lookup__input {
  width: 100%;
}
.emp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3, 12px);
  margin-bottom: var(--space-5, 24px);
}

.emp-stat {
  background: var(--surface-elevated, #fff);
  border: 1px solid var(--border-color, #e9ecef);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.emp-stat__label {
  font-size: var(--font-size-sm, 0.8125rem);
  color: var(--text-muted, #868e96);
}

.emp-stat__value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary, #212529);
}

.emp-filters {
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3, 12px);
  margin-bottom: var(--space-4, 16px);
}

.emp-search {
  flex: 1 1 220px;
  min-width: 0;
}

.emp-search .text-input {
  width: 100%;
}

.emp-cell-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.emp-cell-person__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.emp-name-link {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.emp-name-link:hover {
  color: var(--primary-color, #3182ce);
  text-decoration: underline;
}

.emp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid color-mix(in srgb, var(--color-success, #2f9e44) 35%, white);
}

.emp-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color-opacity-10, #ebf5ff);
  color: var(--primary-color-2, #2c5282);
  font-weight: 700;
  font-size: 0.95rem;
}

.block-muted {
  display: block;
  font-size: 0.75rem;
}

.emp-id-hint {
  margin: 0;
  font-size: 0.8125rem;
}

.emp-mobile-list {
  display: none;
}

.emp-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emp-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-color, #e9ecef);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emp-card__top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.emp-card__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.emp-card__bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted, #868e96);
  font-size: 0.875rem;
}

.emp-card__cta {
  font-weight: 600;
  color: var(--primary-color, #3182ce);
  font-size: 0.875rem;
}

.emp-empty {
  padding: 32px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field-error {
  display: block;
  color: var(--color-error, #e03131);
  font-size: 0.8125rem;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .emp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emp-desktop-table {
    display: none;
  }

  .emp-mobile-list {
    display: block;
  }
}

.emp-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-4, 16px);
}

.emp-page-tab {
  appearance: none;
  border: 1px solid var(--border-color, #e9ecef);
  background: var(--surface-elevated, #fff);
  color: var(--text-primary, #212529);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

.emp-page-tab.is-selected {
  background: var(--primary-color, #3182ce);
  border-color: var(--primary-color, #3182ce);
  color: #fff;
}

.emp-lookup-panel {
  padding: 16px;
}

.emp-lookup-panel__title {
  margin: 0 0 4px;
  font-size: 1.125rem;
}

.emp-lookup-panel__lead {
  margin: 0 0 16px;
  font-size: 0.875rem;
}

.emp-lookup-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

.emp-lookup-add .text-input {
  flex: 1 1 220px;
  min-width: 0;
}

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

.emp-lookup-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #e9ecef);
  border-radius: 10px;
  background: var(--surface, #f8f9fa);
}

.emp-lookup-list__label {
  font-weight: 600;
  min-width: 0;
  word-break: break-word;
}
/* sapvt-ltd-web-packages — base styles (import via `sapvt-ltd-web-packages/styles.css`) */

/*
 * Density / spacing scale (4px base)
 * Apps may override these on :root; package controls read them.
 */
:root {
  --hs-space-1: 4px;
  --hs-space-2: 8px;
  --hs-space-3: 12px;
  --hs-space-4: 16px;
  --hs-space-5: 24px;
  --hs-space-6: 32px;

  --hs-control-h: 36px;
  --hs-control-h-lg: 44px;
  --hs-control-px: 12px;
  --hs-control-py: 6px;
  --hs-field-gap: var(--hs-space-2);
  --hs-label-gap: var(--hs-space-1);
  --hs-section-gap: var(--hs-space-3);
  --hs-radius-sm: 8px;
  --hs-radius: 10px;
}

html.hs-overlay-open,
html.hs-overlay-open body {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.hs-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  margin-bottom: 12px;
}

.hs-banner--success {
  background: color-mix(in srgb, var(--hs-success, #38a169) 12%, var(--hs-surface, #ffffff));
  border-color: color-mix(in srgb, var(--hs-success, #38a169) 35%, var(--hs-surface, #ffffff));
  color: var(--hs-text, #1a202c);
}

.hs-banner--error {
  background: color-mix(in srgb, var(--hs-error, #e53e3e) 12%, var(--hs-surface, #ffffff));
  border-color: color-mix(in srgb, var(--hs-error, #e53e3e) 35%, var(--hs-surface, #ffffff));
}

.hs-banner--info {
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 12%, var(--hs-surface, #ffffff));
  border-color: color-mix(in srgb, var(--hs-primary, #3182ce) 35%, var(--hs-surface, #ffffff));
}

.hs-banner--warning {
  background: color-mix(in srgb, var(--hs-warning, #dd6b20) 12%, var(--hs-surface, #ffffff));
  border-color: color-mix(in srgb, var(--hs-warning, #dd6b20) 35%, var(--hs-surface, #ffffff));
}

.hs-banner__body {
  flex: 1;
  min-width: 0;
}

.hs-banner__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hs-banner__detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.9;
}

.hs-banner__meta {
  margin: 8px 0 0;
  font-size: 13px;
}

.hs-banner__meta code {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hs-banner__dismiss {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
  opacity: 0.7;
}

.hs-banner__dismiss:hover {
  opacity: 1;
}

/* Field wrap + custom SingleSelect / MultiSelect dropdown */
.hs-select-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--hs-label-gap);
  min-width: 0;
  width: 100%;
}

.hs-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--hs-text-secondary, #718096);
  margin: 0;
}

.hs-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font-family: 'Material Symbols Outlined', sans-serif !important;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.hs-dd {
  position: relative;
  width: 100%;
  min-width: 0;
}

.hs-dd.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.hs-dd__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hs-space-2);
  box-sizing: border-box;
  width: 100%;
  height: var(--hs-control-h);
  min-height: var(--hs-control-h);
  /* Match .hs-input: fixed height, horizontal padding only */
  padding: 0 var(--hs-control-px);
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: var(--hs-radius-sm);
  background: var(--hs-surface, #fff);
  color: var(--hs-text, #1a202c);
  font: inherit;
  font-size: 16px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.hs-dd.is-open .hs-dd__trigger {
  border-color: var(--hs-primary, #3182ce);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--hs-primary, #3182ce) 20%, transparent);
}

.hs-dd__trigger--multi {
  min-height: var(--hs-control-h-lg);
  align-items: flex-start;
}

.hs-dd__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-dd__placeholder {
  color: var(--hs-text-secondary, #718096);
}

.hs-dd__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hs-dd__clear {
  display: inline-flex;
  color: var(--hs-text-secondary, #718096);
  cursor: pointer;
  border-radius: 4px;
  padding: 2px;
}

.hs-dd__clear:hover {
  color: var(--hs-text, #1a202c);
  background: color-mix(in srgb, var(--hs-border, #e2e8f0) 60%, white);
}

.hs-dd__chevron {
  color: var(--hs-text-secondary, #718096);
  transition: transform 0.15s ease;
}

.hs-dd.is-open .hs-dd__chevron {
  transform: rotate(180deg);
}

.hs-dd__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
  align-items: center;
}

.hs-dd__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 12%, white);
  font-size: 12px;
  font-weight: 600;
  max-width: 100%;
}

.hs-dd__chip-x {
  cursor: pointer;
  opacity: 0.7;
  font-size: 14px;
  line-height: 1;
}

.hs-dd__chip--more {
  background: var(--hs-border, #e2e8f0);
  color: var(--hs-text-secondary, #718096);
}

.hs-dd__backdrop {
  display: none;
}

/* Portaled desktop panel root — position/size set inline from trigger rect */
.hs-dd__desktop-overlay {
  box-sizing: border-box;
}

.hs-dd__desktop-overlay .hs-dd__panel {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  width: 100%;
  max-height: inherit;
  z-index: 1;
}

.hs-dd__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  background: var(--hs-surface, #fff);
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.hs-dd__sheet-handle {
  display: none;
}

.hs-dd__panel-title {
  display: none;
  margin: 0;
  padding: 12px 16px 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--hs-text, #1a202c);
}

.hs-dd__search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--hs-border, #e2e8f0);
}

.hs-dd__search-input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  background: var(--hs-bg, #f5f7fa);
  color: var(--hs-text, #1a202c);
}

.hs-dd__list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.hs-dd__empty {
  padding: 16px;
  text-align: center;
  color: var(--hs-text-secondary, #718096);
  font-size: 14px;
}

.hs-dd__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--hs-text, #1a202c);
  text-align: left;
  cursor: pointer;
}

.hs-dd__option:hover:not(:disabled) {
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 8%, white);
}

.hs-dd__option.is-active {
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 12%, white);
  color: var(--hs-primary, #3182ce);
  font-weight: 600;
}

.hs-dd__option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hs-dd__option--check {
  justify-content: flex-start;
}

.hs-dd__check {
  color: var(--hs-primary, #3182ce);
  flex-shrink: 0;
}

.hs-dd__checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--hs-border, #e2e8f0);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.hs-dd__checkbox.is-checked {
  background: var(--hs-primary, #3182ce);
  border-color: var(--hs-primary, #3182ce);
}

.hs-dd__footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  border-top: 1px solid var(--hs-border, #e2e8f0);
}

.hs-dd__done {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  background: var(--hs-primary, #3182ce);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Mobile: bottom sheet */
@media (max-width: 860px) {
  /*
   * Portaled overlay root — one fixed viewport box so backdrop + sheet
   * stay aligned when the iOS keyboard opens (Chrome on iPhone).
   */
  .hs-dd__mobile-overlay {
    position: fixed;
    inset: 0;
    /* Above modal/drawer (1000) so selects opened inside sheets stay on top */
    z-index: 1100;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    box-sizing: border-box;
    pointer-events: none;
  }

  .hs-dd__mobile-overlay .hs-dd__backdrop,
  .hs-dd__mobile-overlay .hs-dd__panel {
    pointer-events: auto;
  }

  .hs-dd__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
  }

  .hs-dd__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    /* Keep mobile select sheet height stable while typing/searching. */
    height: 420px !important;
    max-height: min(420px, calc(100svh - 16px)) !important;
    min-height: 320px !important;
    border-radius: 16px 16px 0 0;
    border: none;
  }

  .hs-dd__search-input {
    /* iOS auto-zooms inputs below 16px, which shifts the layout horizontally. */
    font-size: 16px !important;
  }

  .hs-input,
  textarea.hs-input,
  .hs-phone__input,
  .hs-search__input,
  .hs-dd__trigger {
    font-size: 16px !important;
  }

  .hs-phone__prefix {
    font-size: 16px !important;
  }


  .hs-dd__list {
    /* Prevent list viewport from collapsing when result count is low. */
    min-height: 180px;
  }

  .hs-dd__sheet-handle {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    margin: 10px auto 4px;
    background: var(--hs-border, #e2e8f0);
  }

  .hs-dd__panel-title {
    display: block;
  }

  .hs-dd__trigger {
    /* Match .hs-input height — do not inflate selects on mobile */
    height: var(--hs-control-h);
    min-height: var(--hs-control-h);
    border-radius: var(--hs-radius-sm);
    font-size: 16px !important;
    line-height: 1.25;
  }
}

/* TreeMultiSelect still uses Ant Design */
.hs-tree-multiselect.ant-select {
  width: 100%;
  max-width: 100%;
}

.hs-select__chevron {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--hs-text-secondary, #718096);
  pointer-events: none;
  font-size: 20px !important;
}

.hs-tree-multiselect.ant-select-open .hs-select__chevron {
  transform: rotate(180deg);
}

.hs-tree-multiselect .ant-select-arrow {
  display: inline-flex !important;
  align-items: center;
  opacity: 1 !important;
  inset-inline-end: 11px;
}

.hs-tree-multiselect .ant-select-selector {
  min-height: var(--hs-control-h) !important;
  border-radius: var(--hs-radius-sm) !important;
  border-color: var(--hs-border, #e2e8f0) !important;
  background: var(--hs-surface, #fff) !important;
  color: var(--hs-text, #1a202c) !important;
  font-size: 14px;
}

.hs-tree-multiselect.ant-select-focused .ant-select-selector,
.hs-tree-multiselect.ant-select-open .ant-select-selector {
  border-color: var(--hs-primary, #3182ce) !important;
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--hs-primary, #3182ce) 20%, transparent) !important;
}

.hs-tree-multiselect .ant-select-selection-item,
.hs-tree-multiselect .ant-select-selection-placeholder {
  line-height: calc(var(--hs-control-h) - 2px) !important;
  color: var(--hs-text, #1a202c);
}

.hs-tree-multiselect .ant-select-selection-placeholder {
  color: var(--hs-text-secondary, #718096) !important;
}

.hs-tree-multiselect .ant-select-selection-overflow {
  padding-block: 4px;
}

.hs-tree-multiselect .ant-select-selection-item {
  line-height: 22px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 12%, white) !important;
  border-color: transparent !important;
  font-weight: 600;
  font-size: 12px;
}

.hs-tree-multiselect.ant-select-disabled .ant-select-selector {
  opacity: 0.6;
}

.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 12%, white);
  font-weight: 600;
}

.ant-select-dropdown .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 8%, white);
}

/* Standalone chips */
.hs-chips {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hs-chips--wrap {
  flex-wrap: wrap;
}

.hs-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hs-border, #e2e8f0);
  background: var(--hs-surface, #fff);
  color: var(--hs-text, #1a202c);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  cursor: default;
}

button.hs-chip {
  font: inherit;
  cursor: pointer;
}

.hs-chip__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-chip__close {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  font-size: 14px;
  opacity: 0.7;
  color: inherit;
}

.hs-chip__close:hover {
  opacity: 1;
}

.hs-chip--primary {
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 12%, white);
  border-color: color-mix(in srgb, var(--hs-primary, #3182ce) 28%, white);
  color: var(--hs-primary, #3182ce);
}

.hs-chip--success {
  background: color-mix(in srgb, var(--hs-success, #38a169) 12%, white);
  border-color: color-mix(in srgb, var(--hs-success, #38a169) 28%, white);
  color: var(--hs-success, #38a169);
}

.hs-chip--warning {
  background: color-mix(in srgb, var(--hs-warning, #dd6b20) 12%, white);
  border-color: color-mix(in srgb, var(--hs-warning, #dd6b20) 28%, white);
  color: var(--hs-warning, #dd6b20);
}

.hs-chip--error {
  background: color-mix(in srgb, var(--hs-error, #e53e3e) 12%, white);
  border-color: color-mix(in srgb, var(--hs-error, #e53e3e) 28%, white);
  color: var(--hs-error, #e53e3e);
}

.hs-chip--selected {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hs-primary, #3182ce) 35%, transparent);
}

.hs-chip--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Card — simple surface (list rows, profile blocks, panels) */
.hs-card {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--hs-surface, #fff);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  color: inherit;
  text-align: inherit;
  margin: 0 0 12px;
}

.hs-card--bordered {
  border: 1px solid var(--hs-border, #e2e8f0);
}

.hs-card--pad-none {
  padding: 0;
}

.hs-card--pad-sm {
  padding: 12px;
}

.hs-card--pad-md {
  padding: 16px;
}

.hs-card--pad-lg {
  padding: 20px;
}

.hs-card--interactive {
  cursor: pointer;
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.hs-card--interactive:hover {
  border-color: color-mix(in srgb, var(--hs-primary, #3182ce) 35%, var(--hs-border, #e2e8f0));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hs-card--interactive:active {
  transform: scale(0.997);
}

button.hs-card {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

/* Widget shell */
.hs-widget {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--hs-surface, #fff);
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.hs-widget__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.hs-widget--compact .hs-widget__header {
  padding: 12px 12px 0;
}

.hs-widget__titles {
  min-width: 0;
}

.hs-widget__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hs-text, #1a202c);
}

.hs-widget__subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--hs-text-secondary, #718096);
}

.hs-widget__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hs-widget__body {
  padding: 16px;
  min-width: 0;
}

.hs-widget--compact .hs-widget__body {
  padding: 12px;
}

.hs-widget__footer {
  padding: 0 16px 16px;
  border-top: 1px solid var(--hs-border, #e2e8f0);
  padding-top: 12px;
  margin-top: 0;
}

.hs-widget--compact .hs-widget__footer {
  padding: 0 12px 12px;
  padding-top: 10px;
}

.hs-vtable {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.hs-vtable__scroll {
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 10px;
  background: var(--hs-surface, #fff);
  width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.hs-vtable__table {
  width: 100%;
  max-width: none;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
}

.hs-vtable__table th,
.hs-vtable__table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hs-border, #e2e8f0);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hs-vtable__table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--hs-surface, #fff);
  font-weight: 700;
  color: var(--hs-text-secondary, #718096);
  vertical-align: middle;
}

.hs-vtable__table th.hs-vtable__th--filter-open {
  z-index: 30;
}

.hs-vtable__th-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.hs-vtable__th-label {
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-vtable__search-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 1;
}

.hs-vtable__search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--hs-text-secondary, #718096);
  cursor: pointer;
}

.hs-vtable__search-btn:hover {
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 10%, transparent);
  color: var(--hs-primary, #3182ce);
}

.hs-vtable__search-btn--active {
  color: var(--hs-primary, #3182ce);
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 12%, transparent);
}

.hs-vtable__search-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  z-index: 40;
  width: min(240px, 70vw);
  padding: 8px;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 8px;
  background: var(--hs-surface, #fff);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hs-vtable__search-panel--portal {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  margin: 0;
}

.hs-vtable__search-panel--multi {
  width: min(280px, 80vw);
  min-width: 220px;
}

.hs-vtable__search-panel--multi .hs-select-wrap {
  gap: 0;
}

.hs-vtable__search-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 6px;
  background: var(--hs-surface, #fff);
}

.hs-vtable__search-field:focus-within {
  border-color: var(--hs-primary, #3182ce);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hs-primary, #3182ce) 20%, transparent);
}

.hs-vtable__search-field-icon {
  flex-shrink: 0;
  color: var(--hs-text-secondary, #718096);
}

.hs-vtable__filter {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  border: none;
  outline: none;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--hs-text, #1a202c);
  background: transparent;
}

.hs-vtable__search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
  color: var(--hs-text-secondary, #718096);
  cursor: pointer;
}

.hs-vtable__search-clear:hover {
  color: var(--hs-text, #1a202c);
}

.hs-vtable__empty-cell {
  padding: 40px 12px !important;
  text-align: center !important;
  color: var(--hs-text-secondary, #718096);
  font-size: 13px;
  border-bottom: none !important;
}

.hs-vtable__loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: color-mix(in srgb, var(--hs-surface, #fff) 82%, transparent);
  color: var(--hs-text-secondary, #718096);
  font-size: 13px;
  font-weight: 600;
}

.hs-vtable__spinner {
  animation: hs-vtable-spin 0.8s linear infinite;
  color: var(--hs-primary, #3182ce);
}

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

.hs-vtable__empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--hs-text-secondary, #718096);
}

.hs-vtable__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hs-vtable__meta {
  font-size: 13px;
  color: var(--hs-text-secondary, #718096);
}

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

.hs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--hs-control-h);
  padding: 0 var(--hs-control-px);
  border-radius: var(--hs-radius-sm);
  border: 1px solid var(--hs-border, #e2e8f0);
  background: var(--hs-surface, #fff);
  color: var(--hs-text, #1a202c);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

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

.hs-btn--primary {
  background: var(--hs-primary, #3182ce);
  border-color: var(--hs-primary, #3182ce);
  color: #fff;
}

.hs-btn--secondary {
  background: var(--hs-surface, #fff);
  border-color: var(--hs-border, #e2e8f0);
  color: var(--hs-text, #1a202c);
}

.hs-btn--ghost {
  background: transparent;
  border-color: transparent;
}

.hs-btn--danger {
  background: var(--hs-error, #e53e3e);
  border-color: var(--hs-error, #e53e3e);
  color: #fff;
}

.hs-btn--sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.hs-btn--md {
  min-height: var(--hs-control-h);
  padding: 0 var(--hs-control-px);
  font-size: 14px;
}

.hs-btn--lg {
  min-height: var(--hs-control-h-lg);
  padding: 0 var(--hs-space-4);
  font-size: 15px;
}

.hs-btn--block {
  width: 100%;
}

.hs-btn__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.25;
  min-width: 0;
}

.hs-btn__label .hs-icon,
.hs-btn__label .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.hs-btn__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: hs-spin 0.7s linear infinite;
}

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

.hs-field-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--hs-error, #e53e3e);
}

.hs-field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--hs-text-secondary, #718096);
}

.hs-input-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--hs-label-gap);
  width: 100%;
}

.hs-input__shell {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: var(--hs-radius-sm);
  background: var(--hs-surface, #fff);
  overflow: hidden;
}

.hs-input-wrap--error .hs-input__shell {
  border-color: var(--hs-error, #e53e3e);
}

.hs-input {
  flex: 1;
  min-width: 0;
  min-height: var(--hs-control-h);
  border: none;
  outline: none;
  padding: 0 var(--hs-control-px);
  background: transparent;
  color: var(--hs-text, #1a202c);
  font-size: 16px;
}

textarea.hs-input {
  min-height: 72px;
  padding: var(--hs-space-2) var(--hs-control-px);
  resize: vertical;
}

.hs-input__affix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--hs-text-secondary, #718096);
  background: var(--hs-background, #f7fafc);
  border-right: 1px solid var(--hs-border, #e2e8f0);
}

.hs-input__suffix {
  border-right: none;
  border-left: 1px solid var(--hs-border, #e2e8f0);
}

.hs-otp {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

/* Single real input — avoids iOS focus/scroll flicker from hopping between cells */
.hs-otp__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  opacity: 0;
  z-index: 2;
  cursor: text;
}

.hs-otp__input:focus {
  outline: none;
}

.hs-otp__cell {
  flex: 1;
  max-width: 52px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--hs-border, #e2e8f0);
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--hs-text, #1a202c);
  background: var(--hs-surface, #fff);
  pointer-events: none;
  user-select: none;
}

.hs-otp__cell.is-active,
.hs-otp__cell.is-focused {
  border-color: var(--hs-primary, #3182ce);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hs-primary, #3182ce) 22%, transparent);
}

.hs-phone {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hs-phone__row {
  display: flex;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  background: var(--hs-surface, #fff);
}

.hs-phone--error .hs-phone__row {
  border-color: var(--hs-error, #e53e3e);
}

.hs-phone__prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 600;
  font-size: 16px;
  background: var(--hs-background, #f7fafc);
  border-right: 1px solid var(--hs-border, #e2e8f0);
  color: var(--hs-text, #1a202c);
}

.hs-phone__input {
  flex: 1;
  min-height: var(--hs-control-h);
  border: none;
  outline: none;
  padding: 0 var(--hs-control-px);
  /* 16px minimum — iOS Safari zooms the page when focused inputs are < 16px */
  font-size: 16px;
  background: transparent;
  color: var(--hs-text, #1a202c);
}

.hs-badge-wrap {
  position: relative;
  display: inline-flex;
}

.hs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: var(--hs-primary, #3182ce);
  color: #fff;
}

.hs-badge-wrap .hs-badge {
  position: absolute;
  top: -6px;
  right: -6px;
}

.hs-badge--dot {
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
}

.hs-badge--default {
  background: #718096;
}

.hs-badge--success {
  background: var(--hs-success, #38a169);
}

.hs-badge--warning {
  background: var(--hs-warning, #dd6b20);
}

.hs-badge--error {
  background: var(--hs-error, #e53e3e);
}

.hs-badge--info {
  background: var(--hs-primary, #3182ce);
}

.hs-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.hs-status-chip--pending {
  background: color-mix(in srgb, #dd6b20 14%, white);
  color: #c05621;
  border-color: color-mix(in srgb, #dd6b20 35%, white);
}

.hs-status-chip--active,
.hs-status-chip--info {
  background: color-mix(in srgb, var(--hs-primary, #3182ce) 14%, white);
  color: var(--hs-primary, #3182ce);
  border-color: color-mix(in srgb, var(--hs-primary, #3182ce) 35%, white);
}

.hs-status-chip--completed,
.hs-status-chip--success {
  background: color-mix(in srgb, var(--hs-success, #38a169) 14%, white);
  color: var(--hs-success, #38a169);
  border-color: color-mix(in srgb, var(--hs-success, #38a169) 35%, white);
}

.hs-status-chip--cancelled,
.hs-status-chip--error {
  background: color-mix(in srgb, var(--hs-error, #e53e3e) 14%, white);
  color: var(--hs-error, #e53e3e);
  border-color: color-mix(in srgb, var(--hs-error, #e53e3e) 35%, white);
}

.hs-status-chip--warning {
  background: color-mix(in srgb, var(--hs-warning, #dd6b20) 14%, white);
  color: var(--hs-warning, #dd6b20);
  border-color: color-mix(in srgb, var(--hs-warning, #dd6b20) 35%, white);
}

.hs-status-chip--neutral {
  background: #edf2f7;
  color: #4a5568;
  border-color: #e2e8f0;
}

.hs-avatar {
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hs-avatar--placeholder {
  background: var(--hs-primary, #3182ce);
  color: #fff;
  font-weight: 700;
}

.hs-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 10px;
  background: var(--hs-surface, #fff);
}

.hs-search__icon {
  color: var(--hs-text-secondary, #718096);
  flex-shrink: 0;
}

.hs-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  /* 16px minimum — prevents iOS Safari focus zoom on mobile search fields */
  font-size: 16px;
  color: var(--hs-text, #1a202c);
}

.hs-search__clear {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--hs-text-secondary, #718096);
  display: grid;
  place-items: center;
  padding: 4px;
}

.hs-datepicker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hs-datepicker__input {
  min-height: 44px;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 15px;
  background: var(--hs-surface, #fff);
  color: var(--hs-text, #1a202c);
}

.hs-datepicker--error .hs-datepicker__input {
  border-color: var(--hs-error, #e53e3e);
}

/*
 * --hs-footer-h: height of the app's fixed bottom navigation.
 * Set this CSS variable in the consuming app's global CSS so modals
 * automatically clear the footer. Falls back to 0px (desktop / no footer).
 * Example in CustomerWeb global.css:
 *   --hs-footer-h: calc(var(--tabbar-h, 60px) + var(--safe-bottom, 0px));
 */

.hs-modal-backdrop,
.hs-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Top safe padding keeps dialog close control visible; footer var clears tab bar */
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px
    calc(16px + var(--hs-footer-h, 0px)) 16px;
  box-sizing: border-box;
}

.hs-modal {
  width: min(100%, 480px);
  /* Subtract footer height from available modal space */
  max-height: min(
    calc(90dvh - var(--hs-footer-h, 0px) - env(safe-area-inset-top, 0px)),
    640px
  );
  /* Flex column so header stays pinned and body scrolls independently */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--hs-surface, #fff);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.hs-dialog {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.hs-dialog__header,
.hs-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
  flex-shrink: 0;
}

.hs-dialog__title,
.hs-drawer__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.hs-dialog__close,
.hs-drawer__close {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--hs-text-secondary, #718096);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.hs-dialog__body,
.hs-drawer__body {
  padding: 8px 16px 16px;
  /* Independently scrollable — header and footer stay pinned */
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hs-dialog__footer,
.hs-drawer__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--hs-border, #e2e8f0);
  flex-shrink: 0;
}

.hs-drawer-backdrop {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}

.hs-drawer {
  background: var(--hs-surface, #fff);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.hs-drawer--right {
  width: min(100%, 400px);
  margin-left: auto;
  height: 100%;
}

.hs-drawer--left {
  width: min(100%, 400px);
  margin-right: auto;
  height: 100%;
}

.hs-drawer--bottom {
  width: 100%;
  /* Leave room for app top bar + footer so the sheet header/close stays visible */
  max-height: calc(
    100dvh - var(--hs-footer-h, 0px) - max(56px, env(safe-area-inset-top, 0px)) -
      12px
  );
  margin-top: auto;
  border-radius: 16px 16px 0 0;
}

.hs-drawer-backdrop:has(.hs-drawer--left) {
  justify-content: flex-start;
}

.hs-drawer-backdrop:has(.hs-drawer--bottom) {
  align-items: flex-end;
  /* Leave clear space under the app top bar so sheet headers stay visible */
  padding-top: max(
    12px,
    calc(var(--mobile-header-h, var(--topbar-h, 56px)) + env(safe-area-inset-top, 0px))
  );
  padding-bottom: var(--hs-footer-h, 0px);
}

.hs-toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(calc(100% - 32px), 360px);
}

.hs-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--hs-surface, #fff);
  border: 1px solid var(--hs-border, #e2e8f0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 14px;
}

.hs-toast--success {
  border-color: color-mix(in srgb, var(--hs-success, #38a169) 40%, white);
}

.hs-toast--error {
  border-color: color-mix(in srgb, var(--hs-error, #e53e3e) 40%, white);
}

.hs-toast--warning {
  border-color: color-mix(in srgb, var(--hs-warning, #dd6b20) 40%, white);
}

.hs-toast--info {
  border-color: color-mix(in srgb, var(--hs-primary, #3182ce) 40%, white);
}

.hs-toast__msg {
  flex: 1;
}

.hs-toast__close {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--hs-text-secondary, #718096);
}

.hs-confirm__message {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--hs-text-secondary, #718096);
}

.hs-loader {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hs-loader__spinner {
  border: 3px solid var(--hs-border, #e2e8f0);
  border-top-color: var(--hs-primary, #3182ce);
  border-radius: 50%;
  animation: hs-spin 0.7s linear infinite;
}

.hs-loader--sm .hs-loader__spinner {
  width: 18px;
  height: 18px;
}

.hs-loader--md .hs-loader__spinner {
  width: 28px;
  height: 28px;
}

.hs-loader--lg .hs-loader__spinner {
  width: 40px;
  height: 40px;
}

.hs-loader__label {
  font-size: 13px;
  color: var(--hs-text-secondary, #718096);
}

.hs-loader-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
}

.hs-skeleton {
  display: block;
  background: linear-gradient(
    90deg,
    #edf2f7 25%,
    #e2e8f0 37%,
    #edf2f7 63%
  );
  background-size: 400% 100%;
  animation: hs-shimmer 1.2s ease infinite;
  border-radius: 8px;
}

.hs-skeleton--text {
  height: 12px;
  width: 100%;
  margin-bottom: 8px;
}

.hs-skeleton--title {
  height: 20px;
  width: 60%;
}

.hs-skeleton--avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.hs-skeleton--rect {
  width: 100%;
  height: 120px;
}

.hs-skeleton--card {
  width: 100%;
  height: 160px;
  border-radius: 12px;
}

.hs-skeleton-stack {
  width: 100%;
}

@keyframes hs-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.hs-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hs-pagination__meta {
  font-size: 13px;
  color: var(--hs-text-secondary, #718096);
}

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

.hs-pagination__page {
  font-size: 13px;
  font-weight: 600;
  min-width: 64px;
  text-align: center;
}

.hs-pagination__size {
  min-height: 32px;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 8px;
  padding: 0 8px;
  background: var(--hs-surface, #fff);
}

.hs-filter-panel {
  background: var(--hs-surface, #fff);
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 12px;
  padding: 12px 14px;
}

.hs-filter-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hs-filter-panel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.hs-filter-panel__toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--hs-text-secondary, #718096);
}

.hs-filter-panel__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.hs-filter-panel__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hs-border, #e2e8f0);
}

.hs-perm-selector {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hs-perm-module {
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 12px;
  padding: 12px;
  background: var(--hs-surface, #fff);
}

.hs-perm-module__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}

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

.hs-perm-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}

.hs-perm-item__label {
  display: block;
  font-weight: 600;
}

.hs-perm-item__desc {
  display: block;
  font-size: 12px;
  color: var(--hs-text-secondary, #718096);
  margin-top: 2px;
}

.hs-image-upload__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hs-image-upload__thumb {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hs-border, #e2e8f0);
}

.hs-image-upload__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hs-image-upload__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hs-image-upload__add {
  width: 88px;
  height: 88px;
  border: 1.5px dashed var(--hs-border, #e2e8f0);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--hs-primary, #3182ce);
  font-size: 11px;
  font-weight: 600;
}

.hs-doc-viewer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hs-doc-viewer__title {
  margin: 0;
  font-size: 15px;
}

.hs-doc-viewer__img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--hs-border, #e2e8f0);
}

.hs-doc-viewer__frame {
  width: 100%;
  min-height: 480px;
  border: 1px solid var(--hs-border, #e2e8f0);
  border-radius: 10px;
}

.hs-doc-viewer__fallback {
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--hs-border, #e2e8f0);
  border-radius: 12px;
}

.hs-empty-state,
.hs-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 40px 24px;
}

.hs-empty-state__icon,
.hs-error-state__icon {
  color: var(--hs-text-secondary, #718096);
}

.hs-error-state__icon {
  color: var(--hs-error, #e53e3e);
}

.hs-empty-state__title,
.hs-error-state__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.hs-empty-state__msg,
.hs-error-state__msg {
  margin: 0;
  font-size: 14px;
  color: var(--hs-text-secondary, #718096);
  max-width: 360px;
  line-height: 1.45;
}

/* ——— ImageViewer (centered modal card) ——— */
.hs-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    calc(16px + var(--hs-footer-h, 0px) + env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  touch-action: pan-y;
}

.hs-image-viewer__dialog {
  position: relative;
  width: min(100%, 440px);
  max-height: min(calc(80dvh - var(--hs-footer-h, 0px)), 560px);
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--hs-surface, #fff);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  outline: none;
}

.hs-image-viewer__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*
 * Close/nav must stay readable on light photos, dark night-vision surfaces,
 * and when host apps map --hs-bg instead of --hs-background.
 */
.hs-image-viewer__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  -webkit-tap-highlight-color: transparent;
}

.hs-image-viewer__close .hs-icon {
  color: #fff;
}

.hs-image-viewer__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hs-image-viewer__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hs-image-viewer__nav .hs-icon {
  color: #fff;
}

.hs-image-viewer__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.hs-image-viewer__nav--prev {
  left: 8px;
}

.hs-image-viewer__nav--next {
  right: 8px;
}

.hs-image-viewer__stage {
  position: relative;
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 40px 16px;
  background: var(--hs-background, var(--hs-bg, #f5f7fa));
}

.hs-image-viewer__frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
}

.hs-image-viewer__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.hs-image-viewer__img.is-ready {
  opacity: 1;
}

.hs-image-viewer__mark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  z-index: 4;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hs-image-viewer__mark-img,
.hs-image-viewer__mark-svg {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.hs-image-viewer__status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--hs-text-secondary, #718096);
  font-size: 14px;
  pointer-events: none;
}

.hs-image-viewer__footer {
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
  background: var(--hs-surface, #fff);
}

.hs-image-viewer__count {
  color: var(--hs-text-secondary, #718096);
  font-size: 13px;
  font-weight: 600;
}

.hs-image-viewer__dots {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.hs-image-viewer__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: color-mix(in srgb, var(--hs-text, #1a202c) 22%, transparent);
  cursor: pointer;
}

.hs-image-viewer__dot.is-active {
  background: var(--hs-primary, #2e7d32);
}

@media (max-width: 860px) {
  .hs-image-viewer__nav {
    display: none;
  }

  .hs-image-viewer__stage {
    padding: 44px 16px 12px;
  }
}

/* MobilePhotoPicker — camera vs gallery; label-triggered for iOS/Safari */
.hs-mobile-photo-picker {
  display: flex;
  gap: var(--hs-space-2, 8px);
  flex-wrap: wrap;
}

.hs-mobile-photo-picker--stack {
  flex-direction: column;
}

.hs-mobile-photo-picker__label {
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
  margin: 0;
}

.hs-mobile-photo-picker__label.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.hs-mobile-photo-picker__btn {
  display: flex;
  width: 100%;
  justify-content: center;
}

.hs-mobile-photo-picker__btn .hs-btn__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hs-mobile-photo-picker--quiet {
  gap: 4px;
}

.hs-mobile-photo-picker--quiet .hs-mobile-photo-picker__label {
  flex: 0 0 auto;
}

.hs-mobile-photo-picker__quiet-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hs-text-secondary, #64748b);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.hs-mobile-photo-picker--quiet .hs-mobile-photo-picker__label:hover .hs-mobile-photo-picker__quiet-btn {
  background: color-mix(in srgb, var(--hs-text, #1a202c) 6%, transparent);
  color: var(--hs-text, #1a202c);
}

/* Visually hidden but still clickable (hidden attribute breaks iOS file pick). */
.hs-mobile-photo-picker__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
/**
 * Structural tokens only. Brand colors come from themeConfig via applyColorPalette().
 * Fallbacks mirror `homeservices` so first paint works before JS.
 */
:root {
  --primary-color: #3182ce;
  --primary-color-2: #2c5282;
  --secondary-color: #38b2ac;
  --secondary-color-2: #2c7a7b;
  --primary-color-opacity-05: rgba(49, 130, 206, 0.05);
  --primary-color-opacity-10: rgba(49, 130, 206, 0.1);
  --primary-color-opacity-15: rgba(49, 130, 206, 0.15);
  --primary-color-opacity-20: rgba(49, 130, 206, 0.2);
  --primary-color-opacity-35: rgba(49, 130, 206, 0.35);
  --secondary-color-opacity-10: rgba(56, 178, 172, 0.1);
  --secondary-color-opacity-20: rgba(56, 178, 172, 0.2);
  --primary-opacity-10: var(--primary-color-opacity-10);
  --neutral-white: #ffffff;
  --neutral-black: #000000;
  --neutral-white-opacity-06: rgba(255, 255, 255, 0.06);
  --neutral-white-opacity-08: rgba(255, 255, 255, 0.08);
  --neutral-white-opacity-16: rgba(255, 255, 255, 0.16);
  --neutral-black-opacity-04: rgba(0, 0, 0, 0.04);
  --neutral-black-opacity-06: rgba(0, 0, 0, 0.06);
  --neutral-black-opacity-20: rgba(0, 0, 0, 0.2);
  --neutral-black-opacity-25: rgba(0, 0, 0, 0.25);
  --color-sidebar-opacity-45: rgba(26, 32, 44, 0.45);
  --color-bg-opacity-60: rgba(245, 247, 250, 0.6);
  --color-bg-opacity-80: rgba(245, 247, 250, 0.8);
  --color-error-opacity-08: rgba(229, 62, 62, 0.08);
  --color-error-opacity-12: rgba(229, 62, 62, 0.12);
  --color-success-opacity-12: rgba(56, 161, 105, 0.12);
  --color-warning-opacity-12: rgba(221, 107, 32, 0.12);

  --color-primary: var(--primary-color);
  --color-primary-dark: var(--primary-color-2);
  --color-secondary: var(--secondary-color);
  --color-bg: #f5f7fa;
  --color-card: #ffffff;
  --color-surface: #ffffff;
  --color-text: #1a202c;
  --color-text-secondary: #718096;
  --color-border: #e2e8f0;
  --color-error: #e53e3e;
  --warning-red: var(--color-error);
  --color-success: #38a169;
  --color-warning: #dd6b20;
  --color-sidebar: #1a202c;
  --color-sidebar-text: #edf2f7;
  --color-sidebar-muted: #a0aec0;

  --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Spacing scale (4px base) — use everywhere */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Typography scale */
  --font-size-xs: 12.5px; /* secondary / secondary table line */
  --font-size-sm: 14px; /* body + table content */
  --font-size-md: 16px; /* section / table / modal headers */
  --font-size-lg: 20px; /* page titles */
  --font-size-xl: 24px; /* stat values */

  --line-height-tight: 1.25;
  --line-height-body: 1.45;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px var(--neutral-black-opacity-06),
    0 4px 12px var(--neutral-black-opacity-04);
  --shadow: var(--shadow-sm);
  --sidebar-width: 240px;
  --sidebar-width-collapsed: 72px;
  --control-height: 40px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--color-text);
  overflow-x: hidden;
  /* Prevent double body scroll — admin app scrolls inside .shell-main */
  overflow-y: auto;
  background:
    radial-gradient(
      ellipse 80% 50% at 100% 0%,
      var(--primary-color-opacity-10),
      transparent 50%
    ),
    radial-gradient(
      ellipse 60% 40% at 0% 100%,
      var(--secondary-color-opacity-10),
      transparent 45%
    ),
    var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

#root {
  min-height: 100vh;
}
/**
 * Scaling system (aligned with ai-agent-cursor-claude frontend conventions).
 * Put `scale-baseline-80` on the SAME element as the page root class — never nest.
 * Prefer rem for spacing; avoid vh/fixed inside scaled containers for overlays
 * (modals stay position:fixed on the backdrop outside the scaled tree when possible).
 */

.scale-baseline-80 {
  zoom: 0.8;
  width: 125%;
  max-width: 125%;
  box-sizing: border-box;
  min-height: 100%;
  /* Width compensation for zoom must not create a horizontal scrollbar */
  overflow-x: clip;
}

.scale-baseline-100 {
  zoom: 1;
  width: 100%;
  box-sizing: border-box;
}

@supports not (zoom: 1) {
  .scale-baseline-80 {
    transform: scale(0.8);
    transform-origin: top left;
    width: 125%;
  }
}

/* Narrow viewports: drop zoom compensation so tables/layout fit the real width */
@media (max-width: 1100px) {
  .scale-baseline-80 {
    zoom: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
  }

  @supports not (zoom: 1) {
    .scale-baseline-80 {
      transform: none;
      width: 100%;
    }
  }
}
:root {
  --emp-bg: #f4f7f5;
  --emp-surface: #ffffff;
  --emp-text: #12231a;
  --emp-muted: #5b6b62;
  --emp-primary: #0b6e4f;
  --emp-border: #d7e0db;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--emp-text);
  background: var(--emp-bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--emp-bg);
}

.emp-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

.emp-card {
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.emp-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.emp-btn {
  appearance: none;
  border: none;
  background: var(--emp-primary);
  color: white;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.emp-btn.secondary {
  background: transparent;
  color: var(--emp-primary);
  border: 1px solid var(--emp-primary);
}

.emp-input {
  border: 1px solid var(--emp-border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  min-width: 180px;
}

.emp-table {
  width: 100%;
  border-collapse: collapse;
}

.emp-table th,
.emp-table td {
  text-align: left;
  padding: 0.65rem 0.4rem;
  border-bottom: 1px solid var(--emp-border);
  font-size: 0.95rem;
}

.emp-muted {
  color: var(--emp-muted);
}

.emp-nav a {
  color: var(--emp-primary);
  margin-right: 1rem;
  text-decoration: none;
  font-weight: 600;
}

.emp-error {
  color: #b42318;
  margin: 0.5rem 0;
}

.emp-app-shell {
  min-height: 100vh;
  padding: 20px 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.emp-hr-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.emp-hr-nav a {
  color: #0f172a;
  text-decoration: none;
  font-weight: 650;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.emp-hr-nav a:hover {
  color: #1d4ed8;
}

.emp-hr-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.emp-hr-nav__signout {
  margin-left: auto;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 12px;
  font-weight: 650;
  cursor: pointer;
}

@media (max-width: 720px) {
  .emp-app-shell {
    padding: 12px 12px 32px;
  }

  .emp-hr-nav__signout {
    margin-left: 0;
  }
}

/* Ensure Material Symbols glyph text is hidden when font loads */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.emp-req-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.emp-req-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emp-req-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
}

.emp-req-card--unread {
  border-color: #93c5fd;
  background: #f8fbff;
}

.emp-req-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.emp-req-card__head p {
  margin: 4px 0 0;
}

.emp-req-card__status {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d4ed8;
  white-space: nowrap;
}

.emp-req-card__body {
  margin: 10px 0 0;
  color: #334155;
  white-space: pre-wrap;
}

.emp-req-card__read {
  margin-top: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 12px;
  font-weight: 650;
  cursor: pointer;
}
.emp-detail__nav {
  margin-bottom: 12px;
}

.emp-back {
  color: var(--text-muted, #64748b);
  text-decoration: none;
  font-weight: 600;
}

.emp-back:hover {
  color: var(--primary-color, #3182ce);
}

.emp-toast {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-success, #2f9e44) 12%, white);
  border: 1px solid color-mix(in srgb, var(--color-success, #2f9e44) 35%, white);
  color: #166534;
  font-weight: 600;
}

.emp-detail__hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 20px 22px;
  border: 1px solid var(--border-color, #e9ecef);
  border-radius: 14px;
  background: #fff;
}

.emp-detail__identity {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
}

.emp-detail__photo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.emp-detail__photo {
  display: block;
}

.emp-detail__photo img,
.emp-avatar--lg {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--color-success, #2f9e44) 35%, white);
}

.emp-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #dee2e6);
  background: #fff;
  color: var(--text-primary, #212529);
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.emp-photo-btn:hover {
  border-color: var(--primary-color, #3182ce);
  color: var(--primary-color-2, #2c5282);
}

.emp-photo-btn--inline {
  flex-shrink: 0;
}

.emp-id-photo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.emp-id-photo-hint {
  margin: 0;
  flex: 1 1 180px;
  font-size: 0.8125rem;
}

.emp-detail__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.emp-detail__title-row h1 {
  margin: 0;
  font-size: 1.35rem;
}

.emp-detail__role {
  margin: 4px 0 0;
  font-weight: 600;
  color: var(--text-secondary, #495057);
}

.emp-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.emp-reinstate-hint {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.emp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 16px;
}

.emp-access-panel,
.panel.emp-section {
  padding: 20px 22px;
  margin-bottom: 16px;
}

.emp-access-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.emp-access-panel__head h2 {
  margin: 0;
}

.emp-access-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px 2px;
}

.emp-tab {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  cursor: pointer;
}

.emp-tab--active {
  background: var(--primary-color-opacity-10, #ebf5ff);
  color: var(--primary-color-2, #2c5282);
  border-color: var(--primary-color-opacity-20, #bee3f8);
}

.emp-section h2,
.emp-section h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.emp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
}

.emp-dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.emp-dl--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
}

.emp-dl dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #868e96);
  margin: 0 0 4px;
}

.emp-dl dd {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.emp-comp-current {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.emp-salary-amount {
  margin: 4px 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.emp-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emp-history li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color, #e9ecef);
}

.emp-doc-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

.emp-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--primary-color, #3182ce);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.emp-doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emp-doc-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color, #e9ecef);
}

.emp-doc-list li > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.emp-doc-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.linkish {
  border: none;
  background: none;
  color: var(--color-error, #e03131);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.emp-id-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.emp-qr-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1024px) {
  .emp-detail__hero,
  .emp-access-panel,
  .panel.emp-section {
    padding: 18px 18px;
  }

  .emp-grid {
    gap: 22px;
  }
}

@media (max-width: 768px) {
  .emp-grid,
  .emp-dl--wide {
    grid-template-columns: 1fr;
  }

  .emp-detail__hero,
  .emp-access-panel,
  .panel.emp-section {
    padding: 16px 14px;
  }

  .emp-detail__actions {
    width: 100%;
  }

  .emp-detail__actions .hs-button,
  .emp-detail__actions button {
    flex: 1 1 auto;
  }

  .emp-tabs {
    gap: 4px;
  }
}
.hr-dash {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.hr-dash__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.hr-dash__brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.hr-dash__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.hr-dash__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 750;
  color: #64748b;
}

.hr-dash__brand h1 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}

.hr-dash__muted {
  margin: 4px 0 0;
  color: #64748b;
}

.hr-dash__signout {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 10px;
  min-height: 44px;
  padding: 0 14px;
  font-weight: 650;
  cursor: pointer;
}

.hr-dash__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.hr-dash__stats article {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hr-dash__stats strong {
  font-size: 1.4rem;
}

.hr-dash__stats span {
  color: #64748b;
  font-size: 0.85rem;
}

.hr-dash__card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.hr-dash__card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.hr-dash__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hr-dash__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 650;
}

.hr-dash__action--primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.hr-dash__state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 0;
}

.hr-dash__error {
  color: #b91c1c;
  font-weight: 650;
}

@media (max-width: 720px) {
  .hr-dash__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.emp-settings {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.emp-settings__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.emp-settings__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 750;
  color: #64748b;
}

.emp-settings__top h1 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}

.emp-settings__lead {
  margin: 6px 0 0;
  color: #64748b;
  max-width: 36rem;
  line-height: 1.45;
}

.emp-settings__back {
  color: #0f766e;
  font-weight: 650;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.emp-settings__state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 0;
  color: #64748b;
}

.emp-settings__error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
}

.emp-settings__toast {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 10px 12px;
}

.emp-settings__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 800px) {
  .emp-settings__grid {
    grid-template-columns: 1fr;
  }
}

.emp-settings__card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emp-settings__card h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.emp-settings__card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 650;
  color: #334155;
}

.emp-settings__card .text-input {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-weight: 500;
}

.emp-settings__hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
}

.emp-settings__color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.emp-settings__color-row input[type='color'] {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.emp-settings__color-row .text-input {
  flex: 1;
}

.emp-settings__label {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 650;
  color: #334155;
}

.emp-settings__logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.emp-settings__logo-row img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.emp-settings__file {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font-weight: 650;
  cursor: pointer;
}

.emp-settings__file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.emp-settings__preview {
  margin-top: 4px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

.emp-settings__preview-silver {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #e8eef5, #f5f7fa 40%, #e8eef5);
  border-bottom: 3px solid var(--emp-accent, #0b6e4f);
}

.emp-settings__preview-silver img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.emp-settings__preview-silver strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.emp-settings__preview-silver span {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
}

.emp-settings__preview-note {
  margin: 0;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #64748b;
}

.emp-settings__actions {
  margin-top: 4px;
}
/**
 * EMP auth — mobile: centered card; desktop (≥861px): Customer Web–style
 * split hero + card. Used by company login/register and solo activate flows.
 */

.login-layout {
  box-sizing: border-box;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--color-bg, #f5f7fa);
}

.login-layout--company .login-stage {
  width: 100%;
  max-width: 100%;
}

.login-showcase {
  display: none;
}

.login-auth-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 560px);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.login-layout--company .auth-screen {
  box-sizing: border-box;
  width: 100%;
  padding: 20px 16px 32px;
  display: flex;
  justify-content: center;
}

.login-layout--company .auth-scroll.login-card {
  width: 100%;
  margin: 0;
  padding: 20px 22px 24px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  /* Opaque crystal glass */
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(248, 250, 252, 0.88) 48%,
      rgba(241, 245, 249, 0.9) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 -1px 0 rgba(15, 23, 42, 0.04) inset,
    0 12px 40px rgba(15, 28, 46, 0.14),
    0 2px 8px rgba(15, 28, 46, 0.06);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

/* —— Solo (activate / MFA-only pages) —— */
.login-layout--solo {
  display: grid;
  place-items: center;
  padding: var(--space-5, 24px) var(--space-4, 16px);
  background:
    radial-gradient(
      ellipse 70% 55% at 20% 15%,
      color-mix(in srgb, var(--primary-color) 55%, #1a365d),
      transparent 55%
    ),
    linear-gradient(160deg, #0b2540 0%, #1a365d 48%, #234e70 100%);
}

.login-layout--solo .login-form-pane {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-layout--solo .login-card {
  width: min(100%, 26rem);
  background: var(--color-card, #fff);
  border-radius: var(--radius-lg, 16px);
  padding: var(--space-5, 24px);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 24px 48px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}

/* —— Card chrome —— */
.login-card-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.login-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
}

.login-card-toolbar__spacer {
  flex: 1;
  min-width: 0;
}

.login-mode-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 4px 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-secondary, #64748b);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}

.login-mode-arrow .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

.login-mode-arrow:hover:not(:disabled) {
  color: var(--primary-color, #3182ce);
  background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.login-mode-arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-mode-arrow--end {
  margin-left: auto;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-brand-row--compact {
  margin-bottom: 0;
  min-width: 0;
}

.login-brand-row .auth-logo,
.login-brand-row img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.login-brand-name {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  color: var(--color-text, #0f172a);
  line-height: 1.2;
}

.login-brand-tag {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary, #64748b);
}

.login-step-header {
  text-align: center;
  margin: 4px 0 16px;
}

.login-step-header h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--color-text, #0f172a);
  line-height: 1.25;
}

.login-step-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-secondary, #64748b);
  padding: 0 4px;
}

.login-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--space-1, 4px);
}

.login-brand-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  margin-bottom: var(--space-3, 12px);
  border-radius: var(--radius, 10px);
  background: #fff;
}

.login-card h1 {
  margin: 0 0 var(--space-1, 4px);
  font-size: var(--font-size-lg, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-card .sub {
  margin: 0 0 var(--space-5, 24px);
  color: var(--color-text-secondary, #64748b);
  line-height: 1.45;
  font-size: var(--font-size-sm, 0.9rem);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1, 4px);
  margin-bottom: var(--space-4, 16px);
}

.field label {
  font-size: var(--font-size-xs, 0.78rem);
  font-weight: 600;
  color: var(--color-text-secondary, #64748b);
}

.field input,
.field textarea,
.login-card > label input,
.login-card .text-input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--color-border, #cbd5e1);
  border-radius: var(--radius, 10px);
  padding: 10px 12px;
  min-height: 44px;
  background: #fff;
  font-size: 16px;
  color: var(--color-text, #0f172a);
  font-family: inherit;
}

.text-input--area {
  min-height: 88px;
  resize: vertical;
}

.login-card > label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-1, 4px);
  margin-bottom: var(--space-4, 16px);
  font-size: var(--font-size-xs, 0.78rem);
  font-weight: 600;
  color: var(--color-text-secondary, #64748b);
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .auth-field-row {
    grid-template-columns: 1fr;
  }
}

.field input:focus,
.field textarea:focus,
.login-card .text-input:focus {
  outline: 2px solid var(--primary-color-opacity-35, rgba(49, 130, 206, 0.35));
  border-color: var(--primary-color, #3182ce);
}

.login-error {
  color: var(--warning-red, #b91c1c);
  font-size: 0.9rem;
  margin: 0 0 12px;
}

.login-submit {
  width: 100%;
  border: none;
  border-radius: var(--radius, 10px);
  background: var(--primary-color, #3182ce);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 16px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

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

.login-submit:not(:disabled):hover {
  background: var(--primary-color-2, #2c5282);
}

.login-footer-links {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--color-text-secondary, #64748b);
}

.primary-link {
  color: var(--primary-color, #3182ce);
  font-weight: 650;
  text-decoration: none;
}

.primary-link:hover {
  text-decoration: underline;
}

.mfa-qr {
  width: 11rem;
  height: 11rem;
  display: block;
  margin: 0 auto 12px;
  border-radius: var(--radius, 10px);
  background: #fff;
}

.mfa-secret-label {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.mfa-secret-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 16px;
}

.mfa-secret {
  display: block;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  word-break: break-all;
  background: #f7fafc;
  border: 1px solid #cbd5e0;
  border-radius: var(--radius, 10px);
}

.mfa-secret-copy {
  flex-shrink: 0;
  min-width: 4.5rem;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--primary-color, #3182ce);
  border-radius: var(--radius, 10px);
  background: #fff;
  color: var(--primary-color, #3182ce);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.login-back {
  width: 100%;
  margin-top: 12px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary, #64748b);
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
}

.login-linkish {
  margin-top: 8px;
  border: none;
  background: transparent;
  color: var(--primary-color, #3182ce);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

/* —— Desktop: Customer Web split —— */
@media (min-width: 861px) {
  .login-layout--company {
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--color-bg, #f5f7fa);
  }

  .login-layout--company .login-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(520px, 1fr);
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    background:
      radial-gradient(
        ellipse 70% 55% at 18% 12%,
        color-mix(in srgb, var(--primary-color) 28%, #1a365d),
        transparent 55%
      ),
      linear-gradient(160deg, #0b2540 0%, #132a4a 48%, #1a365d 100%);
  }

  .login-layout--company .login-showcase {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    padding: 28px 28px 18px 36px;
    color: #fff;
  }

  .login-hero-photo {
    position: absolute;
    inset: 0 0 0 28%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
  }

  .login-hero-glow {
    position: absolute;
    inset: 10% 5% 15% 10%;
    border-radius: 40% 60% 50% 50%;
    background:
      radial-gradient(
        circle at 40% 40%,
        color-mix(in srgb, var(--primary-color) 45%, transparent),
        transparent 70%
      ),
      radial-gradient(
        circle at 70% 60%,
        rgba(99, 179, 237, 0.35),
        transparent 65%
      );
    filter: blur(8px);
  }

  .login-hero-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(
        90deg,
        #0b2540 0%,
        rgba(11, 37, 64, 0.55) 28%,
        rgba(11, 37, 64, 0.12) 58%,
        transparent 100%
      ),
      linear-gradient(
        180deg,
        rgba(11, 37, 64, 0.35) 0%,
        transparent 22%,
        transparent 72%,
        rgba(11, 37, 64, 0.55) 100%
      );
  }

  .login-hero-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-bottom: 28px;
  }

  .login-hero-brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
  }

  .login-hero-brand strong {
    display: block;
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.02em;
  }

  .login-hero-brand span {
    display: block;
    font-size: 13px;
    opacity: 0.78;
    margin-top: 2px;
  }

  .login-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 34rem;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding-bottom: 12px;
  }

  .login-hero-copy h2 {
    margin: 0;
    font-size: clamp(26px, 3.2vw, 40px);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.03em;
    max-width: 18ch;
  }

  .login-hero-highlight {
    color: color-mix(in srgb, var(--primary-color) 88%, #fff);
  }

  .login-hero-copy p {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    opacity: 0.82;
    max-width: 38ch;
  }

  .login-hero-benefits {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .login-hero-benefits li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 650;
    opacity: 0.92;
  }

  .login-hero-benefits .material-symbols-outlined,
  .login-hero-services .material-symbols-outlined,
  .login-hero-foot .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
  }

  .login-hero-services {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-width: 28rem;
  }

  .login-hero-services li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 58px;
    padding: 8px 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 650;
    text-align: center;
    line-height: 1.2;
  }

  .login-hero-services li.is-more {
    background: color-mix(in srgb, var(--primary-color) 22%, transparent);
    border-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
  }

  .login-hero-foot {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 12px;
    opacity: 0.82;
    flex-shrink: 0;
    padding-top: 12px;
  }

  .login-hero-foot span,
  .login-hero-foot a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
  }

  .login-hero-foot a:hover {
    text-decoration: underline;
  }

  .login-layout--company .auth-screen {
    box-sizing: border-box;
    max-width: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    background: linear-gradient(
      180deg,
      color-mix(in srgb, #0b2540 92%, #fff) 0%,
      #0f2a45 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 40px;
    position: relative;
    z-index: 3;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .login-layout--company .login-auth-stack {
    width: min(100%, 560px);
    height: calc(100dvh - 56px);
    max-height: calc(100dvh - 56px);
    display: flex;
    flex-direction: column;
    margin: 0;
  }

  .login-layout--company .auth-scroll.login-card {
    width: 100%;
    height: 100%;
    max-height: calc(100dvh - 56px);
    margin: 0;
    padding: 28px 36px 32px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 24px;
    /* Opaque crystal on dark auth pane */
    background:
      linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(255, 255, 255, 0.88) 42%,
        rgba(241, 248, 255, 0.9) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.95) inset,
      0 0 0 1px rgba(255, 255, 255, 0.12),
      0 18px 48px rgba(0, 0, 0, 0.32),
      0 40px 90px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
  }

  .login-layout--solo {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: auto;
  }
}
.emp-landing {
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 12% -8%, #dbeafe 0%, transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: #0f172a;
}

.emp-landing__nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.emp-landing__nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.emp-landing__nav-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.emp-landing__nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.emp-landing__hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px 32px;
  text-align: center;
}

.emp-landing__eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 750;
  color: #64748b;
}

.emp-landing__hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.emp-landing__lead {
  margin: 14px auto 0;
  max-width: 36rem;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.55;
}

.emp-landing__hero-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.emp-landing__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.emp-landing__cta--lg {
  min-height: 48px;
  padding: 0 22px;
}

.emp-landing__ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-weight: 650;
  text-decoration: none;
}

.emp-landing__ghost--lg {
  min-height: 48px;
  padding: 0 20px;
}

.emp-landing__pillars {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.emp-landing__pillars li {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 0.85rem;
  font-weight: 650;
  color: #334155;
}

.emp-landing__section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 12px;
}

.emp-landing__section h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.emp-landing__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.emp-landing__feature {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
}

.emp-landing__feature .material-symbols-outlined {
  color: #1d4ed8;
  font-size: 1.6rem;
}

.emp-landing__feature h3 {
  margin: 8px 0 6px;
  font-size: 1rem;
}

.emp-landing__feature p {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
  font-size: 0.92rem;
}

.emp-landing__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.emp-landing__steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 650;
}

.emp-landing__step-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.emp-landing__section--cta {
  text-align: center;
  padding-bottom: 40px;
}

.emp-landing__section--cta p {
  color: #64748b;
  margin: 0 0 16px;
}

.emp-landing__foot {
  border-top: 1px solid #e2e8f0;
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .emp-landing__nav-brand span {
    display: none;
  }
}
.plat-shell {
  min-height: 100dvh;
  background: #f8fafc;
  color: #0f172a;
}

/* Shared content column — keeps header brand flush with page titles */
.plat-nav__inner,
.plat-main {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

.plat-nav {
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 1px solid #1e293b;
}

.plat-nav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.plat-nav__brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.plat-nav__brand strong {
  font-size: 0.95rem;
  line-height: 1.2;
  color: #f8fafc;
}

.plat-nav__brand span {
  font-size: 0.75rem;
  line-height: 1.2;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(420px, 100%);
}

.plat-nav__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.plat-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.plat-nav__links a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.9rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  box-sizing: border-box;
}

.plat-nav__links a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.plat-nav__links a.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.plat-nav__signout {
  border: 1px solid #475569;
  background: transparent;
  color: #e2e8f0;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 12px;
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.plat-nav__signout:hover {
  background: rgba(255, 255, 255, 0.08);
}

.plat-main {
  padding-top: 24px;
  padding-bottom: 48px;
}

.plat-page h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.plat-page__lead {
  margin: 0 0 18px;
  color: #64748b;
}

.plat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.plat-card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.plat-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.plat-card__head h2 {
  margin: 0;
}

.plat-card--edit {
  border-color: #99f6e4;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.plat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.plat-tab {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  color: #334155;
}

.plat-tab--active {
  background: #0f172a;
  border-color: #0f172a;
  color: #f8fafc;
}

.plat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plat-btn {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.plat-btn--primary {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.plat-btn--danger {
  background: #fff;
  border-color: #fecaca;
  color: #b91c1c;
}

.plat-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.plat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.plat-table th,
.plat-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.plat-table th {
  color: #64748b;
  font-weight: 650;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plat-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #334155;
}

.plat-badge--invited,
.plat-badge--approved,
.plat-badge--activation_pending {
  background: #d1fae5;
  color: #065f46;
}

.plat-badge--active {
  background: #dbeafe;
  color: #1e40af;
}

.plat-badge--approved {
  background: #d1fae5;
  color: #065f46;
}

.plat-badge--disabled,
.plat-badge--rejected,
.plat-badge--deactivated {
  background: #fee2e2;
  color: #991b1b;
}

.plat-badge--pending,
.plat-badge--no-owner {
  background: #fef3c7;
  color: #92400e;
}

.plat-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
}

.plat-toast {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  word-break: break-word;
}

.plat-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
}

.plat-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 650;
}

.plat-form input,
.plat-form textarea,
.plat-form select {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-weight: 500;
}

.plat-form textarea {
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}

.plat-muted {
  color: #64748b;
  font-size: 0.85rem;
}

.plat-docs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plat-docs a {
  color: #0f766e;
  font-weight: 600;
}

.plat-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  .plat-nav__inner {
    align-items: flex-start;
  }

  .plat-nav__end {
    width: 100%;
    justify-content: space-between;
  }

  .plat-grid-2 {
    grid-template-columns: 1fr;
  }

  .plat-table {
    display: block;
    overflow-x: auto;
  }

  .plat-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .plat-actions .plat-btn {
    width: 100%;
  }
}
