/* NodoPin · Premium Refinado V3
   Refinamiento visual premium sobre la base funcional vigente. */
:root{
  --np3-panel:#15283a;
  --np3-surface:#122232;
  --np3-surface-2:#192d40;
  --np3-line:rgba(137,199,221,.16);
  --np3-line-strong:rgba(137,199,221,.24);
  --np3-text:#eef8fd;
  --np3-muted:#9bb8c9;
  --np3-cyan:#86e5ef;
  --np3-cyan-strong:#5fd7ec;
  --np3-aqua:#9be9d7;
  --np3-shadow:0 18px 45px rgba(1,8,16,.22);
}
.workspace{max-width:1880px}
.chatsLayout{border-radius:24px;overflow:hidden;box-shadow:0 20px 65px rgba(1,8,16,.16)}
.people{background:linear-gradient(180deg,rgba(18,34,48,.86),rgba(15,30,43,.84));border-right:1px solid var(--np3-line)}
.people input#searchContact{height:50px;border-radius:18px;border:1px solid var(--np3-line);background:rgba(7,19,29,.68);box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.peopleItem{display:grid!important;grid-template-columns:50px minmax(0,1fr);align-items:center;gap:13px!important;padding:16px 15px!important;margin:8px 0;border:1px solid transparent;border-radius:20px;background:linear-gradient(180deg,rgba(37,61,81,.26),rgba(26,46,64,.22));box-shadow:0 10px 28px rgba(0,0,0,.05);transition:transform .14s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease}
.peopleItem:hover{transform:translateY(-1px);border-color:rgba(125,210,225,.22);background:linear-gradient(180deg,rgba(40,69,91,.34),rgba(31,54,73,.28));box-shadow:0 14px 32px rgba(0,0,0,.08)}
.peopleItem.active{border-color:rgba(121,220,233,.45);background:linear-gradient(135deg,rgba(48,81,107,.62),rgba(33,58,79,.56));box-shadow:0 16px 36px rgba(7,18,29,.18),inset 0 1px 0 rgba(255,255,255,.04)}
.peopleItem .avatar{width:50px;height:50px;border-radius:16px;border:1px solid rgba(255,255,255,.05);box-shadow:0 8px 22px rgba(0,0,0,.15)}
.peopleItem>div{min-width:0;display:flex;flex-direction:column;gap:3px}
.peopleItem strong{font-size:14px;font-weight:760;letter-spacing:-.01em;color:var(--np3-text)}
.peopleItem span{font-size:12px;color:var(--np3-muted)}
.peopleItem .npv-title{margin-top:1px;font-size:12px;line-height:1.25;color:var(--np3-cyan);font-weight:720}
.npv-name-line{gap:7px!important;align-items:center!important}
.npv-badge{width:16px!important;height:16px!important;filter:drop-shadow(0 0 8px rgba(73,182,255,.28))}
.chatHead{background:linear-gradient(180deg,rgba(21,40,58,.96),rgba(19,36,52,.94))!important;box-shadow:inset 0 -1px 0 rgba(255,255,255,.03)}
.chatHead .contactHeadButton{gap:14px!important;padding:4px 8px!important;border-radius:16px!important}
.chatHead .contactHeadButton .avatar{width:48px!important;height:48px!important;min-width:48px!important;border-radius:16px!important;box-shadow:0 10px 24px rgba(0,0,0,.16)}
.chatHead .contactHeadButton>span:last-child{gap:4px!important}
.chatHead #chatTitle{display:flex!important;align-items:center;gap:8px;min-width:0;font-size:16px!important;font-weight:780;letter-spacing:-.02em}
.chatHead #chatTitle .npv-name-line{gap:8px!important}
.chatHead #chatTitle .npv-badge{width:17px!important;height:17px!important}
.chatHead #chatMeta{font-size:11px!important;color:#a9c5d5!important;letter-spacing:.01em}
.chatHead .np2-security-label{padding:9px 13px!important;font-size:11px!important;background:rgba(45,115,106,.18);border:1px solid rgba(129,233,208,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.chatHead #verifyKeyBtn{min-width:98px!important;border-radius:13px!important;border:1px solid rgba(130,188,212,.18)!important;background:rgba(30,54,73,.88)!important;box-shadow:none!important}
.chatHead #verifyKeyBtn:hover{background:rgba(39,67,91,.98)!important}
.messages{background:radial-gradient(circle at 76% 14%, rgba(54,136,168,.08), transparent 28%),linear-gradient(180deg,#0d1b28,#102030)!important;padding:24px clamp(20px,2.6vw,34px) 18px!important;gap:12px!important}
.bubble{position:relative;max-width:min(76%,580px)!important;padding:12px 15px!important;border-radius:18px 18px 18px 8px!important;background:linear-gradient(180deg,rgba(47,69,88,.95),rgba(39,60,78,.95));border:1px solid rgba(152,201,221,.08);box-shadow:0 12px 32px rgba(4,10,17,.12);line-height:1.5}
.bubble.mine{border-radius:18px 18px 8px 18px!important;background:linear-gradient(180deg,rgba(24,98,118,.98),rgba(20,84,103,.98));border-color:rgba(138,226,239,.12);box-shadow:0 12px 34px rgba(2,21,31,.18)}
.bubble small{display:block;margin-top:6px;font-size:10.5px;letter-spacing:.01em;color:#c4d6e0}
.bubble button.quiet,.bubble a{display:inline-flex;align-items:center;justify-content:flex-start;gap:10px;min-height:42px;padding:10px 14px;border-radius:14px;border:1px solid rgba(143,200,220,.16);background:rgba(9,21,31,.22);color:var(--np3-text);text-decoration:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.02)}
.bubble button.quiet:hover,.bubble a:hover{background:rgba(15,30,43,.34)}
.bubble audio,.bubble video,.bubble img{display:block;margin-top:10px;border-radius:16px;overflow:hidden;border:1px solid rgba(151,203,222,.12);box-shadow:0 10px 25px rgba(0,0,0,.12)}
.bubble.np3-voice-bubble{padding:14px 16px!important}
.bubble.np3-voice-bubble button.quiet,.bubble.np3-voice-bubble audio{width:min(100%,290px)}
.bubble.np3-media-bubble:not(.mine){background:linear-gradient(180deg,rgba(42,67,86,.96),rgba(34,55,71,.96))}
.bubble.np3-pending{border-style:dashed;color:#d6e4eb}
.composer{position:relative;background:linear-gradient(180deg,rgba(20,39,57,.98),rgba(17,33,47,.98))!important;border-top:1px solid rgba(255,255,255,.03);padding:12px 14px 14px!important;gap:8px!important}
.composer .icon-btn{background:rgba(13,28,41,.78)!important;border:1px solid rgba(148,205,225,.15)!important;color:#d6ebf5!important;border-radius:14px!important;box-shadow:none!important;transition:transform .14s ease,background .14s ease,border-color .14s ease,color .14s ease}
.composer .icon-btn:hover{transform:translateY(-1px);background:rgba(18,36,53,.98)!important;border-color:rgba(132,213,228,.26)!important;color:#fff!important}
.composer textarea{background:#0c1d2b!important;border:1px solid rgba(146,203,223,.14)!important;border-radius:16px!important;color:var(--np3-text)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.02);padding:11px 14px!important}
.composer textarea::placeholder{color:#7e9caf}
.composer #sendBtn{min-width:112px!important;border-radius:16px!important;background:linear-gradient(135deg,#93d8ff,#6fdce8)!important;color:#123246!important;font-weight:800;letter-spacing:-.01em;box-shadow:0 10px 24px rgba(79,184,224,.22)!important}
.composer[data-mode="record"] #sendBtn{display:none!important}
.composer[data-mode="record"] #recordBtn{background:linear-gradient(135deg,#70dce8,#95ecf5)!important;color:#143444!important;border-color:transparent!important;box-shadow:0 10px 24px rgba(108,224,241,.2)!important}
.composer[data-mode="send"] #recordBtn{background:rgba(13,28,41,.78)!important;color:#d6ebf5!important;border-color:rgba(148,205,225,.15)!important;box-shadow:none!important}
.composer .icon-btn .np3-label{display:none}
.chatHint{padding:0 16px 12px!important;color:#90aabd;font-size:10px;letter-spacing:.02em}
.contactDialog{backdrop-filter:blur(14px)}
.contactDialogInner{border:1px solid rgba(146,204,223,.16)!important;border-radius:24px!important;background:linear-gradient(180deg,#162a3c,#122232)!important;box-shadow:0 28px 70px rgba(2,9,18,.35)!important}
.contactDialogTop{align-items:center!important;gap:14px!important}
.contactDialogTop .avatar{width:68px!important;height:68px!important;border-radius:20px!important;box-shadow:0 14px 32px rgba(0,0,0,.18)}
#contactCardName{font-size:22px!important;letter-spacing:-.025em}
#contactCardPresence{color:#a9c5d5!important}
.contactDialogInner code{font-size:13px;word-break:break-all}
.contactDialogTop .npv-title{font-size:12px!important;font-weight:750;color:#89dfef}
@media (max-width:1024px){.peopleItem{padding:14px 13px!important}.chatHead{padding:9px 12px!important}.chatHead #chatTitle{font-size:15px!important}.bubble{max-width:82%!important}}
@media (max-width:720px){.peopleItem{min-width:180px;border-radius:18px;padding:13px 12px!important}.peopleItem .avatar{width:46px;height:46px;border-radius:15px}.npv-badge{width:15px!important;height:15px!important}.chatHead .contactHeadButton{gap:9px!important}.chatHead .contactHeadButton .avatar{width:38px!important;height:38px!important;min-width:38px!important;border-radius:13px!important}.chatHead #chatTitle{font-size:13.5px!important}.chatHead #chatMeta{font-size:10px!important}.messages{padding:14px 12px 12px!important;gap:10px!important}.bubble{max-width:88%!important;padding:10px 12px!important;border-radius:16px 16px 16px 7px!important}.bubble.mine{border-radius:16px 16px 7px 16px!important}.composer{padding:8px 8px 10px!important;gap:5px!important}.composer #sendBtn{min-width:72px!important;border-radius:14px!important}.contactDialogInner{border-radius:20px!important}}

/* V3.1: insignia en la misma línea, compositor coherente, audio accesible. */
.peopleItem > div:not(.avatar) > strong {
  display:block!important; min-width:0; width:100%; overflow:visible!important;
  white-space:normal!important; text-overflow:clip!important;
}
.peopleItem strong > .npv-name-line {
  display:inline-flex!important; flex-direction:row!important; flex-wrap:nowrap!important;
  align-items:center!important; justify-content:flex-start!important;
  width:100%!important; max-width:100%!important; min-width:0!important;
  gap:8px!important; margin:0!important; vertical-align:middle;
}
.peopleItem strong > .npv-name-line > .npv-name-text {
  display:inline-block!important; flex:0 1 auto!important; min-width:0!important;
  width:auto!important; max-width:calc(100% - 24px)!important;
  overflow:hidden!important; text-overflow:ellipsis!important; white-space:nowrap!important;
  margin:0!important; color:#e9f5fc!important; font-size:13px!important;
}
.peopleItem strong > .npv-name-line > .npv-badge {
  display:inline-block!important; position:static!important; flex:0 0 16px!important;
  width:16px!important;height:16px!important; margin:0!important; vertical-align:middle!important;
}
/* No rearme del grid del compositor: el campo y la acción deben ser contiguos. */
.composer {
  display:flex!important; flex-direction:row!important; flex-wrap:nowrap!important;
  align-items:center!important; gap:8px!important; min-width:0!important;
  padding:11px 13px!important; box-sizing:border-box;
}
.composer #emojiBtn,.composer #attachBtn,.composer #locationBtn {
  flex:0 0 42px!important; width:42px!important; min-width:42px!important;
  height:44px!important; min-height:44px!important; order:1!important;
}
.composer #chatInput {
  order:3!important; flex:1 1 90px!important; min-width:0!important; width:0!important;
  height:44px!important; min-height:44px!important; max-height:116px!important;
  margin:0!important; overflow-x:hidden!important; overflow-y:hidden!important;
  border-radius:15px!important; box-sizing:border-box;
}
.composer #recordBtn {
  order:5!important; flex:0 0 48px!important; min-width:48px!important; width:48px!important;
  height:46px!important; min-height:46px!important; padding:10px!important;
  border-radius:15px!important;
}
.composer #sendBtn {
  order:5!important; display:inline-flex!important; align-items:center!important; justify-content:center!important;
  gap:9px!important; flex:0 0 auto!important; width:116px!important; min-width:116px!important;
  min-height:46px!important; height:46px!important; padding:0 16px!important;
  border-radius:15px!important; white-space:nowrap!important;
  font-size:13px!important; letter-spacing:0!important;
  box-shadow:0 8px 22px rgba(80,190,226,.18)!important;
}
.composer #sendBtn .np3-label {display:inline!important;white-space:nowrap}
.composer #sendBtn svg {display:block!important;flex:none;width:17px;height:17px;stroke-width:2}
.composer[data-mode="record"] #recordBtn,
.composer.np3-recording #recordBtn {display:grid!important}
.composer[data-mode="record"] #sendBtn,
.composer.np3-recording #sendBtn {display:none!important}
.composer[data-mode="send"]:not(.np3-recording) #recordBtn {display:none!important}
.composer[data-mode="send"]:not(.np3-recording) #sendBtn {display:inline-flex!important}
.composer.np3-recording #chatInput {display:none!important}
.composer.np3-recording #emojiBtn,.composer.np3-recording #attachBtn,.composer.np3-recording #locationBtn {display:none!important}
.composer.np3-recording #recordBtn {
  background:linear-gradient(135deg,#fb7284,#f54e72)!important;
  border-color:rgba(255,168,182,.28)!important;color:white!important;
  box-shadow:0 9px 24px rgba(235,67,98,.28)!important;
}
.composer .np3-record-state {
  display:none; order:3; flex:1 1 auto; min-width:0; min-height:48px;
  align-items:center; gap:12px; padding:5px 12px;
  border:1px solid rgba(253,136,153,.3); border-radius:16px;
  background:linear-gradient(90deg,rgba(66,30,49,.42),rgba(17,37,51,.82));
  color:#ffe7e9; overflow:hidden;
}
.composer.np3-recording .np3-record-state {display:flex}
.np3-record-dot {width:9px;height:9px;border-radius:50%;flex:none;background:#fa637b;box-shadow:0 0 0 4px rgba(252,98,124,.13);animation:np3-glow 1.5s ease-in-out infinite}
.np3-record-label {white-space:nowrap;color:#ffbdc7;font-size:11px;font-weight:750;letter-spacing:.015em}
.np3-record-clock {white-space:nowrap;margin-left:auto;color:#fff1f4;font-variant-numeric:tabular-nums;font-size:13px;font-weight:800}
.np3-record-wave {display:flex;align-items:center;justify-content:center;height:28px;gap:3px;flex:1 1 auto;min-width:28px;max-width:160px}
.np3-record-wave i {display:block;width:3px;height:6px;flex:0 0 3px;border-radius:4px;background:#ff9cab;animation:np3-wave 1.05s ease-in-out infinite;animation-delay:calc(var(--i) * -0.13s)}
@keyframes np3-wave {0%,100%{height:5px;opacity:.45}45%{height:23px;opacity:1}65%{height:10px;opacity:.76}}
@keyframes np3-glow {0%,100%{opacity:.66}50%{opacity:1;box-shadow:0 0 0 6px rgba(252,98,124,.18)}}
/* Player web con control principal visible, progreso y duración: sin menú de 3 puntos. */
.bubble.np3-voice-bubble {width:min(348px,86%)!important; max-width:min(348px,86%)!important;min-width:0!important;padding:12px 14px!important}
.np3-audio-player {display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:18px 18px;align-items:center;column-gap:13px;row-gap:5px;width:100%;min-width:0;}
.np3-audio-player .np3-audio-btn {
  grid-column:1;grid-row:1/3;width:43px;height:43px;min-width:43px;min-height:43px;
  display:grid;place-items:center;border:0;border-radius:50%;padding:10px;
  background:linear-gradient(145deg,#8bdef0,#6cd2e7);color:#103344;cursor:pointer;
  box-shadow:0 6px 19px rgba(3,14,24,.18);
}
.np3-audio-btn:hover{filter:brightness(1.07)}
.np3-audio-btn svg{width:20px;height:20px;display:block;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;fill:none}
.np3-audio-btn svg.np3-triangle{fill:currentColor;stroke:none}
.np3-audio-player .np3-audio-caption{grid-column:2;grid-row:1;font-size:11px;color:#d7f4fa;letter-spacing:.02em;font-weight:720;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np3-audio-bottom{grid-column:2;grid-row:2;display:flex;align-items:center;gap:9px;min-width:0}
.np3-audio-bottom .np3-audio-progress{min-width:0;flex:1 1 auto;width:100%;height:5px;margin:0;padding:0;accent-color:#8fe8ef;cursor:pointer;border:0;box-shadow:none;}
.np3-audio-bottom .np3-audio-time{flex:none;white-space:nowrap;font-size:10px;color:#bcd6e3;font-variant-numeric:tabular-nums}
.np3-audio-player audio[hidden]{display:none!important}
@media(max-width:1024px){
  .composer{gap:6px!important}
  .composer #emojiBtn,.composer #attachBtn,.composer #locationBtn{flex-basis:38px!important;min-width:38px!important;width:38px!important;height:42px!important;min-height:42px!important}
  .composer #sendBtn{width:102px!important;min-width:102px!important}
  .composer #recordBtn{width:45px!important;min-width:45px!important;flex-basis:45px!important}
}
@media(max-width:720px){
  .composer{padding:8px 8px 10px!important;gap:5px!important}
  .composer #emojiBtn,.composer #attachBtn,.composer #locationBtn{flex-basis:33px!important;width:33px!important;min-width:33px!important;height:41px!important;min-height:41px!important;padding:6px!important}
  .composer #chatInput{flex-basis:66px!important;min-height:42px!important;height:42px!important;max-height:102px!important;font-size:16px!important;padding:10px!important}
  .composer #sendBtn{width:78px!important;min-width:78px!important;height:43px!important;min-height:43px!important;padding:0 8px!important;gap:4px!important;font-size:12px!important}
  .composer #sendBtn svg{width:14px;height:14px}
  .composer #recordBtn{width:43px!important;min-width:43px!important;flex-basis:43px!important;height:43px!important;min-height:43px!important}
  .np3-record-label{display:none}
  .np3-record-state{gap:8px!important;padding-inline:9px!important}
  .np3-record-wave{gap:2px!important}
  .np3-record-wave i{flex-basis:2px!important;width:2px!important}
  .bubble.np3-voice-bubble{width:min(320px,90%)!important;max-width:min(320px,90%)!important}
}
@media(max-width:390px){.composer #sendBtn{width:73px!important;min-width:73px!important}.composer #sendBtn svg{display:none!important}.np3-record-wave i:nth-child(n+10){display:none}}
@media(prefers-reduced-motion:reduce){.np3-record-wave i,.np3-record-dot{animation:none!important;height:11px}}
