/* NodoPin · Premium Refinado V2 (01 Nov 2026)
   Presentación adaptable sobre la interfaz original. No modifica el cifrado. */
:root{--np2-bg:#0a1421;--np2-panel:#142434;--np2-surface:#182e40;--np2-line:rgba(151,203,222,.16);--np2-ink:#ecf6fc;--np2-muted:#9cb7c8;--np2-accent:#79dfe8;--np2-green:#77e6ce}
html{-webkit-text-size-adjust:100%;scroll-behavior:auto}
body{background:#091421;color:var(--np2-ink)}
button,a,input,textarea{-webkit-tap-highlight-color:transparent}
button{font-variant-ligatures:none}
.top{z-index:42;box-shadow:0 1px 0 rgba(255,255,255,.025)}
.top-actions{min-width:0;justify-content:flex-end}
.brand{min-width:0}.brand img{flex:none;object-fit:contain}
.brand strong{letter-spacing:-.055em}.brand small{letter-spacing:.14em}
.workspace{width:100%;max-width:1800px}
.sidebar{gap:0;min-width:0}
.profile{display:grid!important;grid-template-columns:46px minmax(0,1fr) 36px;align-items:center;flex-wrap:nowrap!important;gap:10px!important;padding:15px 12px!important;margin-bottom:24px!important;border-radius:16px}
.profile .avatar{grid-column:1;grid-row:1;width:46px;height:46px;object-fit:cover;overflow:hidden;border-radius:14px}
.profile>div:nth-child(2){grid-column:2;grid-row:1;min-width:0!important;flex:none!important}
.profile strong{font-size:14px!important;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:normal!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:2px 0!important}
.profile small{font-size:9px!important;color:#9ab7c8;letter-spacing:.09em}
.profile .profilePin{margin-top:3px;color:#9ed9e7}
.profile #selfFingerprint{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8ca9bb;font-size:9px}
.profile #copyPin{grid-column:3;grid-row:1;display:grid;place-items:center;height:36px!important;width:36px!important;min-width:36px!important;min-height:36px!important;padding:6px!important;margin:0!important;border-radius:11px}
.nav{gap:7px!important}
.nav button{width:100%;min-width:0;box-sizing:border-box;display:flex!important;align-items:center;justify-content:flex-start;gap:12px!important;text-align:left;min-height:50px;padding:11px 15px!important;letter-spacing:0;font-size:13px}
.nav .navIcon{display:grid!important;place-items:center;width:22px!important;min-width:22px!important;height:22px!important;margin:0!important;line-height:1}
.nav .navIcon svg{width:21px;height:21px;display:block;flex:none}
.nav button>span:not(.navIcon){line-height:1.2;min-width:0}
.nav button.active{background:linear-gradient(100deg,rgba(58,128,149,.29),rgba(50,92,120,.18));box-shadow:inset 3px 0 rgba(119,224,233,.9)}
.nav button:hover:not(.active){background:rgba(108,173,193,.085)}
.sidebarFooter{opacity:.84}
.mainPanel{min-width:0}
.chatsLayout{min-height:0!important;overflow:hidden}
.people,.conversation,#chatActive{min-height:0;min-width:0}
.people{scrollbar-width:thin}
.peopleList{min-width:0}
.peopleItem{border:1px solid transparent;min-width:0}
.peopleItem .avatar{overflow:hidden;flex:none;width:44px;height:44px;border-radius:14px}
.peopleItem>span,.peopleItem>div{min-width:0}
.peopleItem strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conversation{min-width:0;min-height:0}
.conversation #chatActive{min-height:0;height:100%;overflow:hidden}
.chatHead{position:relative;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;flex:none;height:76px!important;min-height:76px!important;max-height:76px!important;padding:10px 18px!important;background:#152a3b;border-bottom:1px solid var(--np2-line);z-index:1;overflow:hidden}
.chatHead .contactHeadButton{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;flex:1 1 auto!important;width:0!important;min-width:0!important;max-width:none!important;height:56px;min-height:56px;padding:5px 6px!important;border:0!important;outline-offset:2px;background:transparent!important;color:var(--np2-ink)!important;border-radius:12px!important;box-shadow:none!important;text-align:left!important;overflow:hidden;position:static!important;transform:none!important}
.chatHead .contactHeadButton:hover{background:rgba(111,202,219,.075)!important}
.chatHead .contactHeadButton>span:last-child{display:flex!important;flex:1;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-width:0;max-width:100%;width:auto;overflow:hidden}
.chatHead .contactHeadButton .avatar{flex:0 0 45px!important;width:45px!important;height:45px!important;min-width:45px!important;max-width:45px!important;overflow:hidden;display:grid;place-items:center;border-radius:14px!important}
.chatHead #chatTitle{display:block!important;width:100%;max-width:100%!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important;font-weight:750;font-size:15px!important;line-height:1.25!important;margin:0!important}
.chatHead #chatMeta{display:block!important;max-width:100%!important;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important;line-height:1.2!important;color:#a4c3d2!important;font-size:11px!important;margin:0!important}
.chatHead .np2-security-label{flex:0 0 auto;white-space:nowrap;display:inline-flex;gap:7px;align-items:center;color:#b4eadf;font-size:11px;font-weight:700;border:1px solid rgba(121,222,203,.19);border-radius:999px;background:rgba(44,104,103,.16);padding:8px 11px}
.chatHead .np2-security-label::before{content:'';display:inline-block;width:6px;height:6px;background:#82ead1;border-radius:50%}
.chatHead #verifyKeyBtn{flex:none!important;min-height:38px!important;min-width:90px;max-width:120px;white-space:nowrap;font-size:12px!important;padding:8px 13px!important;border-radius:11px}
.messages{min-height:0!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior-y:contain;overflow-anchor:none;scroll-behavior:auto!important;contain:layout style;display:flex;flex-direction:column;gap:10px!important;padding:20px clamp(16px,2.5vw,35px)!important}
.bubble{font-size:14px!important;line-height:1.5!important;max-width:min(78%,560px);padding:10px 14px!important;border-radius:17px 17px 17px 6px!important;box-shadow:0 2px 10px rgba(0,0,0,.095)!important;word-break:normal;overflow-wrap:anywhere}
.bubble.mine{border-radius:17px 17px 6px 17px!important;background:#145669;color:#effdff}
.bubble small{font-size:10px;line-height:1.25;margin-top:5px;color:#b6ceda}
.composer{flex:0 0 auto;min-width:0;align-items:center!important;gap:7px!important;padding:11px 13px!important;background:#132739;flex-wrap:nowrap!important}
.composer .icon-btn{display:grid!important;place-items:center;flex:0 0 40px!important;width:40px!important;height:42px!important;min-width:40px!important;min-height:42px!important;padding:9px!important;border-radius:11px!important;font-size:17px}
.composer .icon-btn svg,#copyPin svg,.np2-svg{width:20px;height:20px;display:block;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.composer textarea{min-width:0!important;flex:1 1 auto!important;width:auto!important;height:43px!important;min-height:43px!important;max-height:128px!important;resize:none;font-size:14px;line-height:1.45;padding:10px 12px!important}
.composer #sendBtn{flex:0 0 auto!important;min-height:43px!important;padding:10px 18px!important;box-shadow:none}
.chatHint{padding:0 12px 10px!important;min-height:22px;line-height:1.3;font-size:10px}
.sectionHeading{gap:14px!important}.sectionHeading h2{letter-spacing:-.045em}
/* The onboarding dialog is a focused card, not a full-screen slab. */
#welcomeGuide.welcomeDialog{box-sizing:border-box;width:min(565px,calc(100vw - 36px))!important;max-width:calc(100vw - 24px)!important;max-height:min(82dvh,715px)!important;margin:auto!important;padding:0!important;overflow-y:auto!important;overflow-x:hidden!important;border:1px solid rgba(140,211,228,.25)!important;border-radius:24px!important;background:#182d3e!important;box-shadow:0 32px 90px #000b!important}
#welcomeGuide .welcomeBody{box-sizing:border-box;padding:clamp(20px,3.7vw,28px)!important;max-width:100%}
#welcomeGuide .welcomeHeader{display:flex!important;align-items:center!important;justify-content:space-between!important;height:46px!important;min-height:46px!important;max-height:46px!important;margin:0 0 14px!important;gap:12px}
#welcomeGuide .welcomeHeader img{display:block!important;width:46px!important;height:46px!important;min-width:46px!important;max-width:46px!important;min-height:46px!important;max-height:46px!important;object-fit:contain!important;border-radius:11px;flex:none!important}
#welcomeGuide .welcomeHeader #welcomeClose{margin-left:auto!important;display:grid!important;place-items:center!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;padding:0!important;flex:none!important;border-radius:12px!important;font-size:18px}
#welcomeGuide .overline{margin:2px 0 7px!important;font-size:10px;letter-spacing:.12em}
#welcomeGuide h2{font-size:clamp(23px,2.7vw,29px)!important;line-height:1.18!important;letter-spacing:-.045em}
#welcomeGuide .welcomeLead{margin:10px 0 17px!important;font-size:12px!important;line-height:1.55}
#welcomeGuide .welcomeStep{display:flex;gap:12px!important;padding:13px 0!important;border-top:1px solid rgba(170,213,231,.13)}
#welcomeGuide .stepNumber{width:27px!important;height:27px!important;min-width:27px!important;border-radius:9px;font-size:12px}
#welcomeGuide .welcomeStep h3{font-size:13px!important;margin:0!important}
#welcomeGuide .welcomeStep p{font-size:12px!important;line-height:1.45!important;margin:5px 0 9px!important}
#welcomeGuide .welcomeStepContent{min-width:0;flex:1}
#welcomeGuide .welcomeInline{display:flex;flex-wrap:wrap;align-items:center;gap:7px}
#welcomeGuide .welcomeInline input{flex:1 1 180px;min-width:0;font-size:14px;padding:10px 12px}
#welcomeGuide .welcomeInline button{flex:0 0 auto;min-height:39px;padding:8px 14px}
#welcomeGuide .welcomeFinish{margin-top:13px;width:100%;min-height:45px!important}
#welcomeGuide .welcomeFoot{margin:10px 0 0!important;font-size:10px;color:#9fb8c9}
#welcomeGuide .microStatus{font-size:11px;margin:7px 0 0}
/* Desktop: chat and composer fit without requiring page scrolling. */
@media (min-width:1181px){
.workspace{grid-template-columns:270px minmax(0,1fr)}
.mainPanel{padding:24px clamp(24px,2.6vw,43px) 23px!important}
.sectionHeading{margin-bottom:17px!important}
.sectionHeading h2{font-size:31px}
.chatsLayout{height:clamp(490px,calc(100dvh - 253px),830px)!important}
}
/* iPad + split-window MacBooks: show contacts and chat side by side. */
@media (min-width:721px) and (max-width:1180px){
.workspace{grid-template-columns:90px minmax(0,1fr)!important}
.sidebar{padding:17px 9px!important}.profile{display:flex!important;flex-direction:column;align-items:center;gap:6px!important;padding:10px 5px!important}
.profile .avatar{width:44px;height:44px}.profile>div:nth-child(2){display:none!important}
.profile #copyPin{height:32px!important;width:32px!important;min-width:32px!important;min-height:32px!important}
.nav button{flex-direction:column!important;justify-content:center!important;gap:5px!important;min-height:64px;padding:9px 3px!important;font-size:10px;text-align:center}
.nav .navIcon{height:23px!important;width:23px!important;min-width:23px!important}
.mainPanel{padding:19px 15px!important}
.chatsLayout{grid-template-columns:clamp(228px,33%,300px) minmax(0,1fr)!important;height:clamp(490px,calc(100dvh - 240px),870px)!important}
.chatHead{gap:6px!important;padding:10px 12px!important}
.chatHead .np2-security-label{display:none}
.chatHead .contactHeadButton{gap:8px!important}
.chatHead #verifyKeyBtn{min-width:70px;padding-inline:9px!important}
.composer{display:grid!important;grid-template-columns:repeat(4,40px) minmax(0,1fr) 80px;grid-template-rows:42px 44px;gap:5px!important;padding:9px!important}
.composer .icon-btn{grid-row:1;grid-column:auto;min-width:40px!important}
.composer textarea{grid-column:1 / 6;grid-row:2;min-height:44px!important;width:100%!important}
.composer #sendBtn{grid-column:6;grid-row:2;padding:8px!important;min-width:80px;min-height:44px!important}
}
/* Small phones + compact Safari PWA: safe areas, predictable navigation. */
@media (max-width:720px){
.top{height:auto;min-height:68px;padding:8px 12px calc(7px + env(safe-area-inset-top,0px))!important}
.brand img{width:37px;height:37px}.brand strong{font-size:21px}.brand small{font-size:8px}
.top-actions .quiet{min-height:38px!important;padding:8px!important;font-size:11px}
.top-actions a[href="/"]{display:none!important}
.workspace{grid-template-columns:minmax(0,1fr);padding-bottom:calc(75px + env(safe-area-inset-bottom,0px))}
.sidebar{padding:10px 11px 0!important}.profile{grid-template-columns:42px minmax(0,1fr) 35px;margin-bottom:7px!important;padding:9px 11px!important}
.profile .avatar{width:42px;height:42px}.profile strong{font-size:12px!important}
.nav{position:fixed;bottom:0;left:0;right:0;z-index:45;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px!important;padding:7px 7px calc(9px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--np2-line);background:rgba(11,26,40,.97)}
.nav button{min-width:0;flex-direction:column!important;justify-content:center!important;min-height:53px!important;padding:7px 1px!important;font-size:10px;text-align:center;gap:4px!important}
.nav .navIcon{width:21px!important;min-width:21px!important;height:21px!important}
.mainPanel{padding:13px 11px 18px!important}
.chatsLayout{height:auto!important;min-height:0!important}
.peopleList{overflow-x:auto}
.peopleItem{min-width:165px}
.chatHead{height:62px!important;min-height:62px!important;max-height:62px!important;padding:7px 9px!important;gap:6px!important}
.chatHead .contactHeadButton{height:49px;min-height:49px;gap:7px!important;padding:3px!important}
.chatHead .contactHeadButton .avatar{width:36px!important;height:36px!important;min-width:36px!important;flex-basis:36px!important}
.chatHead #chatTitle{font-size:13px!important}.chatHead #chatMeta{font-size:10px!important}
.chatHead #verifyKeyBtn{min-height:36px!important;min-width:62px!important;padding:7px 8px!important;font-size:11px!important}
.chatHead .np2-security-label{display:none}
.workspace.mobile-chat-open .chatsLayout{height:calc(100dvh - 147px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;min-height:400px!important;grid-template-rows:minmax(0,1fr)!important;overflow:hidden!important}
.workspace.mobile-chat-open .conversation{height:100%!important;min-height:0!important;max-height:100%!important;align-self:stretch!important;overflow:hidden!important}
.workspace.mobile-chat-open .profile,.workspace.mobile-chat-open #chatsTab>.sectionHeading,.workspace.mobile-chat-open .people{display:none!important}
.workspace.mobile-chat-open .mainPanel{padding:0!important}
.workspace.mobile-chat-open .chatsLayout{border:0!important;border-radius:0!important}
.workspace.mobile-chat-open #chatActive{min-height:0!important;height:100%!important;max-height:100%!important;overflow:hidden!important}
.workspace.mobile-chat-open .messages{min-height:0!important;max-height:none!important;flex:1 1 0!important;overflow-y:auto!important}
.messages{padding:12px 11px!important;gap:9px!important;flex:1}
.bubble{max-width:87%;font-size:13px!important;padding:9px 12px!important}
.composer{display:flex!important;flex-wrap:wrap!important;gap:5px!important;padding:7px!important}
.composer .icon-btn{flex:0 0 36px!important;min-height:38px!important;height:38px!important;width:36px!important;min-width:36px!important;padding:7px!important}
.composer textarea{order:5;flex:1 1 calc(100% - 75px)!important;width:calc(100% - 75px)!important;min-height:42px!important;height:42px!important;font-size:16px!important;padding:10px!important}
.composer #sendBtn{order:6;flex:0 0 66px!important;min-height:42px!important;padding:8px!important}
.chatHint{display:none}
#welcomeGuide.welcomeDialog{width:calc(100vw - 20px)!important;max-height:calc(100dvh - 34px - env(safe-area-inset-top,0px))!important;border-radius:19px!important}
#welcomeGuide .welcomeBody{padding:17px!important}
#welcomeGuide .welcomeHeader{height:40px!important;min-height:40px!important;max-height:40px!important}
#welcomeGuide .welcomeHeader img{height:40px!important;width:40px!important;min-width:40px!important;max-width:40px!important;min-height:40px!important;max-height:40px!important}
#welcomeGuide .welcomeLead{margin:8px 0 12px!important}
}
@media (hover:none),(pointer:coarse){.nav button,.chatHead button,.composer button,.welcomeDialog button{touch-action:manipulation}}
@media (prefers-reduced-motion:reduce){.peopleItem,.nav button,.bubble{transition:none!important}}
