:root{--ink:#14242f;--muted:#697b88;--line:#e5e9ec;--canvas:#f4f6f8;--panel:#fff;--nav:#0d2635;--nav-soft:#173c50;--green:#07966d;--green-dark:#08785a;--green-pale:#e8f8f2;--shadow:0 12px 35px rgba(18,40,54,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--canvas)}[hidden]{display:none!important}button,input,select{font:inherit}button{cursor:pointer}.brand{display:flex;align-items:center;gap:3px;font-size:20px;font-weight:750;letter-spacing:-.4px}.brand strong{color:#16b487}.brand-mark{display:grid;place-items:center;width:30px;height:30px;margin-right:7px;border-radius:10px;background:linear-gradient(145deg,#14bd88,#078263);color:white;font-size:14px;font-weight:800}.brand-light{color:white}.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.5px;color:#9fc7bb}.eyebrow.green{color:var(--green)}
.login-page{min-height:100vh;display:grid;grid-template-columns:minmax(420px,1.05fr) minmax(440px,.95fr);background:#fff}.login-brand{position:relative;display:flex;flex-direction:column;padding:50px 9%;overflow:hidden;color:#fff;background:linear-gradient(145deg,#0b463f 0%,#0c2736 78%)}.login-brand:before,.login-brand:after{content:"";position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.08)}.login-brand:before{width:620px;height:620px;left:-310px;bottom:-280px}.login-brand:after{width:430px;height:430px;right:-250px;top:-160px}.brand-copy{position:relative;z-index:1;margin:auto 0;max-width:560px}.brand-copy h1{max-width:520px;margin:16px 0 18px;font-size:clamp(44px,5vw,68px);line-height:1.02;letter-spacing:-3px}.brand-copy p{max-width:500px;margin:0;color:#c8d9dc;font-size:18px;line-height:1.6}.brand-points{display:flex;flex-wrap:wrap;gap:12px 24px;margin-top:36px;color:#d8e7e7;font-size:13px}.brand-points span::first-letter{color:#22ca94}.login-brand>small{color:#7ea19f}.login-panel{display:grid;place-items:center;padding:40px}.login-card{width:min(100%,420px)}.mobile-brand{display:none}.login-card h2{margin:12px 0 7px;font-size:34px;letter-spacing:-1.2px}.login-card>p{margin:0 0 32px;color:var(--muted)}.login-card label{display:block;margin:17px 0 7px;font-size:12px;font-weight:750}.login-card input{width:100%;height:50px;padding:0 14px;border:1px solid #d7dee3;border-radius:10px;background:#fbfcfd;outline:none;transition:.2s}.login-card input:focus{border-color:var(--green);box-shadow:0 0 0 4px rgba(7,150,109,.1);background:#fff}.primary-button{width:100%;height:50px;margin-top:22px;border:0;border-radius:10px;background:var(--green);color:#fff;font-weight:750;transition:.2s}.primary-button:hover{background:var(--green-dark);transform:translateY(-1px)}.primary-button:disabled{opacity:.65;cursor:wait}.form-error:empty{display:none}.form-error{margin-top:13px;padding:10px 12px;border-radius:8px;background:#fff0f0;color:#b33434;font-size:12px}.demo-fill{display:block;margin:16px auto 0;border:0;background:none;color:var(--green-dark);font-size:12px;font-weight:700}.demo-fill:hover{text-decoration:underline}
.app-shell{display:grid;grid-template-columns:242px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:28px 18px 20px;background:var(--nav);color:#c4d1d8}.sidebar>.brand{margin:0 10px 39px}.sidebar nav{display:grid;gap:6px}.sidebar nav button{display:grid;grid-template-columns:25px 1fr auto;align-items:center;min-height:45px;padding:0 13px;border:0;border-radius:10px;background:transparent;color:#9fb3bf;text-align:left}.sidebar nav button span{font-size:18px}.sidebar nav button b{font-size:13px}.sidebar nav button i{min-width:20px;padding:3px 6px;border-radius:10px;background:#ed765f;color:white;font-size:10px;font-style:normal;text-align:center}.sidebar nav button:hover,.sidebar nav button.active{background:var(--nav-soft);color:white}.sidebar-status{display:flex;gap:10px;align-items:center;margin:auto 6px 14px;padding:13px;border:1px solid #25475a;border-radius:10px;background:#112e3e}.sidebar-status b,.sidebar-status small{display:block}.sidebar-status b{font-size:11px;color:#d7e2e6}.sidebar-status small{margin-top:3px;color:#7894a2;font-size:10px}.status-dot{width:9px;height:9px;border-radius:50%;background:#18c486;box-shadow:0 0 0 4px rgba(24,196,134,.12)}.profile{padding:15px 8px 9px;border-top:1px solid #274555;line-height:1.5}.profile b{display:block;color:#fff;font-size:12px}.profile small{color:#88a1ae;font-size:10px}.logout{padding:7px 8px;border:0;background:none;color:#8aa3af;text-align:left;font-size:11px}.logout:hover{color:#fff}main{min-width:0;padding:31px 35px 36px}.tab{display:none}.tab.active{display:block}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px}.page-header h1{margin:5px 0 4px;font-size:27px;letter-spacing:-.8px}.page-header p{margin:0;color:var(--muted);font-size:13px}.filters{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.filters button{padding:7px 11px;border:1px solid #dce3e7;border-radius:20px;background:#fff;color:#60727d;font-size:11px}.filters button:hover,.filters button.active{border-color:#8bd1b9;background:var(--green-pale);color:#08775a}
.profile .presence{display:block;margin-top:8px;padding:5px 9px;border:1px solid #496270;border-radius:12px;background:transparent;color:#a8bac3;font-size:10px}.profile .presence.online{border-color:#188b6d;background:#123f36;color:#7de1bd}.contact .unread{position:absolute;right:14px;bottom:12px;display:grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--green);color:#fff;font-size:9px;font-style:normal;font-weight:800}.msg>small{display:block;margin-top:5px;color:#53706a;font-size:9px;font-weight:700}
.integration-grid{display:grid;grid-template-columns:minmax(520px,1fr) 320px;gap:20px}.integration-card,.integration-help{padding:27px;border:1px solid #e0e6e9;border-radius:14px;background:#fff;box-shadow:var(--shadow)}.integration-title{display:flex;gap:14px;align-items:center}.integration-title span,.integration-help>span{color:var(--green);font-size:9px;font-weight:800;letter-spacing:1px}.integration-title h2,.integration-help h2{margin:4px 0 0;font-size:21px}.integration-logo{display:grid;place-items:center;width:46px;height:46px;border-radius:13px;background:#1169f0;color:#fff;font-size:22px;font-weight:900}.integration-card>p{max-width:680px;margin:20px 0;color:var(--muted);font-size:12px;line-height:1.7}.integration-form{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding-top:20px;border-top:1px solid var(--line)}.integration-form>label:not(.switch-row){display:grid;gap:7px;color:#60727d;font-size:10px;font-weight:800}.integration-form select{height:42px;padding:0 11px;border:1px solid #dce3e7;border-radius:9px;background:#fff;color:var(--ink)}.switch-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px;border:1px solid #e4e9eb;border-radius:10px}.switch-row span b,.switch-row span small{display:block}.switch-row span b{font-size:11px}.switch-row span small{margin-top:3px;color:var(--muted);font-size:9px}.switch-row input{width:18px;height:18px;accent-color:var(--green)}.credential-status{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:12px;border-radius:10px;background:#f3f8f6}.credential-status>span{width:9px;height:9px;border-radius:50%;background:#aab5bb}.credential-status>span.ready{background:#18c486;box-shadow:0 0 0 4px rgba(24,196,134,.12)}.credential-status b,.credential-status small{display:block}.credential-status b{font-size:11px}.credential-status small{color:var(--muted);font-size:9px}.integration-message{grid-column:1/-1;min-height:18px;color:#58717b;font-size:11px}.integration-message.error{color:#b44b3e}.integration-message.success{color:#08775a}.integration-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:9px}.integration-actions button{height:40px;padding:0 16px;border:1px solid #cfdadd;border-radius:9px;background:#fff;font-weight:750}.integration-actions .primary-button{border:0;background:var(--green);color:#fff}.integration-help ul{padding-left:18px;color:#50636d;font-size:12px;line-height:2.1}.integration-help .security-note{margin-top:25px}
.app-shell{height:100vh;height:100dvh;overflow:hidden}main{height:100vh;height:100dvh;overflow:auto}#inbox.active{display:flex;height:100%;min-height:0;flex-direction:column;overflow:hidden}#inbox>.page-header{flex:0 0 auto}.whatsapp{height:auto;min-height:0;flex:1}.chat-list,.thread,.details{min-height:0}.thread{position:relative;overflow:hidden}.messages{min-height:0;overscroll-behavior:contain;scroll-behavior:smooth;scrollbar-color:#afbbb6 transparent;scrollbar-width:thin}.messages::-webkit-scrollbar,.chat-list::-webkit-scrollbar{width:8px}.messages::-webkit-scrollbar-thumb,.chat-list::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:8px;background:#aebbb6;background-clip:padding-box}.compose{position:relative;z-index:3;flex:0 0 auto}.scroll-bottom{position:absolute;right:18px;bottom:78px;z-index:4;display:grid;place-items:center;width:42px;height:42px;border:1px solid #d8e1dd;border-radius:50%;background:#fff;color:#45625a;box-shadow:0 5px 18px rgba(20,42,35,.18);font-size:19px}.scroll-bottom:hover{background:#eef8f4;color:var(--green)}.branding-card{grid-column:1/-1}.integration-form input:not([type="checkbox"]){height:42px;padding:0 11px;border:1px solid #dce3e7;border-radius:9px;background:#fff;color:var(--ink)}.integration-form input[type="color"]{width:100%;padding:4px}.brand-preview{background:var(--green)}
.secondary-action{padding:9px 14px;border:1px solid #d8e1e5;border-radius:9px;background:#fff;color:#47606d;font-weight:750}.analytics-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.metric-panel{padding:20px;border:1px solid #e0e6e9;border-radius:14px;background:#fff;box-shadow:var(--shadow)}.metric-panel .table-wrap{box-shadow:none}.campaign-panel{grid-column:1/-1}.campaign-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.campaign-card{padding:15px;border:1px solid #e2e8ea;border-radius:11px}.campaign-card b,.campaign-card span,.campaign-card small{display:block}.campaign-card span{margin-top:10px;color:var(--green);font-size:18px;font-weight:850}.campaign-card small{margin-top:4px;color:var(--muted);font-size:9px}.campaign-card>div{height:5px;margin-top:12px;overflow:hidden;border-radius:4px;background:#edf1f2}.campaign-card i{display:block;height:100%;background:var(--green)}.empty-copy{color:var(--muted);font-size:12px}.automation-layout{display:grid;grid-template-columns:minmax(520px,1fr) 340px;gap:18px}.flow-canvas,.flow-settings{padding:24px;border:1px solid #e0e6e9;border-radius:14px;background:#fff;box-shadow:var(--shadow)}.flow-diagram{display:flex;align-items:center;flex-direction:column;min-height:620px;padding:18px;background:radial-gradient(#dce5e1 1px,transparent 1px);background-size:18px 18px}.flow-node{display:grid;grid-template-columns:34px 1fr;gap:2px 10px;align-items:center;width:230px;padding:13px;border:1px solid #d9e4e0;border-radius:11px;background:#fff;box-shadow:0 5px 15px rgba(24,48,40,.08)}.flow-node>span{grid-row:1/3;display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#e6f6f0;color:var(--green);font-size:9px;font-weight:850}.flow-node b{font-size:11px}.flow-node small{color:var(--muted);font-size:8px}.flow-node.decision{border-color:#e9cf9a}.flow-node.department{border-color:#a9d8c8}.flow-node.end{background:#eaf8f3}.flow-arrow{height:30px;color:#82a197;font-size:20px}.branch-line{display:flex;justify-content:space-around;width:100%;max-width:600px;margin:7px 0;color:#69827a;font-size:9px;font-weight:850;text-transform:uppercase}.flow-branches{display:grid;grid-template-columns:1fr 1fr;gap:35px;width:100%;max-width:600px}.flow-branch{display:flex;align-items:center;flex-direction:column}.flow-settings h2{margin-top:0}.flow-settings form{display:grid;gap:14px}.flow-settings label{display:grid;gap:6px;color:#60727d;font-size:10px;font-weight:800}.flow-settings textarea,.flow-settings select{width:100%;padding:10px;border:1px solid #dce3e7;border-radius:9px;background:#fff;resize:vertical}.channel-logo{background:#1d9b72}.channel-config{display:grid;grid-template-columns:1fr 1fr;gap:16px}.channel-config fieldset{display:grid;gap:12px;margin:0;padding:17px;border:1px solid #e0e6e9;border-radius:11px}.channel-config legend{padding:0 7px;font-size:12px;font-weight:850}.channel-config fieldset>label:not(.switch-row){display:grid;gap:6px;color:#60727d;font-size:10px;font-weight:800}.channel-config input:not([type="checkbox"]){height:42px;padding:0 11px;border:1px solid #dce3e7;border-radius:9px}.channel-config>.integration-message,.channel-config>.integration-actions{grid-column:1/-1}
.whatsapp{height:calc(100vh - 137px);min-height:560px;display:grid;grid-template-columns:330px minmax(380px,1fr) 260px;overflow:hidden;border:1px solid #dfe5e8;border-radius:14px;background:#fff;box-shadow:var(--shadow)}.chat-list{overflow:auto;border-right:1px solid var(--line)}.list-header{position:sticky;top:0;z-index:2;padding:13px;background:#fafbfc;border-bottom:1px solid var(--line)}.search{display:flex;align-items:center;gap:8px;height:41px;padding:0 12px;border:1px solid #e0e5e8;border-radius:9px;background:#fff;color:#7c8c95}.search input{min-width:0;flex:1;border:0;outline:0;color:var(--ink);font-size:12px}.contact{position:relative;min-height:78px;padding:15px 15px 13px 66px;border-bottom:1px solid #edf0f2;cursor:pointer}.contact:before{content:attr(data-initial);position:absolute;left:15px;top:16px;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#dff4ed;color:#08785a;font-weight:800}.contact:hover,.contact.selected{background:#f1faf7}.contact.selected:after{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--green)}.contact b,.contact small{display:block}.contact b{padding-right:80px;font-size:13px}.contact small{max-width:190px;margin-top:7px;overflow:hidden;color:#7c8b94;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.contact .badge{position:absolute;right:12px;top:16px;max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge{display:inline-block;padding:4px 7px;border-radius:6px;background:#eaf4fa;color:#287392;font-size:9px;font-weight:800}.thread{min-width:0;display:flex;flex-direction:column;background:#efe9e0}.empty-state{margin:auto;padding:28px;color:#7d8b93;text-align:center}.empty-state h3{margin:13px 0 6px;color:#40515b;font-size:15px}.empty-state p{margin:0;font-size:12px}.empty-state.compact{padding:10px}.empty-icon{display:grid;place-items:center;width:48px;height:48px;margin:auto;border-radius:15px;background:#e1f4ed;color:var(--green);font-size:22px}.thread-head{height:67px;padding:14px 18px;border-bottom:1px solid #dce1e3;background:#fff}.thread-head b,.thread-head small{display:block}.thread-head b{font-size:13px}.thread-head small{margin-top:5px;color:#7a8992;font-size:11px}.messages{flex:1;overflow:auto;padding:22px;background-color:#f0ebe3;background-image:radial-gradient(rgba(80,91,82,.12) .7px,transparent .7px);background-size:14px 14px}.msg{width:max-content;min-width:94px;max-width:76%;margin-bottom:9px;padding:9px 10px 6px;border-radius:8px;background:#fff;box-shadow:0 1px 2px rgba(20,37,45,.1);font-size:12px;line-height:1.48}.msg.out{margin-left:auto;background:#d9fdd3}.msg time{display:block;margin-top:3px;color:#7c8985;font-size:9px;text-align:right}.compose{display:flex;gap:9px;padding:12px;border-top:1px solid #e0e3e4;background:#f7f8f8}.compose input{min-width:0;flex:1;height:42px;padding:0 13px;border:1px solid #e1e5e7;border-radius:9px;background:#fff;outline:none}.compose input:focus{border-color:#88c9b3}.compose button{padding:0 17px;border:0;border-radius:9px;background:var(--green);color:#fff;font-weight:700}.details{overflow:auto;padding:20px;border-left:1px solid var(--line);background:#fff}.details h3{margin:3px 0 19px;font-size:17px}.details dl{margin:0}.details dt{margin-top:16px;color:#8a98a0;font-size:9px;font-weight:800;letter-spacing:.7px;text-transform:uppercase}.details dd{margin:5px 0;color:#334650;font-size:12px;font-weight:700}.details select,.details button{width:100%;margin-top:7px;padding:9px;border:1px solid #dbe2e5;border-radius:8px;background:#fff;font-size:11px}.details button{margin-top:22px;border-color:#b7dfd1;background:var(--green-pale);color:var(--green-dark);font-weight:750}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.stats article,.team,.table-wrap{border:1px solid #e0e6e9;border-radius:13px;background:#fff;box-shadow:0 5px 20px rgba(30,52,65,.04)}.stats article{position:relative;padding:22px}.stats article small{display:block;color:#7a8993;font-size:9px;font-weight:800;letter-spacing:1px}.stats article strong{display:block;margin-top:14px;font-size:35px;letter-spacing:-1px}.stats article p{margin:3px 0 0;color:#8a98a0;font-size:11px}.stat-icon{position:absolute;right:18px;top:18px;display:grid;place-items:center;width:34px;height:34px;border-radius:10px}.stat-icon.blue{background:#eaf4fc;color:#3785b3}.stat-icon.green-bg{background:#e5f7f0;color:#07815f}.stat-icon.amber{background:#fff3db;color:#b47a16}.stat-icon.coral{background:#ffede9;color:#bd604e}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:15px;border-bottom:1px solid #edf0f2;text-align:left;white-space:nowrap}th{background:#fafbfc;color:#7c8a93;font-size:9px;letter-spacing:.8px}td{font-size:12px}.teams{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:16px}.team{padding:21px}.team h2{margin:0;font-size:17px}.team>p{margin:5px 0 18px;color:#7b8b94;font-size:11px}.person{padding:11px 0;border-top:1px solid #edf0f2;font-size:12px}.person small{color:#7d8d96;font-size:10px}.dot{display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:#aab5bb}.dot.online{background:#11b77e}
@media(max-width:1100px){.whatsapp{grid-template-columns:300px minmax(350px,1fr)}.details{display:none}.stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.login-page{grid-template-columns:1fr}.login-brand{display:none}.login-panel{min-height:100vh;padding:25px}.mobile-brand{display:flex;margin-bottom:52px}.app-shell{grid-template-columns:68px 1fr}.sidebar{padding:21px 9px}.sidebar>.brand span:not(.brand-mark),.sidebar>.brand strong,.sidebar nav button b,.sidebar nav button i,.sidebar-status,.profile,.logout{display:none}.sidebar>.brand{margin:0 auto 35px}.sidebar nav button{display:grid;grid-template-columns:1fr;place-items:center;padding:0}.sidebar nav button span{font-size:20px}main{padding:21px 15px}.page-header{align-items:flex-start;flex-direction:column}.filters{justify-content:flex-start}.whatsapp{height:calc(100vh - 190px);grid-template-columns:1fr}.thread{display:none}.chat-list:has(.contact.selected){display:none}.chat-list:has(.contact.selected)+.thread{display:flex}.stats,.teams{grid-template-columns:1fr}}
.sidebar-status.offline .status-dot{background:#f0a33c;box-shadow:0 0 0 4px rgba(240,163,60,.12)}.ticket-status{padding:6px 8px;border:1px solid #dce3e7;border-radius:7px;background:#fff;color:var(--ink);font-size:11px}.tab.active{animation:view-enter .18s ease-out}@keyframes view-enter{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.tab.active{animation:none}}

/* Guía y minicurso de Meta */
.setup-header{align-items:center}.setup-pill{padding:9px 13px;border:1px solid #ecd5a7;border-radius:999px;background:#fff8e9;color:#9a6812;font-size:11px;font-weight:800}.setup-pill.ready{border-color:#aee0d0;background:#eaf8f3;color:#087457}.setup-hero{position:relative;display:flex;align-items:center;justify-content:space-between;gap:30px;margin-bottom:25px;padding:30px 34px;overflow:hidden;border-radius:18px;background:linear-gradient(135deg,#0b463f,#102d3d);color:white;box-shadow:0 15px 34px rgba(14,45,56,.14)}.setup-hero:after{content:"";position:absolute;width:260px;height:260px;right:20%;top:-190px;border:45px solid rgba(255,255,255,.035);border-radius:50%}.setup-kicker{font-size:9px;font-weight:850;letter-spacing:1.5px;color:#6fe0bd}.setup-hero h2{margin:9px 0 8px;font-size:25px;letter-spacing:-.7px}.setup-hero p{max-width:640px;margin:0;color:#b9d0d1;font-size:12px;line-height:1.7}.progress-card{position:relative;z-index:1;display:flex;align-items:center;gap:13px;min-width:210px;padding:14px 17px;border:1px solid rgba(255,255,255,.12);border-radius:13px;background:rgba(255,255,255,.07)}.progress-card b,.progress-card small{display:block}.progress-card b{font-size:12px}.progress-card small{margin-top:4px;color:#9db7ba;font-size:9px}.progress-ring{--progress:0deg;display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:conic-gradient(#24d39c var(--progress),rgba(255,255,255,.13) 0);position:relative}.progress-ring:after{content:"";position:absolute;inset:5px;border-radius:50%;background:#17453f}.progress-ring strong{position:relative;z-index:1;font-size:11px}.setup-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(310px,.65fr);gap:23px;align-items:start}.section-title{display:flex;align-items:flex-end;justify-content:space-between;margin:0 1px 13px}.section-title span{color:var(--green);font-size:8px;font-weight:850;letter-spacing:1.2px}.section-title h2{margin:5px 0 0;font-size:17px}.section-title>small{color:#89979e;font-size:9px}.setup-steps{display:grid;gap:10px}.setup-step{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:15px;align-items:center;padding:17px 18px;border:1px solid #e0e6e9;border-radius:13px;background:white;box-shadow:0 5px 18px rgba(30,52,65,.035)}.setup-step.done{border-color:#cce9df}.step-marker{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#eef2f4;color:#71818a;font-size:11px;font-weight:850}.setup-step.done .step-marker{background:#dcf5ec;color:#08785a;font-size:16px}.step-copy>span{color:#829199;font-size:7px;font-weight:850;letter-spacing:1.1px}.step-copy h3{margin:4px 0 5px;font-size:13px}.step-copy p{margin:0;color:#687983;font-size:10px;line-height:1.55}.step-copy small{display:block;margin-top:7px;color:#92a0a7;font-size:9px}.step-action span,.step-action button{display:inline-block;min-width:74px;padding:7px 9px;border:0;border-radius:7px;background:#e7f6f1;color:#087459;font-size:8px;font-weight:850;text-align:center}.step-action .pending{background:#fff3dc;color:#9b6b17}.step-action button{background:#eef4f7;color:#3c6476}.step-action button:hover{background:#dfeef3}.course-panel{padding:20px;border:1px solid #e0e6e9;border-radius:15px;background:white;box-shadow:0 7px 22px rgba(30,52,65,.045)}.lessons{display:grid;gap:8px}.lesson{overflow:hidden;border:1px solid #e6eaed;border-radius:10px}.lesson-head{width:100%;display:grid;grid-template-columns:33px 1fr 18px;gap:9px;align-items:center;padding:12px;border:0;background:white;text-align:left}.lesson-head:hover{background:#fafcfc}.lesson-head span b,.lesson-head span small{display:block}.lesson-head b{font-size:11px}.lesson-head small{margin-top:3px;color:#8a989f;font-size:8px}.lesson-head i{color:#829199;font-size:14px;font-style:normal}.lesson-number{display:grid;place-items:center;width:29px;height:29px;border-radius:8px;background:#eef4f5;color:#54717d;font-size:9px;font-weight:850}.lesson.learned .lesson-number{background:#ddf6ed;color:#07805d}.lesson.learned .lesson-number:after{content:"✓"}.lesson.learned .lesson-number{font-size:0}.lesson.learned .lesson-number:after{font-size:12px}.lesson-body{display:none;padding:0 14px 14px 54px}.lesson.open .lesson-body{display:block}.lesson.open .lesson-head i{transform:rotate(45deg)}.lesson-body p{margin:0 0 11px;color:#60727c;font-size:10px;line-height:1.65}.lesson-done{padding:7px 9px;border:1px solid #bee4d7;border-radius:7px;background:#effaf6;color:#087358;font-size:8px;font-weight:800}.security-note{margin-top:14px;padding:14px;border-radius:10px;background:#fff8e9;color:#70551f}.security-note b{font-size:10px}.security-note p{margin:5px 0 0;font-size:9px;line-height:1.55}
.flow-test-card{margin-top:14px;padding:16px;border:1px solid #dbe8ec;border-radius:11px;background:#f7fbfc}.flow-test-card>span{color:var(--green);font-size:7px;font-weight:850;letter-spacing:1.1px}.flow-test-card h3{margin:5px 0 12px;font-size:12px}.flow-test-card dl{display:grid;grid-template-columns:1fr auto;gap:7px;margin:0 0 12px;font-size:9px}.flow-test-card dt{color:#788990}.flow-test-card dd{margin:0;font-weight:800}.flow-test-card code{padding:3px 6px;border-radius:5px;background:#e4f3ee;color:#08755a}.flow-test-card ol{margin:0;padding-left:18px;color:#60727b;font-size:9px;line-height:1.8}.flow-test-card>small{display:block;margin-top:10px;color:#94a0a6;font-size:8px;line-height:1.5}
@media(max-width:1050px){.setup-layout{grid-template-columns:1fr}.course-panel{order:-1}.setup-hero{align-items:flex-start;flex-direction:column}.progress-card{width:100%}}
@media(max-width:760px){.setup-step{grid-template-columns:38px 1fr}.step-action{grid-column:2}.section-title>small{display:none}.setup-hero{padding:24px}.setup-hero h2{font-size:21px}}
@media(max-width:1180px){.integration-grid{grid-template-columns:1fr}}
@media(max-width:760px){.integration-form{grid-template-columns:1fr}.integration-card,.integration-help{padding:20px}}
@media(max-width:1100px){.analytics-grid,.automation-layout{grid-template-columns:1fr}.campaign-panel{grid-column:auto}}
@media(max-width:760px){.channel-config,.flow-branches{grid-template-columns:1fr}.flow-diagram{min-height:0}.branch-line{display:none}}
.analytics-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.metric-panel{min-width:0}.metric-panel .table-wrap{max-width:100%}
@media(max-width:1100px){.analytics-grid{grid-template-columns:1fr}}

.meta-logo{background:#0866ff}.token-steps{margin:0 0 20px;padding-left:20px;color:#50636d;font-size:11px;line-height:2}.token-steps a{color:var(--green);font-weight:800}#metaTokenForm input[type="password"]{height:42px;padding:0 11px;border:1px solid #dce3e7;border-radius:9px;background:#fff;color:var(--ink);letter-spacing:2px}.integration-card>.security-note{margin-top:22px}

/* Diagrama interactivo del flujo */
.flow-canvas{display:flex;flex-direction:column;padding:0;overflow:hidden}
.flow-toolbar{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--line)}
.flow-legend{display:flex;flex-wrap:wrap;gap:14px;margin:0;padding:0;list-style:none;color:#5d7079;font-size:10px;font-weight:700}
.flow-legend li{display:flex;align-items:center;gap:6px}
.flow-legend i{width:9px;height:9px;border-radius:3px;background:#9fb0b8}
.flow-legend .dot-start{background:#1d9b72}.flow-legend .dot-decision{background:#e0a33a}.flow-legend .dot-action{background:#3d8bd6}.flow-legend .dot-department{background:#7a6ad8}.flow-legend .dot-end{background:#43536b}
.flow-zoom{display:flex;align-items:center;gap:6px}
.flow-zoom button{min-width:34px;height:32px;padding:0 10px;border:1px solid #d8e1e5;border-radius:8px;background:#fff;color:#3f5661;font-size:12px;font-weight:750;cursor:pointer}
.flow-zoom button:hover{border-color:var(--green);color:var(--green)}
.flow-zoom span{min-width:46px;color:#5d7079;font-size:11px;font-weight:750;text-align:center}
.flow-diagram{flex:1;min-height:560px;padding:0;background:radial-gradient(#dbe5e1 1px,transparent 1px);background-size:20px 20px}
.flow-svg{display:block;width:100%;height:100%;min-height:560px;touch-action:none;cursor:grab}
.flow-svg.panning{cursor:grabbing}
.flow-hint{margin:0;padding:12px 18px;border-top:1px solid var(--line);color:var(--muted);font-size:10px;line-height:1.7}
.flow-edge{fill:none;stroke:#b7c7cd;stroke-width:2}
.flow-edge.active{stroke:var(--green);stroke-width:3}
.flow-edge.dim{opacity:.35}
.flow-arrow-head{fill:#b7c7cd}
.flow-node-g{cursor:grab}
.flow-node-g:active{cursor:grabbing}
.flow-node-shadow{fill:rgba(24,48,40,.10)}
.flow-node-box{fill:#fff;stroke:#d9e4e0;stroke-width:1.5}
.flow-node-accent{fill:#9fb0b8}
.flow-node-g.start .flow-node-accent{fill:#1d9b72}
.flow-node-g.decision .flow-node-accent{fill:#e0a33a}
.flow-node-g.action .flow-node-accent{fill:#3d8bd6}
.flow-node-g.department .flow-node-accent{fill:#7a6ad8}
.flow-node-g.end .flow-node-accent{fill:#43536b}
.flow-node-step{fill:#9aa9b1;font-size:10px;font-weight:800}
.flow-node-label{fill:var(--ink);font-size:13px;font-weight:800}
.flow-node-type{fill:#7d8f98;font-size:10px;font-weight:700}
.flow-node-badge circle{fill:var(--green)}
.flow-node-g.empty .flow-node-badge circle{fill:#dde5e8}
.flow-node-count{fill:#fff;font-size:11px;font-weight:800;text-anchor:middle}
.flow-node-g.empty .flow-node-count{fill:#7d8f98}
.flow-node-g:hover .flow-node-box{stroke:var(--green)}
.flow-node-g.selected .flow-node-box{stroke:var(--green);stroke-width:2.5}
.flow-node-g.dim{opacity:.4}
.flow-node-g:focus{outline:none}
.flow-node-g:focus-visible .flow-node-box{stroke:#1169f0;stroke-width:3}
.flow-inspector{margin-bottom:18px;padding:16px;border:1px solid #e0e6e9;border-radius:12px;background:#f7faf9}
.flow-inspector[hidden]{display:none}
.flow-inspector header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.flow-inspector h3{margin:0;font-size:15px}
.flow-inspector .chip{padding:3px 8px;border-radius:20px;background:#e6f6f0;color:var(--green);font-size:9px;font-weight:800;white-space:nowrap}
.flow-inspector p{margin:8px 0 0;color:#50636d;font-size:11px;line-height:1.7}
.flow-inspector .flow-counts{display:flex;gap:16px;margin-top:12px}
.flow-inspector .flow-counts div{flex:1;padding:9px;border-radius:9px;background:#fff;text-align:center}
.flow-inspector .flow-counts b{display:block;color:var(--green);font-size:17px;font-weight:850}
.flow-inspector .flow-counts small{color:var(--muted);font-size:9px}
.flow-inspector form{display:grid;gap:10px;margin-top:14px}
.flow-inspector label{display:grid;gap:5px;color:#60727d;font-size:10px;font-weight:800}
.flow-inspector textarea,.flow-inspector select{width:100%;padding:9px;border:1px solid #dce3e7;border-radius:9px;background:#fff;color:var(--ink);font:inherit;font-size:11px;resize:vertical}
.flow-inspector .inspector-actions{display:flex;flex-wrap:wrap;gap:8px}.flow-inspector .inspector-actions .primary-button{flex:1;min-width:150px}
.flow-inspector button{height:36px;padding:0 14px;border:1px solid #cfdadd;border-radius:9px;background:#fff;font-weight:750;cursor:pointer}
.flow-inspector button.primary-button{border:0;background:var(--green);color:#fff}
.flow-inspector .inspector-message{min-height:16px;color:#58717b;font-size:10px}
.flow-inspector .inspector-message.success{color:#08775a}
.flow-inspector .inspector-message.error{color:#b44b3e}
@media (max-width:900px){
  .automation-layout{grid-template-columns:1fr}
  .flow-diagram,.flow-svg{min-height:420px}
  .flow-toolbar{justify-content:flex-start}
}

.schedule-box{display:grid;gap:10px;margin:0;padding:14px;border:1px solid #e0e6e9;border-radius:11px}
.schedule-box legend{padding:0 6px;font-size:11px;font-weight:850}
.schedule-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.flow-settings input[type="time"]{width:100%;height:38px;padding:0 9px;border:1px solid #dce3e7;border-radius:9px;background:#fff;color:var(--ink);font:inherit}
.schedule-summary{margin:0;color:#50636d;font-size:10px;line-height:1.6}

.handoff-state{margin:14px 0 6px;padding:9px 11px;border-radius:9px;font-size:10px;font-weight:750;line-height:1.5}
.handoff-state.human{background:#fdf3e3;color:#8a5b12}
.handoff-state.bot{background:#e9f7f1;color:#0a6f53}
.detail-message{min-height:15px;margin-bottom:8px;color:#58717b;font-size:10px;line-height:1.5}
.detail-message.error{color:#b44b3e}
.detail-message.success{color:#08775a}
#details select:disabled{background:#f1f4f5;color:#9aa9b1;cursor:not-allowed}

.flow-settings input[type="number"]{width:100%;height:38px;padding:0 9px;border:1px solid #dce3e7;border-radius:9px;background:#fff;color:var(--ink);font:inherit}

/* Probador del flujo */
.simulator-layout{display:grid;grid-template-columns:minmax(320px,440px) 1fr;gap:20px;align-items:start}
.simulator-phone{display:flex;flex-direction:column;overflow:hidden;border:1px solid #e0e6e9;border-radius:16px;background:#fff;box-shadow:var(--shadow)}
.simulator-bar{display:flex;gap:11px;align-items:center;padding:13px 15px;background:var(--nav);color:#fff}
.simulator-bar b,.simulator-bar small{display:block}
.simulator-bar b{font-size:12px}
.simulator-bar small{opacity:.7;font-size:9px}
.simulator-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--green);font-size:14px;font-weight:850}
.simulator-chat{display:flex;flex-direction:column;gap:8px;min-height:320px;max-height:460px;padding:16px;overflow-y:auto;background:#eae6df}
.sim-bubble{max-width:84%;padding:9px 12px;border-radius:12px;font-size:12px;line-height:1.55;white-space:pre-wrap;word-break:break-word}
.sim-bubble.cliente{align-self:flex-end;background:#d9fdd3;border-bottom-right-radius:3px}
.sim-bubble.bot{align-self:flex-start;background:#fff;border-bottom-left-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.sim-bubble.aviso{align-self:center;background:#fdf3e3;color:#8a5b12;font-size:10px;font-style:italic}
.simulator-options{display:flex;flex-wrap:wrap;gap:7px;padding:0 16px;background:#eae6df}
.simulator-options:empty{padding:0}
.sim-option{padding:8px 13px;border:1px solid var(--green);border-radius:20px;background:#fff;color:var(--green);font-size:11px;font-weight:750;cursor:pointer}
.sim-option:hover{background:var(--green);color:#fff}
.simulator-input{display:flex;gap:8px;padding:13px 15px;border-top:1px solid var(--line);background:#fff}
.simulator-input input{flex:1;height:40px;padding:0 12px;border:1px solid #dce3e7;border-radius:20px;font:inherit;font-size:12px}
.simulator-input button{height:40px;padding:0 18px;border:0;border-radius:20px;color:#fff;font-weight:750;cursor:pointer}
.simulator-state{padding:22px;border:1px solid #e0e6e9;border-radius:14px;background:#fff;box-shadow:var(--shadow)}
.simulator-state h2{margin:0 0 14px;font-size:17px}
.simulator-state dl{display:grid;grid-template-columns:auto 1fr;gap:7px 14px;margin:0 0 14px}
.simulator-state dt{color:#60727d;font-size:10px;font-weight:800}
.simulator-state dd{margin:0;font-size:11px;font-weight:700}
.simulator-help{color:var(--muted);font-size:10px;line-height:1.75}
@media (max-width:900px){.simulator-layout{grid-template-columns:1fr}}

/* Bandeja: alto fijo, sin saltos, aire de WhatsApp */
#inbox.active{overflow:hidden}
#inbox.active .whatsapp{height:100%;min-height:0;margin-top:4px}
#inbox.active.tab{animation:none}
.whatsapp>section{min-height:0}
.messages{scroll-behavior:auto;overscroll-behavior:contain;padding:18px 22px}
.messages>*{flex:0 0 auto}
.thread-head{flex:0 0 auto}
.chat-list{overscroll-behavior:contain}
.bubble{position:relative;max-width:72%;box-shadow:0 1px 1px rgba(11,20,26,.13)}
.bubble.in{border-radius:0 9px 9px 9px}
.bubble.out{border-radius:9px 0 9px 9px}
.bubble.in::before{content:"";position:absolute;top:0;left:-8px;border:4px solid transparent;border-top-color:#fff;border-right-color:#fff}
.bubble.out::before{content:"";position:absolute;top:0;right:-8px;border:4px solid transparent;border-top-color:#d9fdd3;border-left-color:#d9fdd3}
.composer{flex:0 0 auto}

/* Gestión de personas */
.team-manager{display:grid;grid-template-columns:minmax(320px,420px) 1fr;gap:20px;margin-top:22px;align-items:start}
.team-logo{background:#1d9b72}
.user-table{width:100%;border-collapse:collapse;font-size:12px}
.user-table th{padding:10px 12px;border-bottom:1px solid var(--line);color:#60727d;font-size:10px;font-weight:800;text-align:left}
.user-table td{padding:10px 12px;border-bottom:1px solid #eef2f3;vertical-align:middle}
.user-table small{color:var(--muted);font-size:10px}
.user-table select,.user-table input{height:34px;padding:0 8px;border:1px solid #dce3e7;border-radius:8px;background:#fff;font:inherit;font-size:11px}
.user-table input[type="number"]{width:64px}
.user-table button{height:32px;padding:0 11px;border:1px solid #cfdadd;border-radius:8px;background:#fff;font-size:11px;font-weight:750;cursor:pointer}
.user-table .user-save{border-color:var(--green);color:var(--green)}
.user-table .user-delete{border-color:#e2b3ab;color:#b44b3e}
@media (max-width:1000px){.team-manager{grid-template-columns:1fr}}

/* Canales sociales */
.social-logo{background:#0866ff}
.channel-badge{margin-left:5px;color:#fff}
.channel-badge.messenger{background:#0866ff}
.channel-badge.instagram{background:linear-gradient(45deg,#f09433,#dc2743,#bc1888)}
.telegram-logo{background:#229ed9}
.gchat-logo{background:#1e8e3e}
.channel-badge.telegram{background:#229ed9}
.channel-badge.googlechat{background:#1e8e3e}
.channel-form textarea{padding:9px 11px;border:1px solid #dce3e7;border-radius:9px;background:#fff;color:var(--ink);font:12px/1.4 ui-monospace,Consolas,monospace;resize:vertical;width:100%;box-sizing:border-box}
.field-hint{margin:0;font-size:12px;color:var(--muted,#667);overflow-wrap:anywhere}
.field-hint code{font-size:11px}
.channel-form input:not([type="checkbox"]),#socialForm input:not([type="checkbox"]){height:42px;padding:0 11px;border:1px solid #dce3e7;border-radius:9px;background:#fff;color:var(--ink);font:inherit}

/* Scroll a cargo del usuario y botón de cierre */
.scroll-bottom.nuevos{width:auto;padding:0 14px;border-radius:18px;background:var(--green);color:#fff;font-size:11px;font-weight:800;box-shadow:0 4px 14px rgba(7,150,109,.35)}
.close-chat{width:100%;margin-top:14px;height:42px;border:1px solid #cfdadd;border-radius:10px;background:#fff;color:#7d8f98;font-weight:800;cursor:not-allowed}
.close-chat.danger{border:0;background:#c0392b;color:#fff;cursor:pointer}
.close-chat.danger:hover{background:#a53125}
.close-hint{display:block;margin-top:7px;color:var(--muted);font-size:9.5px;line-height:1.6}
