:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#173b37;background:#edf2ef;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.65}[hidden]{display:none!important}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.2em;color:#29a881}.title-dot,.brand-dot,.headline-dot{color:#edba72}.brand{display:flex;align-items:center;gap:9px;color:#0b594b;font-size:24px;font-weight:800;letter-spacing:-1.4px}.brand-icon,.mini-icon{display:grid;place-items:center;background:#0a8066;color:#fff;border-radius:11px;width:32px;height:32px;font-size:19px;letter-spacing:0}.brand-light{color:#fff}.brand-light .brand-icon{background:rgba(255,255,255,.18)}.icon-button{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:11px;background:transparent;color:#5b7971;font-size:27px;line-height:1;transition:background .2s,color .2s}.icon-button:hover{background:#e7f0eb;color:#08715c}.icon-button svg{width:20px;height:20px}.primary-button{border:0;border-radius:11px;background:#0a8066;color:#fff;padding:13px 20px;font-weight:750;box-shadow:0 8px 18px rgba(10,128,102,.15);transition:transform .2s,background .2s}.primary-button:hover{background:#076e58;transform:translateY(-1px)}.toast{position:fixed;z-index:50;left:50%;bottom:25px;transform:translate(-50%,20px);background:#153d35;color:#fff;padding:12px 18px;border-radius:11px;box-shadow:0 12px 35px #092f2550;opacity:0;pointer-events:none;transition:all .25s;max-width:min(90vw,500px);text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}

/* Acceso */
.auth-page{min-height:100vh;background:#f4f6f2}.auth-accent{position:absolute;top:0;right:0;left:0;height:13px;background:#0a8066}.auth-layout{display:grid;grid-template-columns:1fr 1fr;min-height:100vh}.auth-intro{display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden;background:#075747;color:#fff;padding:54px max(7vw,55px) 38px}.auth-intro:before,.auth-intro:after{content:"";position:absolute;border:1px solid rgba(255,255,255,.1);border-radius:50%;pointer-events:none}.auth-intro:before{width:650px;height:650px;right:-350px;top:10%}.auth-intro:after{width:420px;height:420px;left:-280px;bottom:-220px}.intro-copy{position:relative;z-index:1;max-width:580px}.intro-copy .eyebrow{color:#a1ddc7}.intro-copy h1{font-size:clamp(46px,5vw,76px);line-height:1.06;letter-spacing:-.055em;margin:20px 0 26px}.intro-copy p{color:#c8e2d8;font-size:19px;line-height:1.6;max-width:430px;margin:0}.intro-points{display:grid;gap:18px;margin-top:54px}.intro-points div{display:flex;align-items:center;gap:14px;color:#ecf7f2;font-size:15px}.point-icon{display:grid;place-items:center;background:#ffffff1c;border:1px solid #ffffff30;border-radius:12px;width:38px;height:38px;color:#c3e8d8;font-size:20px}.intro-footer{font-size:10px;letter-spacing:.23em;color:#8fc5b3;font-weight:800}.auth-panel{display:grid;place-items:center;padding:60px 30px}.auth-card{width:min(100%,420px)}.auth-card-top{display:flex;align-items:center;gap:9px;color:#0a8066;font-size:10px;letter-spacing:.16em;font-weight:800;margin-bottom:42px}.mini-icon{width:25px;height:25px;border-radius:7px;font-size:14px}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#e8eeea;border-radius:12px;padding:4px;margin-bottom:34px}.auth-tab{border:0;border-radius:9px;background:transparent;color:#668177;padding:12px;font-size:13px;font-weight:750}.auth-tab.active{background:#fff;color:#075d4c;box-shadow:0 2px 8px #102d1d13}.auth-card h2{font-size:31px;line-height:1.2;letter-spacing:-.04em;margin:0 0 8px}.auth-subtitle{color:#789087;margin:0 0 32px;font-size:14px}.field{margin-bottom:18px}.field label,.alias-form label{display:block;font-size:13px;font-weight:750;margin-bottom:8px;color:#335950}.field input,.alias-form input{width:100%;height:48px;border:1px solid #dce6e0;border-radius:10px;padding:0 15px;background:#fff;color:#193d35;outline:none}.field input:focus,.alias-form input:focus,.search-box:focus-within,.composer:focus-within{border-color:#2aad87;box-shadow:0 0 0 3px rgba(42,173,135,.11)}.field input::placeholder{color:#a8b7af}.input-wrap{position:relative}.input-wrap>span{position:absolute;top:14px;left:15px;color:#84a095}.input-wrap input{padding-left:34px}.auth-submit{width:100%;display:flex;justify-content:space-between;margin-top:30px;padding:15px 19px}.auth-submit span{font-size:19px;line-height:16px}.auth-note{color:#9aaea3;text-align:center;font-size:12px;margin-top:26px}

/* Aplicación */
.app-shell{display:flex;width:min(100vw,1600px);height:100dvh;min-height:500px;margin:auto;background:#fff;box-shadow:0 0 60px #113f2a13}.sidebar{display:flex;flex-direction:column;width:385px;flex-shrink:0;border-right:1px solid #e5eee8;background:#fff}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:23px 25px 0}.header-actions{display:flex;gap:5px}.new-chat-button{background:#e5f5ec;color:#0c8568;font-size:27px}.sidebar-title{display:flex;align-items:end;justify-content:space-between;padding:36px 27px 20px}.sidebar-title h1{margin:5px 0 0;font-size:32px;line-height:1;letter-spacing:-.04em}.contact-count{display:grid;place-items:center;min-width:25px;height:25px;padding:0 7px;border-radius:8px;background:#e8f4ed;color:#098063;font-weight:800;font-size:12px}.search-box{display:flex;align-items:center;gap:9px;height:43px;margin:0 24px;border:1px solid #e4ede7;border-radius:10px;padding:0 12px;background:#f5f8f5;color:#8ca49a}.search-box svg{width:18px;height:18px;flex-shrink:0}.search-box input{width:100%;border:0;background:transparent;outline:none;color:#244b3e;font-size:13px}.search-box input::placeholder{color:#9bb0a4}.list-label{padding:31px 27px 14px;font-size:10px;font-weight:850;letter-spacing:.18em;color:#a2b3a8}.contact-list{flex:1;overflow-y:auto;padding:0 10px 14px}.contact-item{display:flex;align-items:center;gap:12px;width:100%;border:0;background:transparent;text-align:left;border-radius:11px;padding:12px 14px;color:#1a3c35}.contact-item:hover{background:#f3f8f4}.contact-item.active{background:#e8f4ec}.avatar{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;border-radius:14px;background:#d7ebe1;color:#08755c;font-size:15px;font-weight:800;letter-spacing:.02em}.avatar.small{width:39px;height:39px;border-radius:12px}.avatar.c2{background:#f5e8d9;color:#af7840}.avatar.c3{background:#e4e9f9;color:#657aba}.avatar.c4{background:#f5e4e7;color:#b86679}.avatar.c5{background:#e6e9d8;color:#838b4b}.contact-main{min-width:0;flex:1}.contact-top,.contact-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px}.contact-top strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contact-time{font-size:10px;color:#a0b2a8;white-space:nowrap}.contact-bottom{margin-top:5px}.contact-preview{font-size:12px;color:#8ba197;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unread-badge{display:grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:#0ba47c;color:#fff;font-size:10px;font-weight:800}.empty-contacts{padding:35px 20px;text-align:center;color:#879f92;font-size:13px;line-height:1.6}.empty-contacts button{display:block;border:0;background:transparent;color:#0a8066;font-weight:800;margin:10px auto}.sidebar-profile{display:flex;align-items:center;gap:11px;padding:15px 25px;border-top:1px solid #eaf0eb;background:#fafcf9}.profile-text{display:grid;gap:3px;min-width:0;flex:1}.profile-text strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-text span{font-size:11px;color:#95a89e}.profile-status{width:8px;height:8px;border-radius:50%;background:#30b985;box-shadow:0 0 0 4px #dff5e8}
.conversation{position:relative;flex:1;min-width:0;background:#f8faf7}.welcome-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center;padding:35px}.welcome-state h2{font-size:clamp(31px,3vw,44px);line-height:1.15;letter-spacing:-.045em;margin:18px 0 13px}.welcome-state p{max-width:400px;margin:0 0 28px;color:#789187;font-size:14px;line-height:1.7}.welcome-art{position:relative;width:260px;height:210px;margin-bottom:25px}.art-circle{position:absolute;border-radius:50%;background:#e5f3e9}.art-circle-one{width:200px;height:200px;top:7px;left:29px}.art-circle-two{width:143px;height:143px;top:35px;left:58px;background:#d6ecdf}.art-bubble{position:absolute;z-index:1;padding:13px 20px;border-radius:17px;box-shadow:0 13px 25px #0d634526;font-weight:800;font-size:20px}.art-bubble-one{top:50px;left:19px;background:#fff;color:#22755c;transform:rotate(-7deg)}.art-bubble-two{top:106px;right:4px;background:#0a8066;color:#fff;transform:rotate(6deg)}.art-spark{position:absolute;top:13px;right:20px;font-size:33px;color:#efbd74}.active-chat{display:flex;flex-direction:column;height:100%}.chat-header{display:flex;align-items:center;gap:12px;height:76px;padding:0 27px;background:#fff;border-bottom:1px solid #e9eee9}.chat-header-text{display:grid;gap:4px;min-width:0;flex:1}.chat-header-text strong{font-size:15px}.chat-header-text span{font-size:11px;color:#8aa196}.chat-header .icon-button{margin-left:auto}.back-button{display:none}.message-area{flex:1;overflow-y:auto;padding:25px 7% 20px;background-color:#f7f8f3;background-image:radial-gradient(#bad8ca50 1px,transparent 1px);background-size:25px 25px}.messages{display:flex;flex-direction:column;gap:8px;min-height:100%}.date-divider{text-align:center;margin:14px auto;color:#83a093;font-size:11px;background:#fff;border-radius:20px;padding:7px 14px;box-shadow:0 1px 5px #1a4c2010}.message-row{display:flex}.message-row.mine{justify-content:flex-end}.bubble{max-width:min(72%,510px);min-width:85px;background:#fff;border-radius:15px 15px 15px 3px;padding:10px 12px 7px;box-shadow:0 2px 10px #0e40300e}.mine .bubble{background:#d9f3e2;border-radius:15px 15px 3px 15px}.bubble-text{font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;color:#24453a}.bubble-meta{text-align:right;color:#8ca69a;font-size:10px;margin-top:4px}.mine .bubble-meta{color:#64a489}.load-older{display:block;margin:0 auto 18px;border:0;border-radius:20px;background:#fff;color:#0c8165;padding:8px 17px;font-size:12px;font-weight:800;box-shadow:0 2px 9px #164b3312}.no-messages{margin:auto;text-align:center;color:#8da79a;font-size:13px;padding:25px}.no-messages span{display:block;font-size:34px;margin-bottom:8px}.composer-wrap{position:relative;background:#fff;border-top:1px solid #e9eee9;padding:13px 28px 8px}.composer{display:flex;align-items:end;gap:8px;border:1px solid #e5eee7;background:#f8faf7;border-radius:13px;padding:5px 6px 5px 9px}.composer textarea{flex:1;min-width:0;max-height:130px;resize:none;border:0;background:transparent;outline:none;padding:10px 4px;color:#244b3e;line-height:1.4;font-size:13px}.composer textarea::placeholder{color:#9db2a5}.emoji-button{font-size:26px}.send-button{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:10px;background:#0a8066;color:#fff;flex-shrink:0}.send-button:hover{background:#086c57}.send-button svg{width:18px;height:18px}.composer-hint{text-align:center;color:#abbcaf;font-size:10px;margin:6px 0 0}.emoji-picker{position:absolute;bottom:78px;left:28px;width:min(310px,calc(100vw - 50px));max-height:235px;overflow-y:auto;display:grid;grid-template-columns:repeat(7,1fr);gap:3px;padding:11px;background:#fff;border:1px solid #e1e9e2;border-radius:14px;box-shadow:0 16px 45px #1148302b;z-index:5}.emoji-picker button{border:0;background:transparent;border-radius:7px;padding:5px;font-size:20px}.emoji-picker button:hover{background:#e9f5ed}
/* Buscar contactos */
.modal-backdrop{position:fixed;inset:0;display:grid;place-items:center;z-index:20;background:#0c302a91;padding:20px}.modal{width:min(100%,520px);max-height:min(680px,90dvh);overflow-y:auto;background:#fff;border-radius:20px;padding:29px;box-shadow:0 30px 80px #0829214d}.modal-heading{display:flex;justify-content:space-between;align-items:start}.modal h2{font-size:29px;letter-spacing:-.045em;margin:8px 0 0}.modal>p{font-size:13px;color:#819a8d;line-height:1.6;margin:12px 0 23px}.modal-search{margin:0 0 14px}.search-results{min-height:130px;max-height:290px;overflow-y:auto}.search-placeholder{text-align:center;color:#98aa9e;font-size:13px;padding:40px 15px}.search-user{display:flex;align-items:center;gap:11px;width:100%;border:0;border-radius:10px;background:transparent;text-align:left;padding:9px}.search-user:hover{background:#f0f8f2}.search-user span:nth-child(2){display:grid;gap:3px;flex:1}.search-user strong{font-size:13px;color:#244438}.search-user small{font-size:11px;color:#91a59a}.search-user .plus{font-size:20px;color:#0a8066}.alias-form{padding-top:5px}.alias-person{display:flex;align-items:center;gap:10px;margin:0 0 24px;padding:12px;background:#f3f8f3;border-radius:12px;font-size:14px;font-weight:750}.alias-form input{margin-bottom:20px}.alias-actions{display:flex;justify-content:space-between;align-items:center}.text-button{border:0;background:transparent;color:#668379;font-weight:750;font-size:13px}
@media(max-width:800px){.auth-layout{grid-template-columns:1fr}.auth-intro{min-height:260px;padding:25px 30px}.intro-copy h1{font-size:40px;margin:10px 0}.intro-copy p{font-size:14px}.intro-points,.intro-footer{display:none}.auth-panel{padding:40px 25px}.auth-card-top{margin-bottom:25px}.sidebar{width:325px}.message-area{padding-left:4%;padding-right:4%}}
@media(max-width:650px){.app-shell{min-height:0}.sidebar{width:100%}.conversation{display:none}.app-shell.chat-open .sidebar{display:none}.app-shell.chat-open .conversation{display:block}.back-button{display:grid}.chat-header{padding:0 13px}.message-area{height:calc(100dvh - 166px)}.composer-wrap{padding:10px 12px 7px}.composer-hint{font-size:9px}.emoji-picker{left:12px}.bubble{max-width:83%}.auth-intro{min-height:235px}.intro-copy h1{font-size:37px}.modal{padding:22px}}

/* Estado, presencia y opciones de mensajes */
.avatar{position:relative}.avatar.online::after{content:"";position:absolute;right:-2px;bottom:-2px;width:10px;height:10px;border-radius:50%;background:#2ecb84;border:2px solid #fff}.profile-text .self-status{color:#0b8063;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-edit{flex-shrink:0;font-size:20px}.chat-header-text span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-header-text #chatPresence{color:#0a8667;font-weight:700}.chat-header-text #chatPresence.offline{color:#8aa196;font-weight:400}.chat-header-text #chatPresence.typing{color:#0ba77a;font-style:italic}.chat-header-text .chat-status{color:#92a79a}.contact-preview.typing{color:#0a9a72;font-weight:700}.bubble{position:relative;padding-right:31px}.bubble.deleted .bubble-text{font-style:italic;color:#78958a}.message-menu-button{position:absolute;top:4px;right:4px;display:grid;place-items:center;width:23px;height:23px;border:0;border-radius:6px;background:transparent;color:#87a499;font-size:19px;line-height:1}.message-menu-button:hover,.message-menu-button[aria-expanded="true"]{background:#c8e7d4;color:#0b785f}.message-menu{position:absolute;top:27px;right:0;z-index:10;width:190px;padding:5px;background:#fff;border:1px solid #e0e9e2;border-radius:10px;box-shadow:0 13px 35px #0c362b30}.message-menu button{display:block;width:100%;padding:10px;border:0;border-radius:6px;background:transparent;text-align:left;color:#274a3f;font-size:12px}.message-menu button:hover{background:#e9f5ed}.message-menu button.danger{color:#be5c51}.status-modal label{display:block;margin:3px 0 8px;color:#335950;font-size:13px;font-weight:750}.status-modal input{width:100%;height:48px;border:1px solid #dce6e0;border-radius:10px;padding:0 15px;outline:none;color:#193d35}.status-modal input:focus{border-color:#2aad87;box-shadow:0 0 0 3px rgba(42,173,135,.11)}.status-actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px}.status-actions span{color:#9bad9e;font-size:11px}
.message-row:last-child .message-menu{top:auto;bottom:27px}
