/* People: avatars, profile card, profile page, Phone Directory, and Crew Chat extras. Teal #19D3C5, links #0a6f69. No purple. */
.pav { --pav-ring: #19D3C5; position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 50%; overflow: hidden; background: #e5e7eb; color: #334155; font-weight: 700; line-height: 1; vertical-align: middle; user-select: none; border: 1.5px solid var(--pav-ring); box-sizing: border-box; }
.pav-xs { width: 24px; height: 24px; font-size: 10px; } .pav-sm { width: 32px; height: 32px; font-size: 12px; } .pav-md { width: 44px; height: 44px; font-size: 15px; }
.pav-lg { width: 96px; height: 96px; font-size: 32px; } .pav-xl { width: 120px; height: 120px; font-size: 40px; }
.pav .pav-ini { text-shadow: none; } .pav-ini .ico { font-size: 1.1em; color: #334155; }
.pav-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: #fff; }
.pav.has-img .pav-ini { visibility: hidden; }
.pav-btn { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; border-radius: 50%; flex: 0 0 auto; display: inline-flex; }
.pav-btn:focus-visible, .me-avatar:focus-visible { outline: 3px solid #0a6f69; outline-offset: 2px; }
.me-avatar { display: inline-flex; border-radius: 50%; text-decoration: none; margin-left: 4px; flex: 0 0 auto; }
.me-avatar[hidden] { display: none; }
.me-avatar .pav { box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(10,22,40,.15); }
.pav-name { padding: 0; text-align: left; }
.team-pill-av.pav { width: 22px; height: 22px; font-size: 11px; margin-left: -4px; background: #e5e7eb; }
.who-tag .team-pill-av.pav { width: 20px; height: 20px; margin-left: 0; font-size: 10px; }
.team-pill.on .team-pill-av.pav .pav-ini { color: #334155; }
.mw-avatar.pav { width: 64px; height: 64px; font-size: 22px; } .mw-avatar.pav.sm, .pav.mw-avatar.sm { width: 44px; height: 44px; font-size: 15px; }

/* Profile card (modal and preview) */
.modal.pcard-modal { width: min(420px, 94vw); padding: 0; }
.modal.pcard-modal > .modal-actions { padding: 0 20px 18px; margin-top: 4px; flex-wrap: wrap; }
.pcard { position: relative; color: #1f2937; }
.pcard-av { margin: 20px 20px 0; display: inline-flex; line-height: 0; }
.pcard-body { padding: 12px 20px 18px; display: grid; gap: 8px; }
.pcard-name { font-size: 20px; font-weight: 700; margin: 0; overflow-wrap: anywhere; color: #1f2937; }
.pcard-sub { font-size: 14px; color: #4b5563; }
.pcard-tagline { font-weight: 600; color: #1f2937; }
.pcard-bio { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #1f2937; }
.pcard-label { font-size: 13px; font-weight: 600; color: #4b5563; margin-bottom: 4px; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard-tag { display: inline-flex; align-items: center; gap: 4px; background: #f3f4f6; color: #1f2937; border: 1px solid #e5e7eb; border-radius: 4px; padding: 3px 9px; font-size: 13px; font-weight: 500; }
.tag-x { background: none; border: 0; cursor: pointer; font-size: 16px; line-height: 1; color: #4b5563; padding: 0 0 0 2px; }
.pcard-list { margin: 6px 0 0; display: grid; gap: 6px; }
.pcard-row { display: grid; grid-template-columns: 5.5rem 1fr; gap: 10px; align-items: start; margin: 0; }
.pcard-row dt { margin: 0; font-size: 13px; font-weight: 600; color: #4b5563; }
.pcard-row dd { margin: 0; font-size: 14px; color: #1f2937; }

/* Crop */
.modal.crop-modal { width: min(360px, 94vw); text-align: center; }
.crop-stage { position: relative; width: 280px; height: 280px; margin: 10px auto; touch-action: none; }
.crop-canvas { width: 280px; height: 280px; display: block; cursor: grab; background: #fff; border-radius: 6px; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 200px rgba(10,22,40,.55); border: 2px solid #19D3C5; pointer-events: none; }
.crop-stage { overflow: hidden; border-radius: 6px; }
.modal .crop-zoom-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; } .modal .crop-zoom { padding: 0; border: 0; accent-color: #19D3C5; }

/* Profile page */
.pf-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.pf-preview { position: sticky; top: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding-bottom: 0; overflow: hidden; }
.pf-preview > .caption { padding: 10px 14px 8px; font-weight: 700; }
.pf-preview .pcard-av { margin: 14px 14px 0; } .pf-preview .pcard-body { padding: 10px 14px 14px; }
.pf-wrap { display: grid; gap: 16px; min-width: 0; }
.pf-sec .pf-h { font-size: 18px; margin: 0 0 4px; } .pf-sub { margin: 0 0 12px; }
.pf-h3 { font-size: 14px; margin: 16px 0 4px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.pf-photo-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; } .pf-photo-actions { min-width: 0; flex: 1 1 220px; }
.pf-field { margin: 10px 0 0; } .pf-field label { display: block; } .pf-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.pf-field input[type=text], .pf-field input[type=tel], .pf-field input[type=email], .pf-field input:not([type]), .pf-field select, .pf-field textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.pf-field input:disabled { background: #f3f2ee; color: var(--muted); }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .pf-grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.pf-count { text-align: right; margin-top: 2px; }
.pf-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pf-swatches { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.pf-sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; padding: 0; }
.pf-sw.on { box-shadow: 0 0 0 2px #1f2937; }
.pf-sw:focus-visible { outline: 3px solid #0a6f69; outline-offset: 3px; }
.pf-switch { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; cursor: pointer; } .pf-switch input { width: 20px; height: 20px; margin-top: 2px; accent-color: #19D3C5; flex: 0 0 auto; }
.pf-switch span { display: grid; gap: 2px; min-width: 0; }
.pf-lock { display: inline-flex; gap: 6px; align-items: center; background: #f3f2ee; border-radius: 999px; padding: 3px 10px; font-weight: 700; margin-bottom: 8px; }
.pf-ok { color: #1f2937; font-weight: 700; }
.pf-sec .actions { margin-top: 14px; }

/* Directory */
.dir-wrap { display: grid; gap: 14px; max-width: 900px; }
.dir-wrap .card { margin: 0; }
.dir-bar { display: grid; gap: 10px; }
.dir-search { width: 100%; font: inherit; padding: 11px 14px; border-radius: var(--radius-md); border: 1px solid var(--border); background: #fff; }
.dir-favonly { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; } .dir-favonly input { accent-color: #19D3C5; }
.dir-list { display: grid; gap: 10px; }
.dir-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; }
.dir-row .dir-edit { grid-column: auto; }
.dir-main { min-width: 0; display: grid; gap: 1px; overflow-wrap: anywhere; } .dir-phone { font-weight: 700; font-variant-numeric: tabular-nums; }
.dir-notes { white-space: pre-wrap; }
.dir-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dir-actions .btn { padding: 8px 12px; text-decoration: none; }
.dir-actions .btn.dir-call, .dir-actions .btn.dir-text { background: #fff; border-color: #d1d5db; color: #1f2937; }
.dir-actions .btn.dir-call .ico, .dir-actions .btn.dir-text .ico { color: #0a6f69; }
.dir-star { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: #8a7a2b; padding: 6px; min-width: 40px; min-height: 40px; }
.dir-star.on { color: #c58a00; }
.dir-star:focus-visible, .dir-edit:focus-visible { outline: 3px solid #0a6f69; border-radius: 6px; }
@media (max-width: 900px) { .pf-cols { grid-template-columns: 1fr; } .pf-preview { position: static; order: -1; } }
@media (max-width: 640px) {
  .pf-grid, .pf-grid3 { grid-template-columns: 1fr; }
  .dir-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .dir-row .dir-actions { grid-column: 1 / -1; order: 5; } .dir-row .dir-actions .btn { flex: 1 1 0; min-height: 44px; }
  .dir-row .dir-edit { grid-column: auto; }
}
.assigned-line { display: inline-flex; align-items: center; gap: 6px; } .assigned-av { margin-right: 2px; }
.tm-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; align-self: center; }
.tm-av { display: inline-flex; flex: 0 0 auto; }
.mw-hero .pav-btn .pav { width: 72px; height: 72px; font-size: 24px; }

/* Crew Chat extras */
.msg-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.chat-msg.mine .msg-meta { flex-direction: row-reverse; }
.msg-btns { display: flex; align-items: center; flex: 0 0 auto; }
.msg-react-btn { min-width: 28px; min-height: 28px; }
@media (hover: none) { .msg-react-btn { opacity: .75; min-width: 36px; min-height: 36px; } }
.msg-react-btn:focus-visible { outline: 2px solid #0a6f69; border-radius: 6px; opacity: 1; }
.msg-menu { display: flex; gap: 12px; margin-top: 2px; }
.chat-msg.mine .msg-menu { justify-content: flex-end; }
.msg-quote { display: grid; gap: 1px; width: 100%; text-align: left; font: inherit; font-size: 13px; cursor: pointer; background: rgba(10,22,40,.07); border: 0; border-left: 3px solid #19D3C5; border-radius: 8px; padding: 5px 8px; margin-bottom: 5px; color: inherit; }
.msg-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.chat-msg.mine .msg-quote { background: rgba(255,255,255,.16); }
.msg-quote:focus-visible { outline: 2px solid #0a6f69; }
.msg-flash > .msg-bubble-row .bubble { animation: msgflash 1.6s ease-out; }
@keyframes msgflash { 0%, 40% { box-shadow: 0 0 0 3px #19D3C5; } 100% { box-shadow: 0 0 0 0 rgba(25,211,197,0); } }
.msg-deleted-text { font-style: italic; opacity: .7; }
.msg-edited { opacity: .8; }
.msg-shout { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 6px 8px; background: #fff; color: #1f2937; border: 1px solid #d1d5db; border-left: 3px solid #19D3C5; border-radius: 10px; }
.chat-msg.mine .msg-shout { background: #fff; color: #1f2937; }
.msg-gif-wrap { margin: 0; } .msg-gif { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; }
.msg-voice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; background: #fff; color: #1f2937; border: 1px solid #19D3C5; border-radius: 999px; }
.msg-voice .caption { color: #1f2937; font-weight: 700; }
.msg-voice audio { height: 36px; max-width: 100%; min-width: 0; width: 240px; }
.chat-msg.mine .msg-voice { background: #fff; }
.msg-replybar { display: flex; align-items: center; gap: 8px; background: #e6faf8; border-left: 3px solid #19D3C5; border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }
.msg-replybar-text { flex: 1; min-width: 0; display: grid; } .msg-replybar-text .caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; margin: 4px 0; border: 1px solid #b6ece7; background: #f1fdfc; border-radius: 12px; }
.msg-rec[hidden] { display: none; }
.msg-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #E5604D; animation: recpulse 1s infinite; }
@keyframes recpulse { 50% { opacity: .3; } }
.msg-rec-clock { font-variant-numeric: tabular-nums; font-weight: 800; }
.msg-celebrate { align-self: center; max-width: 92%; display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #e6faf8, #fff8e1); border: 1px solid #b6ece7; border-radius: 16px; padding: 12px 18px; }
.msg-celebrate-ico { font-size: 28px; line-height: 1; } .msg-celebrate-text { display: grid; gap: 2px; font-weight: 700; }
.msg-searchbox { position: sticky; top: 0; z-index: 2; background: var(--bg, #f6f5f0); padding-bottom: 4px; }
.msg-search { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.msg-hit { width: 100%; text-align: left; font: inherit; cursor: pointer; } .msg-hit mark { background: #b6ece7; color: inherit; border-radius: 3px; padding: 0 1px; }
.msg-hit .msg-row-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gif-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; max-height: 50vh; overflow: auto; }
.gif-pick { border: 0; padding: 0; background: #eee; border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1; } .gif-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-pick:focus-visible { outline: 3px solid #0a6f69; }
.msg-tools { flex-wrap: wrap; }
@media (max-width: 640px) { .msg-item { max-width: 94%; } .msg-tools .btn { padding: 7px 9px; font-size: 13px; } .gif-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 900px) {
  .topbar { position: relative; }
  .me-avatar { position: absolute; right: 14px; top: 10px; margin: 0; z-index: 3; }
  .topbar h1 { padding-right: 44px; }
}
.dir-settings-h { font-size: 16px; margin: 0 0 2px; }
.pf-solo { position: static; max-width: 420px; } .pf-solo .pcard-av { margin: 20px 20px 0; } .pf-solo .pcard-body { padding: 12px 20px 16px; }
.btn[hidden] { display: none; }

.chat-msg.mine .msg-voice .caption { color: #1f2937; }
.chat-msg.mine .msg-gif-wrap .caption { color: #cfd8e3; }

/* Online status: green dot sits on the wrap so overflow:hidden on .pav does not clip it. */
.pav-wrap { position: relative; display: inline-flex; flex: 0 0 auto; line-height: 0; vertical-align: middle; }
.pav-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #15803d; border: 2px solid #fff; box-sizing: border-box; pointer-events: none; z-index: 2; }
.pav-wrap-lg .pav-dot, .pav-wrap-xl .pav-dot { width: 16px; height: 16px; border-width: 2px; }
.pav-wrap-md .pav-dot { width: 12px; height: 12px; }
.pav-seen { font-size: 13px; color: #64748b; margin-top: 1px; }
.pav-seen[hidden] { display: none; }

/* Directory: charcoal text, teal only as a small accent (underline / icon tint). Never teal text standing alone. */
.dir-tabs.tk-subtabs button, .dir-tabs.tk-subtabs button.on, .dir-tabs.tk-subtabs button.active {
  background: #fff;
  color: #1f2937;
  border-color: #d1d5db;
  font-weight: 700;
}
.dir-tabs.tk-subtabs button.on, .dir-tabs.tk-subtabs button.active {
  background: #fff;
  color: #1f2937;
  border-color: transparent;
  border-bottom: 2px solid #19D3C5;
  border-radius: 0;
}

.pf-ro { margin: 0; color: #1f2937; font-size: 16px; }
.pf-field select { color: #1f2937; }
