/* Sales Hunter user management + shell chooser.
   Brand: SH / #FFCC00 / #F5B700. No role chips. */

#sec-users,
#sec-chooser {
  background: #F4F6F9;
  margin: -24px -30px -36px;
  padding: 24px 30px 36px;
  min-height: calc(100vh - 48px);
  color: #101828;
}
body:has(#sec-users.show) .portal-main > .topbar,
body:has(#sec-chooser.show) .portal-main > .topbar { display: none; }
body.pm-lock-admin [data-needs-shell="admin"],
body.pm-chooser-on [data-needs-shell="admin"] { display: none !important; }
#pmShellNav[hidden] { display: none !important; }
#pmShellNav .nav-item { cursor: pointer; width: calc(100% - 8px); }

.ws-switcher {
  display: inline-flex;
  background: #F2F4F7;
  border: 1px solid #E4E7EC;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.ws-switcher button {
  border: none;
  background: transparent;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.ws-switcher button.active {
  background: #FFCC00;
  color: #101828;
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
}

.pm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #E4E9F2;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 6px 20px rgba(16,24,40,.04);
}
.pm-kicker {
  font-size: 11px;
  font-weight: 850;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pm-kicker-sub { font-size: 13px; font-weight: 750; color: #101828; margin-top: 2px; }
.pm-kicker-sub a { color: #667085; text-decoration: none; }
.pm-kicker-sub a:hover { color: #101828; }
.pm-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #667085; }
.pm-api {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  background: #F8FAFC;
  border: 1px solid #E4E7EC;
  border-radius: 999px;
  padding: 4px 8px;
  color: #344054;
}

.pm-hdr { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pm-title { font-size: 26px; font-weight: 900; color: #101828; line-height: 1.1; }
.pm-sub { font-size: 13px; color: #667085; margin-top: 6px; max-width: 760px; line-height: 1.45; }

.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  min-height: 34px;
  text-decoration: none;
}
.pm-btn:disabled { opacity: .6; cursor: not-allowed; }
.pm-btn-gold { background: #FFCC00; color: #101828; border-color: #F5B700; }
.pm-btn-gold:hover:not(:disabled) { filter: brightness(.97); }
.pm-btn-ghost { background: #fff; color: #344054; border-color: #D0D5DD; }
.pm-btn-secondary { background: #EEF2F7; color: #344054; border-color: #D9E0EA; }
.pm-btn-sm { padding: 6px 12px; font-size: 12px; min-height: 30px; }

.pm-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pm-tab {
  border: 1px solid #E4E7EC;
  background: #fff;
  color: #475467;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.pm-tab.active { background: #101828; color: #fff; border-color: #101828; }
.pm-tab .count {
  display: inline-flex;
  margin-left: 6px;
  background: #FFCC00;
  color: #101828;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 11px;
  line-height: 18px;
}
.pm-tab.active .count { background: #FFCC00; }

.pm-card {
  background: #fff;
  border: 1px solid #E4E9F2;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(16,24,40,.06);
}
.pm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #EEF2F7;
  flex-wrap: wrap;
}
.pm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  background: #fff;
  border: 1px solid #E4E7EC;
  border-radius: 10px;
  padding: 8px 12px;
}
.pm-search input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 13px;
  font-family: inherit;
  color: #101828;
  background: transparent;
}
.pm-table-wrap { overflow-x: auto; }
.pm-table { width: 100%; border-collapse: collapse; }
.pm-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: #667085;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid #E4E7EC;
}
.pm-table td {
  padding: 12px 14px;
  font-size: 13px;
  color: #344054;
  border-bottom: 1px solid #F2F4F7;
  vertical-align: middle;
}
.pm-table tr:last-child td { border-bottom: none; }
.pm-table tbody tr:hover td { background: #FFFEF5; }
.pm-empty { text-align: center; padding: 28px 16px; color: #667085; }

.pm-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.pm-pill-pending { background: #FFFAEB; color: #B54708; }
.pm-pill-invited { background: #EEF4FF; color: #3538CD; }
.pm-pill-rejected { background: #FEF3F2; color: #B42318; }
.pm-pill-active { background: #ECFDF3; color: #067647; }
.pm-mod {
  display: inline-flex;
  align-items: center;
  margin: 0 4px 4px 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.pm-mod-admin { background: #F2F4F7; color: #344054; }
.pm-mod-business { background: #EEF4FF; color: #3538CD; }
.pm-mod-agent { background: #ECFDF3; color: #067647; }
.pm-path { font-size: 10px; color: #98A2B3; font-weight: 700; }

.pm-banner {
  background: #FFFAEB;
  border: 1px solid #FEDF89;
  color: #B54708;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
}
.pm-banner strong { color: #93370D; }

.pm-form { padding: 18px 18px 16px; max-width: 760px; }
.pm-field { margin-bottom: 14px; }
.pm-lbl { display: block; font-size: 12px; font-weight: 800; color: #344054; margin-bottom: 6px; }
.pm-req { color: #B54708; }
.pm-form input[type="text"],
.pm-form input[type="email"],
.pm-form input[type="search"],
.pm-form select,
.pm-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #D0D5DD;
  border-radius: 10px;
  font-size: 14px;
  color: #101828;
  background: #fff;
  font-family: inherit;
  outline: none;
}
.pm-form input:focus,
.pm-form select:focus,
.pm-form textarea:focus { border-color: #F5B700; box-shadow: 0 0 0 3px rgba(255,204,0,.28); }
.pm-form input:disabled { background: #F2F4F7; color: #667085; }
.pm-hint { font-size: 12px; color: #667085; margin-top: 6px; line-height: 1.4; }
.pm-hint code, .pm-claim code { font-size: 11px; }

.pm-box {
  border: 1px solid #E4E7EC;
  border-radius: 12px;
  padding: 12px;
  background: #FCFCFD;
}
.pm-box-title {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #667085;
  margin-bottom: 10px;
}
.pm-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #E4E7EC;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.pm-check.checked { border-color: #F5B700; background: #FFFBEB; box-shadow: inset 0 0 0 1px #F5B700; }
.pm-check input { margin-top: 3px; accent-color: #F5B700; }
.pm-mod-name { font-weight: 850; color: #101828; font-size: 14px; }
.pm-mod-desc { font-size: 12px; color: #667085; margin-top: 2px; line-height: 1.4; }
.pm-mod-claim {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: #475467;
  background: #F2F4F7;
  border-radius: 6px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pm-tenant {
  border: 1px dashed #F5B700;
  background: #FFFBEB;
  border-radius: 10px;
  padding: 12px;
  margin: 4px 0 8px;
}
.pm-tenant-title { font-size: 13px; font-weight: 850; color: #B54708; margin-bottom: 8px; }
.pm-lead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #E4E7EC;
  margin-top: 4px;
}
.pm-lead-lbl { font-size: 13px; font-weight: 800; color: #101828; }
.pm-lead-hint { font-size: 11px; color: #667085; margin-top: 2px; }

.pm-claim {
  margin-top: 12px;
  background: #101828;
  color: #E5E7EB;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}
.pm-claim .ck { color: #FFCC00; display: block; margin-bottom: 6px; }

.pm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pm-error { color: #B42318; font-size: 12px; font-weight: 700; margin-top: 6px; }

.pm-pending {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.pm-pending h3 { margin: 0 0 4px; font-size: 16px; }
.pm-pending p { margin: 0; font-size: 13px; color: #667085; line-height: 1.45; }

.pm-section-title { font-size: 18px; font-weight: 900; margin: 22px 0 6px; color: #101828; }

.pm-chooser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.pm-choice { padding: 18px; }
.pm-choice h3 { margin: 10px 0 6px; font-size: 16px; }
.pm-choice p { margin: 0 0 14px; font-size: 13px; color: #667085; line-height: 1.45; }
.pm-ico {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: #101828;
}
.pm-ico-admin { background: #F2F4F7; }
.pm-ico-business { background: #EEF4FF; color: #3538CD; }
.pm-ico-agent { background: #ECFDF3; color: #067647; }
.pm-choice-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.pm-inline { display: flex; gap: 8px; align-items: center; }
.pm-inline input { flex: 1; }

@media (max-width: 860px) {
  #sec-users, #sec-chooser { margin: -16px -16px -36px; padding: 16px; }
  .pm-title { font-size: 22px; }
}

/* Standalone business / agent shell pages */
body.pm-shell-page {
  margin: 0;
  min-height: 100vh;
  background: #F4F6F9;
  color: #101828;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
body.pm-shell-page #pmShell { display: flex; min-height: 100vh; }
body.pm-shell-page .pm-side {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #111827 0%, #172033 58%, #101828 100%);
  color: #F9FAFB;
  display: flex;
  flex-direction: column;
}
body.pm-shell-page .pm-side-brand { display: flex; gap: 10px; align-items: center; padding: 22px 18px 16px; }
body.pm-shell-page .pm-mark {
  width: 42px; height: 42px; border-radius: 8px; background: #F5B700; color: #101828;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px;
}
body.pm-shell-page .pm-side nav { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
body.pm-shell-page .pm-side button,
body.pm-shell-page .pm-side a.pm-nav {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left; border: none; cursor: pointer;
  background: transparent; color: #D0D5DD; border-radius: 8px;
  padding: 10px 12px; font-size: 13px; font-weight: 700; font-family: inherit;
  text-decoration: none;
}
body.pm-shell-page .pm-side button.active,
body.pm-shell-page .pm-side a.pm-nav.active { background: #F5B700; color: #101828; }
body.pm-shell-page .pm-side-foot { margin-top: auto; padding: 14px 16px 18px; font-size: 12px; color: #98A2B3; }
body.pm-shell-page .pm-main { flex: 1; min-width: 0; padding: 24px 30px 36px; }
body.pm-shell-page .pm-rows { width: 100%; border-collapse: collapse; }
body.pm-shell-page .pm-rows th, body.pm-shell-page .pm-rows td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid #EEF2F7; font-size: 13px;
}
body.pm-shell-page .pm-rows th { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: #667085; }
