/* Permission-scoped Business and Agent surfaces.
   Scoped so the admin Communication hub styles stay untouched. */

[data-shell][hidden] { display: none !important; }

body[data-portal-shell="business"] .portal-main > .topbar,
body[data-portal-shell="agent"] .portal-main > .topbar {
  display: none;
}

.sh-persona .sec-hdr { display: block; }
.sh-persona .sec-sub { line-height: 1.45; }
.sh-persona .card.pad-0 { padding: 0; overflow: hidden; }

.sh-persona .sh-kicker {
  font-size: 11px; font-weight: 850; color: #534434;
  text-transform: uppercase; letter-spacing: .08em;
}
.sh-persona .sh-top-title {
  font-size: 13px; font-weight: 750; color: #0b1c30; margin-top: 2px;
}
.sh-persona .sample-chip,
.sh-persona .biz-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
}
.sh-persona .sample-chip { background: #fff6e0; color: #904d00; border: 1px solid #fde3b0; }
.sh-persona .biz-chip { background: #eff4ff; color: #565e74; border: 1px solid #dce9ff; }

.sh-persona .kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px;
}
.sh-persona .kpi { padding: 14px 16px; }
.sh-persona .kpi-lbl {
  font-size: 11px; font-weight: 800; color: #534434;
  text-transform: uppercase; letter-spacing: .06em;
}
.sh-persona .kpi-val { font-size: 26px; font-weight: 900; color: #0b1c30; margin-top: 4px; line-height: 1.1; }
.sh-persona .kpi-note { font-size: 11px; color: #867461; margin-top: 4px; }

.sh-persona .mod-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 16px;
}
.sh-persona .mod-card h3 { font-size: 15px; font-weight: 850; margin-bottom: 6px; }
.sh-persona .mod-card p { font-size: 12px; color: #534434; line-height: 1.45; margin-bottom: 12px; }
.sh-persona .mod-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.sh-persona .btn-gold {
  background: #f59e0b; color: #fff; border: none; border-radius: 8px; font-weight: 700;
}
.sh-persona .btn-gold:hover { filter: brightness(0.97); }
.sh-persona .btn-gold:disabled { opacity: .55; cursor: default; filter: none; }

.sh-persona .pill {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 6px; font-size: 10px; font-weight: 800; border: 1px solid transparent;
}
.sh-persona .pill-ok { background: #ECFDF3; color: #067647; border-color: #ecfdf3; }
.sh-persona .pill-warn { background: #fff6e0; color: #904d00; border-color: #fde3b0; }
.sh-persona .pill-info { background: #eff4ff; color: #565e74; border-color: #dce9ff; }

.sh-persona .table-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid #e5eeff; flex-wrap: wrap;
}
.sh-persona .search { flex: 1; min-width: 180px; position: relative; }
.sh-persona .search input {
  width: 100%; padding: 8px 12px 8px 32px; border: 1px solid #d8c3ad;
  border-radius: 8px; font-size: 13px; font-family: inherit; color: #0b1c30; background: #fff;
}
.sh-persona .search input:focus { outline: none; border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.sh-persona .search .ico {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: #867461; font-size: 13px; pointer-events: none;
}
.sh-persona table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
.sh-persona table.data th {
  text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 800;
  color: #534434; text-transform: uppercase; letter-spacing: .06em;
  background: #f8f9ff; border-bottom: 1px solid #e5eeff;
}
.sh-persona table.data td {
  padding: 12px 14px; border-bottom: 1px solid #eff4ff; color: #534434; vertical-align: middle;
}
.sh-persona table.data tr:last-child td { border-bottom: none; }
.sh-persona table.data tbody tr:hover td { background: #fff6e0; }
.sh-persona table.data tr.is-hidden { display: none; }

.sh-persona .inline-form {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 14px;
  border-bottom: 1px solid #e5eeff; background: #f8f9ff;
}
.sh-persona .inline-form[hidden] { display: none !important; }
.sh-persona .inline-form input {
  flex: 1; min-width: 140px; padding: 8px 10px; border: 1px solid #d8c3ad;
  border-radius: 8px; font-size: 13px; font-family: inherit;
}
.sh-persona .inline-form input:focus { outline: none; border-color: #f59e0b; }

.sh-persona .compose-grid {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 520px;
}
.sh-persona .cust-rail {
  border-right: 1px solid #e5eeff; background: #f8f9ff;
  display: flex; flex-direction: column; min-height: 0;
}
.sh-persona .cust-rail-head { padding: 14px; border-bottom: 1px solid #e5eeff; }
.sh-persona .cust-rail-head h3 { font-size: 13px; font-weight: 850; margin-bottom: 4px; }
.sh-persona .cust-rail-head p { font-size: 11px; color: #534434; line-height: 1.4; }
.sh-persona .cust-list { flex: 1; overflow-y: auto; }
.sh-persona .cust-row {
  display: flex; gap: 10px; padding: 11px 14px; border: none; border-bottom: 1px solid #eff4ff;
  align-items: center; cursor: pointer; background: #fff; width: 100%; text-align: left;
  font-family: inherit; border-left: 3px solid transparent;
}
.sh-persona .cust-row:hover,
.sh-persona .cust-row.selected { background: #fff6e0; }
.sh-persona .cust-row.selected { border-left-color: #f59e0b; }
.sh-persona .cust-av {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: #eff4ff; color: #565e74; font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.sh-persona .cust-name { font-size: 13px; font-weight: 800; color: #0b1c30; }
.sh-persona .cust-email { font-size: 11px; color: #534434; margin-top: 2px; }
.sh-persona .compose-pane { display: flex; flex-direction: column; background: #fff; padding: 18px 20px; }
.sh-persona .compose-pane .field { margin-bottom: 12px; }
.sh-persona .compose-pane label {
  display: block; font-size: 11px; font-weight: 800; color: #534434;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}
.sh-persona .compose-pane input,
.sh-persona .compose-pane textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d8c3ad; border-radius: 8px;
  font-size: 13px; font-family: inherit; color: #0b1c30; background: #fff;
}
.sh-persona .compose-pane textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.sh-persona .compose-pane input:focus,
.sh-persona .compose-pane textarea:focus {
  outline: none; border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.2);
}
.sh-persona .from-note {
  font-size: 11px; color: #534434; background: #f8f9ff; border: 1px dashed #d8c3ad;
  border-radius: 8px; padding: 8px 10px; margin-top: 6px; line-height: 1.4;
}
.sh-persona .from-note strong { color: #0b1c30; }
.sh-persona .compose-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

.sh-persona .mobile-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff;
  color: #0b1c30; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px;
  box-shadow: var(--sh-shadow);
}
.sh-persona .mobile-banner .mb-ico {
  width: 40px; height: 40px; border-radius: 10px; background: #f59e0b;
  color: #613b00; display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.sh-persona .mobile-banner .mb-body { flex: 1; min-width: 200px; }
.sh-persona .mobile-banner .mb-body strong { color: #0b1c30; display: block; font-size: 13px; margin-bottom: 2px; }
.sh-persona .mobile-banner .mb-body span { font-size: 12px; color: #534434; line-height: 1.4; }

.sh-persona .filter-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.sh-persona .filter-row .search { min-width: 220px; max-width: 320px; flex: 1; }
.sh-persona .terr-btn { background: #eff4ff; color: #534434; border: 1px solid #d8c3ad; }
.sh-persona .terr-btn.is-on { background: #f59e0b; color: #613b00; border-color: #f59e0b; }
.sh-persona .lead-card[hidden] { display: none !important; }

.sh-persona .lead-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px;
}
.sh-persona .lead-card { display: flex; flex-direction: column; gap: 10px; transition: box-shadow .15s, border-color .15s; }
.sh-persona .lead-card:hover { border-color: #f59e0b; box-shadow: var(--sh-shadow-lg); }
.sh-persona .lead-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sh-persona .lead-title { font-size: 15px; font-weight: 850; color: #0b1c30; }
.sh-persona .lead-price {
  font-size: 16px; font-weight: 800; color: #613b00; background: #f59e0b;
  padding: 4px 10px; border-radius: 999px; border: 1px solid #f59e0b; white-space: nowrap;
}
.sh-persona .lead-meta { font-size: 12px; color: #534434; line-height: 1.45; }
.sh-persona .lead-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-persona .lead-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.sh-persona .pitch-note {
  font-size: 13px; color: #534434; line-height: 1.5; margin-top: 8px;
}

@media (max-width: 980px) {
  .sh-persona .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .sh-persona .mod-grid,
  .sh-persona .compose-grid { grid-template-columns: 1fr; }
  .sh-persona .cust-rail { border-right: none; border-bottom: 1px solid #e5eeff; }
}
