/* EVOLUX V21 · Edición oro luminoso | Cambios visuales; no altera D1 ni cuentas. */
:root { --azul:#78500a; --celeste:#d69a1c; --claro:#fff5dd; --texto:#302b21; --oro:#d18b08; --oro-fuerte:#f2b929; --crema:#fff9eb; --borde-oro:#e9d7a8; color-scheme:light; }
html { scroll-behavior:smooth; }
body { background:linear-gradient(165deg,#fff7dc 0%,#fffaf1 36%,#fffdf9 100%) fixed !important; color:#362f21 !important; }
header { background:linear-gradient(116deg,#ffe49c 0%,#fff3c8 48%,#fffdf3 100%) !important; color:#3d2d12 !important; border-bottom:1px solid #eacb73; box-shadow:0 3px 18px #a5741320; }
header h1 { color:#523909 !important; font-weight:900; letter-spacing:1.3px; text-shadow:0 1px #fff7dd; }
header p { color:#71511a !important; font-weight:650; }
nav { background:linear-gradient(90deg,#fff0c2,#fff8e9) !important; border-bottom:1px solid #e9d09a; gap:10px !important; }
nav a,nav a:visited { color:#503b18 !important; text-decoration:none; border-radius:9px; padding:8px 12px; font-weight:750; }
nav a:hover,nav a:focus-visible { background:#f8d578 !important; color:#382406 !important; }
nav a[href*="acceso"] { background:#f4cd6c; color:#3d2909 !important; }
.hero { background:linear-gradient(112deg,#ffdf7f,#fff1bf 59%,#fff8e8) !important; border-bottom:1px solid #e9ca73; padding:44px 20px !important; }
.hero h2 { color:#67430b !important; }
.hero p { color:#655237; }
main { color:#3a3227; }
main h2 { color:#725017 !important; }
main h3 { color:#805b1b !important; }
.panel, .card,.producto,.tarjeta { background:#fffefa !important; border:1px solid #eadcb7; box-shadow:0 7px 23px #85642313 !important; }
.panel,.card { border-radius:17px; }
.panel.gold,.card.gold { border-top:5px solid #e4ab27; }
.note,.nota { background:#fff1cc !important; border-left:4px solid #daa129 !important; color:#5b4621; }
button,.boton { background:linear-gradient(135deg,#ffe08b,#e9aa23) !important; color:#412d09 !important; border:1px solid #cf9728 !important; box-shadow:0 3px 9px #b9851822; }
button:hover,.boton:hover { background:linear-gradient(135deg,#ffe6a5,#efb93e) !important; color:#322307 !important; }
button:focus-visible,.boton:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible { outline:3px solid #be8107 !important; outline-offset:2px; }
button:disabled { opacity:.6; cursor:not-allowed; }
button.peligro { background:#ac3b3b !important;color:white !important;border-color:#9b3333 !important; }
button.secundario { background:#fff6e1 !important;color:#714e15 !important;border-color:#e4c883 !important; }
.tabs button { background:#fff8e9 !important; color:#654619 !important; border-color:#e7d1a0 !important; }
.tabs button[aria-selected="true"] { background:linear-gradient(120deg,#ffd875,#e8a620) !important; color:#3a2908 !important; }
input,select,textarea { border:1px solid #d5c49e !important; background:#fffefa !important; color:#342c1e; }
.muted,.ayuda,.small.muted { color:#6c6050 !important; }
.stat, .resumen-red article { background:#fff2d2 !important; border:1px solid #ecd7a6; }
.stat strong,.resumen-red strong,.numero { color:#94600c !important; }
.categorias a,.chip { background:#ffefc3 !important; border:1px solid #e6c984 !important; color:#765014 !important; }
.producto .emoji { background:linear-gradient(130deg,#ffe9a9,#fff7dc) !important; }
.producto h4 { color:#724c0e !important; }
.grupo h3 { border-left-color:#e0a722 !important; }
.etiqueta { background:#fff0c2 !important; color:#754b09 !important; }
.etiqueta.ok { background:#ddf0de !important; color:#17653c !important; }
.tabla th,th { background:#fff0c9 !important; color:#614215 !important; }
.tabla td,td { border-color:#eee2c6; }
.panel-equipo { background:linear-gradient(140deg,#fffbf0,#ffefc6) !important; border-color:#e3cd8d !important; }
.mi-equipo-arbol,.organigrama-desplazable { background:#fffdf7; border-color:#eadbb9; }
.organigrama li::before,.organigrama li::after,.organigrama ul ul::before { border-color:#d6a141 !important; }
.perfil-nodo,button.perfil-nodo { background:#fffdf7 !important; border:1px solid #e5c782 !important; color:#3f3526 !important; box-shadow:0 5px 15px #946e1915 !important; }
.perfil-nodo h3 { color:#724c10 !important; }
.perfil-empresa,button.perfil-empresa { background:linear-gradient(130deg,#98600b,#bc7a13) !important; color:white !important; border-color:#a36d17 !important; }
.perfil-empresa h3,button.perfil-empresa h3 { color:white !important; }
.perfil-empresa .pista-click { color:#fff2ca !important; }
.perfil-fundador,button.perfil-fundador,.nodo-visto { border:2px solid #cf9a2a !important; background:#ffedbc !important; }
.perfil-equipo { border-top:4px solid #d7a645 !important; }
.perfil-vacio { border:2px dashed #d8c49b !important; background:#fffaf0 !important; color:#7b6f55 !important; }
.leyenda-red span,.ficha-dato { background:#fff0c7 !important; color:#6d4d17 !important; }
.ficha-dato strong { color:#91600f !important; }
.modal-capa { background:#34260cbf !important; }
.modal-ficha { background:#fffdf7 !important; }
footer { background:#f8e8c0 !important; color:#674e22 !important; border-top:1px solid #e9ce8d; }
/* Pirámide 1–4–8 en el perfil real y en la demostración. */
.evx-tree-scroller { width:100%; overflow-x:auto; padding:18px 8px 14px; border:1px solid #ebd8ad; background:linear-gradient(160deg,#fffdf7,#fff6dc); border-radius:16px; scrollbar-color:#d0a64b #fff5dc; }
.evx-tree { width:100%; min-width:780px; position:relative; padding:3px 9px 15px; isolation:isolate; }
.evx-tree svg.evx-lines { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:0; }
.evx-tree-root { display:flex; justify-content:center; margin-bottom:53px; position:relative; z-index:1; }
.evx-tree-row { display:grid; align-items:stretch; gap:10px; position:relative; z-index:1; }
.evx-l1 { grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:55px; }
.evx-l2 { grid-template-columns:repeat(8,minmax(0,1fr)); }
.evx-cell { min-width:0; min-height:78px; padding:11px 6px; border-radius:12px; border:1.5px dashed #cdbb93; background:#fffdfa; text-align:center; color:#806f4f; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; overflow-wrap:anywhere; }
.evx-cell strong { font-size:13px; line-height:1.27; color:#674813; }
.evx-cell small { font-size:10px; line-height:1.3; color:#7d7160; }
.evx-cell.evx-filled { border:1.5px solid #d7a33b; background:#fff0c6; }
.evx-cell.evx-owner { min-height:85px; width:240px; max-width:100%; background:linear-gradient(135deg,#ffdc78,#fff1c2); border:2px solid #cd9121; box-shadow:0 6px 20px #af7e241f; }
.evx-cell.evx-empty strong { color:#8d805f; }
.evx-cell .perfil-nodo, .evx-cell button.perfil-nodo { display:block; width:100% !important; min-height:0; padding:7px 5px; border:0 !important; box-shadow:none !important; background:transparent !important; color:#604515 !important; font-weight:normal !important; }
.evx-cell .perfil-nodo h3 { font-size:12px !important; margin:0 0 4px; color:#603f10 !important; }
.evx-cell .perfil-nodo p { font-size:11px; margin:3px 0; }
.evx-cell .perfil-nodo .etiqueta { display:block; padding:4px; font-size:10px; margin-top:6px; }
.evx-cell .perfil-nodo .pista-click { font-size:10px; margin-top:5px; color:#7e5a16; }
.evx-l2 .evx-cell { padding:8px 3px; min-height:79px; }
.evx-l2 .evx-cell strong { font-size:11px; }
.evx-l2 .evx-cell .perfil-nodo h3 { font-size:11px !important; }
.evx-l2 .evx-cell .perfil-nodo p { font-size:10px; }
.evx-tree-caption { font-size:13px; color:#796646; text-align:center; margin:12px 0 0; }
.evx-overflow { font-size:12px; margin:14px 0 0; color:#6f5625; padding:8px; border:1px solid #ead9ad; border-radius:10px; }
.evx-overflow summary { font-weight:700; cursor:pointer; }
.evx-overflow ul { list-style:disc; display:block; margin:6px 0 0 15px; padding:0; }
.evx-overflow li { display:list-item; padding:2px; text-align:left; }
@media (max-width:640px) {
  header { padding:23px 12px !important; }
  nav { flex-wrap:wrap; }
  .statgrid { gap:6px; }
  .stat { padding:9px 3px !important; }
  .stat strong { font-size:19px !important; }
  .evx-tree { min-width:770px; }
}

/* V21.1: ramas flexibles; scroll horizontal para redes numerosas. */
.evx-branch-scroll{overflow-x:auto;max-width:100%;padding:18px 10px 26px;background:linear-gradient(140deg,#fffdf7,#fff3d4);border:1px solid #e5c981;border-radius:15px}
.evx-branch-tree{width:max-content;min-width:100%;text-align:center;color:#604515}
.evx-branch-owner{display:flex;justify-content:center;margin-bottom:45px;position:relative}
.evx-branch-owner:after{content:'';position:absolute;bottom:-45px;height:45px;border-left:2px solid #c98a1e}
.evx-branch-row{display:flex;align-items:flex-start;justify-content:center;gap:16px;position:relative;padding-top:26px}
.evx-branch-row:before{content:'';position:absolute;top:0;left:calc(12.5% - 5px);right:calc(12.5% - 5px);border-top:2px solid #c98a1e}
.evx-branch{flex:0 0 180px;width:180px;position:relative}
.evx-branch:before{content:'';position:absolute;top:-26px;left:50%;height:26px;border-left:2px solid #c98a1e}
.evx-branch-node{border:1.5px solid #d7a33b;border-radius:12px;background:#fff0c6;padding:11px 7px;min-height:65px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;overflow-wrap:anywhere}
.evx-branch-owner .evx-branch-node{min-width:210px;background:linear-gradient(135deg,#ffd366,#fff0bd);border-width:2px}
.evx-branch-node strong{font-size:12px}.evx-branch-node small{font-size:10px;color:#735a2d}
.evx-branch-node.evx-placeholder{background:#fffdf7;border:1px dashed #cdbb93;color:#806f4f;font-size:11px}
.evx-branch-children{display:flex;gap:7px;justify-content:center;align-items:flex-start;position:relative;padding-top:30px}
.evx-branch-children:before{content:'';position:absolute;top:0;left:50%;height:17px;border-left:2px solid #c98a1e}
.evx-branch-children>.evx-branch-node{min-width:100px;max-width:125px;flex:0 0 110px;position:relative}
.evx-branch-children>.evx-branch-node:before{content:'';position:absolute;top:-14px;left:50%;height:14px;border-left:2px solid #c98a1e}
.evx-branch-children:after{content:'';position:absolute;top:17px;left:25%;right:25%;border-top:2px solid #c98a1e;pointer-events:none}
.evx-expand,.evx-profile-action{border:1px solid #c79430!important;background:#fff9e9!important;color:#69450e!important;border-radius:7px!important;font-size:10px!important;padding:6px!important;cursor:pointer}
.evx-collapsed-hint{font-size:11px;color:#84672f;padding:10px 0}
