/* ==========================================================================
   uh-ui.css · Sistema de diseño UrbanHoff · V9.6
   --------------------------------------------------------------------------
   Fuente ÚNICA de verdad visual para: shell (menú + barra superior), Inicio y
   Gestión de Clientes, más los componentes base (botones, campos, tarjetas,
   tablas, modales) que heredan las demás vistas.

   Cómo gana sin !important: todo lo histórico vive en assets/uh-legacy.css dentro
   de @layer. Este archivo NO tiene capa, así que cualquier propiedad declarada acá
   gana sobre lo heredado sin importar la especificidad.

   Reglas del archivo:
   - 0 !important (única excepción: la utilidad .hidden, que debe ganarle a todo).
   - 3 cortes: 640px (celular) · 1024px (tablet) · ≥1025px (escritorio).
   - El tema oscuro SOLO redefine tokens de color (R6). Nada de layout en .dark-mode.
   - Hijos de grid/flex con texto llevan min-width:0 (R8).
   ========================================================================== */

/* ---------- 0 · TOKENS ---------- */
:root{
  /* Marca */
  --uh-brand:#062B5B;           /* azul noche */
  --uh-brand-ink:#041E40;       /* menú lateral */
  --uh-accent:#31C4D4;          /* cian: indicadores, foco, detalles */

  /* Superficies y texto · claro */
  --uh-bg:#F3F5F8;
  --uh-surface:#FFFFFF;
  --uh-surface-2:#F7F9FB;
  --uh-surface-3:#EEF2F6;
  --uh-border:#E2E7EE;
  --uh-border-strong:#CDD5E0;
  --uh-text:#0E1C2F;            /* 16.9:1 sobre blanco */
  --uh-text-2:#45556B;          /* 7.4:1 */
  --uh-text-3:#5D6D83;          /* 5.2:1 (4.8:1 sobre el fondo) */
  --uh-primary:#0B3D7A;         /* botones primarios · 10.6:1 con blanco */
  --uh-primary-hover:#082F60;
  --uh-primary-soft:#E8EFF8;
  --uh-link:#0B5CAD;

  /* Estados (texto sobre fondo suave ≥ 4.5:1) */
  --uh-ok:#0B7A4F;   --uh-ok-soft:#E6F4EE;
  --uh-warn:#9A5B00; --uh-warn-soft:#FDF3E1;
  --uh-bad:#B42318;  --uh-bad-soft:#FDECEA;
  --uh-info:#0B5CAD; --uh-info-soft:#E7F0FA;
  --uh-violet:#5B3FB3; --uh-violet-soft:#EFEBFA;

  /* Forma y ritmo */
  --uh-r-sm:8px; --uh-r:12px; --uh-r-lg:16px;
  --uh-s1:4px; --uh-s2:8px; --uh-s3:12px; --uh-s4:16px; --uh-s5:24px; --uh-s6:32px;
  --uh-shadow:0 1px 2px rgba(14,28,47,.05),0 1px 3px rgba(14,28,47,.04);
  --uh-shadow-lg:0 12px 40px rgba(14,28,47,.18);
  --uh-control-h:40px;
  --uh-topbar-h:64px;
  --uh-sidebar-w:248px;
  --uh-pad:24px;

  /* Tipografía */
  --uh-font:"Inter",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  --uh-font-display:"Montserrat","Inter",ui-sans-serif,-apple-system,"Segoe UI",Arial,sans-serif;
  --uh-fs-xs:12px; --uh-fs-sm:13px; --uh-fs:14px; --uh-fs-md:16px; --uh-fs-lg:20px; --uh-fs-xl:28px;
}
body.dark-mode{
  --uh-bg:#0A1424;
  --uh-surface:#101D31;
  --uh-surface-2:#14243B;
  --uh-surface-3:#1A2D47;
  --uh-border:#22354F;
  --uh-border-strong:#33496A;
  --uh-text:#E8EEF6;            /* 14.6:1 sobre surface */
  --uh-text-2:#B3C0D1;          /* 8.6:1 */
  --uh-text-3:#8D9CB2;          /* 5.6:1 */
  --uh-primary:#2F6FD0;         /* 4.9:1 con blanco */
  --uh-primary-hover:#3B7DE0;
  --uh-primary-soft:#17304F;
  --uh-link:#7DB3F5;
  --uh-ok:#5FD3A1;   --uh-ok-soft:#123426;
  --uh-warn:#F2C26B; --uh-warn-soft:#352914;
  --uh-bad:#F59A92;  --uh-bad-soft:#3A1C1C;
  --uh-info:#7DB3F5; --uh-info-soft:#152B47;
  --uh-violet:#B8A6F5; --uh-violet-soft:#261F45;
  --uh-shadow:0 1px 2px rgba(0,0,0,.3);
  --uh-shadow-lg:0 16px 48px rgba(0,0,0,.5);
}

/* ---------- 1 · BASE ---------- */
.hidden{display:none!important} /* utilidad: única !important permitida */
html{font-size:16px;height:auto;overflow:visible;-webkit-text-size-adjust:100%}
body{height:auto;min-height:100%}
body{
  margin:0;font-family:var(--uh-font);font-size:var(--uh-fs);line-height:1.5;
  color:var(--uh-text);background:var(--uh-bg);background-image:none;
  overflow:visible;-webkit-font-smoothing:antialiased;
}
#app button,#app input,#app select,#app textarea,#modalRoot button,#modalRoot input,#modalRoot select,#modalRoot textarea{font-family:inherit}
:focus-visible{outline:2px solid var(--uh-accent);outline-offset:2px}
/* Las capas viejas pintaban texto con -webkit-text-fill-color y sombras: se neutraliza en todo el shell. */
#app *,#modalRoot *{-webkit-text-fill-color:currentColor;text-shadow:none}

/* ---------- 2 · COMPONENTES BASE ---------- */

/* Botones: .primary / .secondary son las clases históricas de toda la app */
.primary,.secondary,.uh-btn-sm{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:auto;min-height:36px;padding:0 14px;margin:0;
  border-radius:var(--uh-r-sm);border:1px solid transparent;
  font-family:var(--uh-font);font-size:var(--uh-fs-sm);font-weight:600;line-height:1.2;
  letter-spacing:0;text-transform:none;white-space:nowrap;
  box-shadow:none;transform:none;cursor:pointer;
  transition:background-color .15s,border-color .15s,color .15s;
}
.primary{background:var(--uh-primary);color:#fff;border-color:var(--uh-primary)}
.primary:hover{background:var(--uh-primary-hover);border-color:var(--uh-primary-hover)}
.secondary{background:var(--uh-surface);color:var(--uh-text);border-color:var(--uh-border-strong)}
.secondary:hover{background:var(--uh-surface-2);border-color:var(--uh-text-3)}
.uh-btn-sm{min-height:30px;padding:0 10px;font-size:var(--uh-fs-xs);background:var(--uh-surface);color:var(--uh-text);border-color:var(--uh-border-strong)}
.uh-btn-sm:hover{background:var(--uh-surface-2)}
.primary:disabled,.secondary:disabled{opacity:.55;cursor:not-allowed}

/* Campos */
.field{display:flex;flex-direction:column;gap:6px;margin:0 0 var(--uh-s4)}
.field label,label>span:first-child{font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2);letter-spacing:0;text-transform:none}
.field input,.field select,.field textarea,.crm-select,.crm-search,
#modalRoot input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]),#modalRoot select,#modalRoot textarea{
  width:100%;min-width:0;min-height:var(--uh-control-h);height:auto;padding:8px 12px;
  border:1px solid var(--uh-border-strong);border-radius:var(--uh-r-sm);
  background:var(--uh-surface);color:var(--uh-text);
  font-family:var(--uh-font);font-size:var(--uh-fs);font-weight:400;line-height:1.4;
  box-shadow:none;
}
#modalRoot textarea,.field textarea{min-height:96px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus,.crm-select:focus,.crm-search:focus,#modalRoot input:focus,#modalRoot select:focus,#modalRoot textarea:focus{
  outline:none;border-color:var(--uh-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--uh-accent) 35%,transparent);
}
::placeholder{color:var(--uh-text-3);opacity:1}
body.dark-mode select option{background:var(--uh-surface);color:var(--uh-text)}

/* Chips / badges */
.uh-chip,.crm-badge{
  display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:999px;
  font-size:11px;font-weight:600;letter-spacing:0;text-transform:none;white-space:nowrap;
  background:var(--uh-surface-3);color:var(--uh-text-2);border:0;
}
.uh-chip[data-tone=danger],.crm-badge.high{background:var(--uh-bad-soft);color:var(--uh-bad)}
.uh-chip[data-tone=warning]{background:var(--uh-warn-soft);color:var(--uh-warn)}
.uh-chip[data-tone=info]{background:var(--uh-info-soft);color:var(--uh-info)}
.uh-chip[data-tone=ok]{background:var(--uh-ok-soft);color:var(--uh-ok)}

/* Tarjeta genérica (clases históricas que funcionan como tarjeta) */
.v256-card,.crm-panel,.v255-priority-crm,.uhs-dashboard-summary,.v92592-gmail-shortcut,#radarDashCard,
.v92533-performance-card,.cq-filters{
  background:var(--uh-surface);border:1px solid var(--uh-border);border-radius:var(--uh-r);
  box-shadow:var(--uh-shadow);background-image:none;color:var(--uh-text);
}

/* Modal */
.modal-back{
  position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;
  padding:48px var(--uh-s4);overflow:auto;background:rgba(6,18,36,.55);backdrop-filter:blur(3px);
}
.modal{
  max-width:100%;max-height:none;margin:0;padding:var(--uh-s5);
  background:var(--uh-surface);color:var(--uh-text);border:1px solid var(--uh-border);
  border-radius:var(--uh-r-lg);box-shadow:var(--uh-shadow-lg);background-image:none;
}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--uh-s4);margin:0 0 var(--uh-s4);padding:0}
.modal-head h3{margin:0;font-family:var(--uh-font-display);font-size:var(--uh-fs-lg);font-weight:700;color:var(--uh-text);line-height:1.25}
.modal .x,.modal-head .x{
  flex:0 0 auto;width:36px;height:36px;min-height:0;padding:0;border-radius:var(--uh-r-sm);
  border:1px solid var(--uh-border);background:var(--uh-surface);color:var(--uh-text-2);font-size:20px;line-height:1;cursor:pointer;
}

/* ---------- 3 · SHELL ---------- */
.app{
  display:grid;grid-template-columns:var(--uh-sidebar-w) minmax(0,1fr);
  min-height:100vh;min-height:100dvh;height:auto;max-height:none;overflow:visible;background:var(--uh-bg);
  transition:grid-template-columns .2s ease;
}
.app.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}

/* Menú lateral: siempre azul noche, en ambos temas */
.sidebar{
  position:sticky;top:0;align-self:start;z-index:40;
  display:flex;flex-direction:column;gap:0;
  width:var(--uh-sidebar-w);height:100vh;height:100dvh;min-height:0;
  padding:20px 12px 16px;margin:0;overflow:hidden auto;
  background:var(--uh-brand-ink);background-image:none;color:#fff;
  border:0;border-right:1px solid rgba(255,255,255,.06);box-shadow:none;
  transform:none;opacity:1;
}
.app.sidebar-collapsed .sidebar{transform:translateX(-100%);opacity:0;pointer-events:none;padding-left:0;padding-right:0}
.sidebar-brand-v92579{display:flex;align-items:center;justify-content:flex-start;padding:4px 10px 20px;margin:0 0 12px;border-bottom:1px solid rgba(255,255,255,.08);background:none}
.sidebar-brand-v92579 img{display:block;width:168px;height:auto;max-width:100%;max-height:none;filter:none;opacity:1;object-fit:fill}
.sidebar .nav{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-height:0;margin:0;padding:0}
.sidebar .nav button{
  display:flex;align-items:center;gap:12px;width:100%;min-height:40px;height:auto;padding:8px 12px;margin:0;
  border:0;border-radius:var(--uh-r-sm);background:transparent;box-shadow:none;
  color:rgba(255,255,255,.72);font-family:var(--uh-font);font-size:12.5px;font-weight:600;
  letter-spacing:.02em;word-spacing:0;text-align:left;text-transform:uppercase;line-height:1.25;cursor:pointer;
  position:relative;transition:background-color .15s,color .15s;
}
.sidebar .nav button:hover{background:rgba(255,255,255,.06);color:#fff}
.sidebar .nav button.active{background:rgba(49,196,212,.12);color:#fff}
.sidebar .nav button.active::before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:3px;background:var(--uh-accent)}
.sidebar .nav .nav-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;width:18px;height:18px;margin:0;background:none;color:inherit}
.sidebar .nav .nav-icon svg{width:18px;height:18px;stroke:currentColor}
.sidebar .nav .nav-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar .side-bottom{display:flex;gap:8px;margin:12px 0 0;padding:12px 0 0;border-top:1px solid rgba(255,255,255,.08);background:none}
.sidebar .side-icon-btn{
  flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;height:40px;min-height:0;padding:0;
  border:1px solid rgba(255,255,255,.12);border-radius:var(--uh-r-sm);background:rgba(255,255,255,.04);color:rgba(255,255,255,.8);cursor:pointer;box-shadow:none;
}
.sidebar .side-icon-btn:hover{background:rgba(255,255,255,.1);color:#fff}
.sidebar .side-icon-btn svg{width:18px;height:18px;stroke:currentColor}

.workspace{display:flex;flex-direction:column;min-width:0;min-height:100vh;min-height:100dvh;height:auto;max-height:none;background:var(--uh-bg);overflow:visible}

/* Barra superior: blanca, limpia, una sola fila */
.workspace>.topbar,.topbar{
  position:sticky;top:0;z-index:30;
  display:flex;align-items:center;gap:var(--uh-s3);
  height:var(--uh-topbar-h);min-height:var(--uh-topbar-h);padding:0 var(--uh-pad);margin:0;
  background:var(--uh-surface);background-image:none;color:var(--uh-text);
  border:0;border-bottom:1px solid var(--uh-border);box-shadow:none;overflow:visible;
}
.topbar-left{display:flex;align-items:center;gap:var(--uh-s3);flex:1 1 auto;min-width:0;max-width:none;padding:0;grid-column:auto}
.topbar .sidebar-toggle,#menuBtn{
  flex:0 0 auto;display:inline-flex;width:40px;height:40px;min-width:0;min-height:0;padding:0;
  border:1px solid var(--uh-border);border-radius:var(--uh-r-sm);background:var(--uh-surface);color:var(--uh-text);font-size:18px;
}
.dashboard-briefcase,.topbar-brand-home,.topbar-inline-contact,.topbar-contact,.topbar-stats{display:none}
.topbar-title{min-width:0;max-width:100%;overflow:hidden}
.topbar-title h2{
  margin:0;font-family:var(--uh-font-display);font-size:18px;font-weight:700;line-height:1.25;letter-spacing:0;text-transform:none;
  color:var(--uh-text);text-shadow:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;
}
.topbar-title p{margin:2px 0 0;font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.topbar-actions{display:flex;align-items:center;gap:var(--uh-s2);flex:0 0 auto;margin:0;grid-column:auto;justify-self:auto}
.topbar .top-action{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  width:auto;min-width:40px;height:40px;min-height:0;padding:0 10px;margin:0;
  border:1px solid var(--uh-border);border-radius:var(--uh-r-sm);background:var(--uh-surface);
  color:var(--uh-text-2);font-size:var(--uh-fs-sm);font-weight:600;box-shadow:none;cursor:pointer;
}
.topbar .top-action:hover{background:var(--uh-surface-2);color:var(--uh-text)}
.topbar .uhs-top-badge{padding:0 12px}
.topbar .uhs-top-badge b{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--uh-primary-soft);color:var(--uh-primary);font-size:11px;font-weight:700}
body.dark-mode .topbar .uhs-top-badge b{color:var(--uh-link)}
.topbar .uhs-top-icon{font-size:15px;line-height:1}
.topbar-user{display:flex;align-items:center;gap:10px;flex:0 0 auto;min-width:0;padding:0 0 0 var(--uh-s3);margin:0;border:0;border-left:1px solid var(--uh-border);background:none;grid-column:auto}
.topbar-user-avatar{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:50%;overflow:hidden;background:var(--uh-brand);color:#fff;border:0}
.topbar-user-avatar b{font-size:12px;font-weight:700;color:#fff}
.topbar-user-avatar img{width:100%;height:100%;object-fit:cover}
.topbar-user-copy{display:flex;flex-direction:column;min-width:0}
.topbar-user-copy strong{font-size:var(--uh-fs-sm);font-weight:600;color:var(--uh-text);line-height:1.2;white-space:nowrap}
.topbar-user-copy small{font-size:var(--uh-fs-xs);color:var(--uh-text-3);line-height:1.2;white-space:nowrap}
.workspace>.topbar .topbar-clock,.topbar-clock{
  order:-1;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;flex:0 0 auto;
  position:static;transform:none;width:auto;min-width:0;padding:0 var(--uh-s3) 0 0;margin:0;
  border:0;border-right:1px solid var(--uh-border);text-align:right;background:none;
}
.topbar-actions{order:0}.topbar-user{order:1}.topbar-left{order:-2}
.topbar-clock strong{font-family:var(--uh-font);font-size:var(--uh-fs-md);font-weight:600;letter-spacing:0;line-height:1.1;color:var(--uh-text);font-variant-numeric:tabular-nums}
.topbar-clock small{display:block;margin:2px 0 0;font-size:11px;color:var(--uh-text-3);text-transform:none;white-space:nowrap}
.topbar-clock small::first-letter{text-transform:uppercase}
.topbar .top-action *{color:inherit}

.content,#content.content{
  flex:1 1 auto;width:100%;max-width:none;min-width:0;height:auto;min-height:0;
  padding:var(--uh-pad);margin:0;overflow:visible;background:transparent;
}
body.dashboard-view{overflow:visible}
body.dashboard-view .content{height:auto;overflow:visible}
.content>*{max-width:1440px;margin-left:auto;margin-right:auto}
.content>.module-frame,.content>iframe{max-width:none}
.module-frame{display:block;width:100%;height:calc(100dvh - var(--uh-topbar-h) - 2*var(--uh-pad));border:0;border-radius:var(--uh-r);background:var(--uh-surface)}

/* Títulos de tarjeta, compartidos por Inicio y Clientes */
.v256-card-head,.v92532-journey-head,.crm-toolbar,.v92533-performance-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:var(--uh-s3);flex-wrap:wrap;
  margin:0 0 var(--uh-s4);padding:0;border:0;
}
.v256-card-head>div:first-child,.v92532-journey-head>div:first-child,.crm-toolbar>div:first-child,.v92533-performance-head>div:first-child{min-width:0;flex:1 1 220px}
.v256-card-head h3,.v92532-journey-head h3,.crm-toolbar h3,.v92533-performance-head h3,.v92533-clients-panel h3{
  margin:0;font-family:var(--uh-font-display);font-size:var(--uh-fs-md);font-weight:700;line-height:1.3;color:var(--uh-text);letter-spacing:0;text-transform:none;
}
.v256-card-head span,.crm-panel-sub,.v92533-performance-head p{display:block;margin:2px 0 0;font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3);line-height:1.4}

/* ---------- 4 · INICIO ---------- */
.v256-dashboard{display:flex;flex-direction:column;gap:var(--uh-s5);height:auto;max-width:1440px;padding:0}

/* KPIs: 4 tarjetas idénticas */
.v256-health,#v256Health{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--uh-s4);margin:0}
.v256-health>article{
  position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;
  min-width:0;min-height:0;height:auto;padding:var(--uh-s4) var(--uh-s4) var(--uh-s4) 20px;margin:0;grid-column:auto;grid-row:auto;
  background:var(--uh-surface);background-image:none;border:1px solid var(--uh-border);border-radius:var(--uh-r);
  box-shadow:var(--uh-shadow);color:var(--uh-text);overflow:hidden;
}
.v256-health>article::before{content:"";display:block;opacity:1;height:auto;border-radius:0;right:auto;position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--uh-tone,var(--uh-primary))}
.v256-health>article.tone-primary{--uh-tone:var(--uh-brand)}
.v256-health>article.tone-amber{--uh-tone:#D98A00}
.v256-health>article.tone-violet{--uh-tone:#6C4FD1}
.v256-health>article.tone-green{--uh-tone:#12936A}
body.dark-mode .v256-health>article.tone-primary{--uh-tone:var(--uh-accent)}
.v256-health>article>span,.v256-health>article>div>span{font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2);letter-spacing:0;text-transform:none;line-height:1.3}
.v256-health>article>strong,.v256-health>article>div>strong{display:block;font-family:var(--uh-font-display);font-size:var(--uh-fs-xl);font-weight:700;line-height:1.15;color:var(--uh-text);letter-spacing:-.01em}
.v256-health>article>small,.v256-health>article>div>small{display:block;font-size:var(--uh-fs-xs);color:var(--uh-text-3);line-height:1.4}
.v256-health>article>div:first-child{display:flex;flex-direction:column;gap:4px;min-width:0}
.v256-health .v256-health-action{
  margin-top:auto;align-self:flex-start;min-height:0;height:auto;padding:8px 0 0;
  border:0;background:none;color:var(--uh-link);font-size:var(--uh-fs-xs);font-weight:600;box-shadow:none;cursor:pointer;
}
.v256-health .v256-health-action::after{content:"\00a0→"}
.v256-health .v256-health-action:hover{text-decoration:underline;text-underline-offset:3px}
.v256-health-main{gap:var(--uh-s3)}

/* Medidor (Inicio y Clientes) */
.v92529-meter{width:100%;margin:auto 0 0;padding:0;background:none;border:0;max-width:none}
.v256-health-main .v92529-meter{margin-top:var(--uh-s2)}
.v92529-meter-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 0 10px}
.v92529-meter-head strong{font-family:var(--uh-font);font-size:var(--uh-fs-sm);font-weight:700;color:var(--uh-text)}
.v92529-meter-head span{font-size:11px;color:var(--uh-text-3);font-weight:500}
.v92529-meter-track{position:relative;display:flex;height:6px;border-radius:999px;overflow:visible;background:var(--uh-surface-3)}
.v92529-meter-track i{flex:1 1 0;height:6px}
.v92529-meter-track i.red{background:#E5564B;border-radius:999px 0 0 999px}
.v92529-meter-track i.yellow{background:#E9B23C}
.v92529-meter-track i.green{background:#1FA97A;border-radius:0 999px 999px 0}
.v92529-meter-marker{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;background:var(--uh-surface);border:3px solid var(--uh-text);box-shadow:0 1px 3px rgba(0,0,0,.25)}
.v92529-meter-scale{display:flex;justify-content:space-between;margin:6px 0 0;font-size:11px;color:var(--uh-text-3)}

/* Agenda + Notas */
.v92524-main-top{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:var(--uh-s4);align-items:stretch;margin:0}
.v256-card{display:flex;flex-direction:column;min-width:0;min-height:0;height:auto;padding:var(--uh-s5);margin:0}
.v256-head-actions{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:var(--uh-s2);flex-wrap:wrap;margin:0;width:auto}
.v256-head-actions>*,.v256-card-foot>*{margin:0;order:0;position:static;transform:none}
.v256-card-foot>button,.v256-head-actions>button{width:auto;flex:0 0 auto;display:inline-flex}
.v256-conn{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:11px;font-weight:600;letter-spacing:.02em;border:0;background:var(--uh-surface-3);color:var(--uh-text-2)}
.v256-conn.wait{background:var(--uh-warn-soft);color:var(--uh-warn)}
.v256-conn.ok{background:var(--uh-ok-soft);color:var(--uh-ok)}
.v256-calendar-list{flex:1 1 auto;min-height:200px;display:flex;flex-direction:column;gap:var(--uh-s2);margin:0;padding:0;border:0;background:none;overflow:auto}
.v256-empty{
  flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--uh-s3);
  width:100%;max-width:none;margin:0;min-height:180px;padding:var(--uh-s5);border:1px dashed var(--uh-border-strong);border-radius:var(--uh-r);
  background:var(--uh-surface-2);color:var(--uh-text-3);font-size:var(--uh-fs-sm);text-align:center;line-height:1.5;
}
.v256-card-foot{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--uh-s2);flex-wrap:wrap;margin:var(--uh-s4) 0 0;padding:var(--uh-s4) 0 0;border-top:1px solid var(--uh-border)}
.v92524-notes textarea,#v256QuickNote{
  flex:1 1 auto;width:100%;min-height:200px;height:auto;margin:0;padding:var(--uh-s3);resize:vertical;
  border:1px solid var(--uh-border);border-radius:var(--uh-r-sm);background:var(--uh-surface-2);color:var(--uh-text);
  font-family:var(--uh-font);font-size:var(--uh-fs);line-height:1.55;box-shadow:none;
}
.v92524-note-hint{display:flex;justify-content:space-between;gap:var(--uh-s2);margin:var(--uh-s2) 0 0;font-size:11px;color:var(--uh-text-3)}

/* Gestión rápida de clientes */
.v92524-quick{gap:var(--uh-s4)}
.v92524-quick>.v256-card-head{margin:0}
.uh-list,#uhCrmTasks,#uhCrmTaskClients{
  margin:0;padding:0;border:1px solid var(--uh-border);border-radius:var(--uh-r);background:var(--uh-surface);overflow:hidden;
}
.uh-list-head{display:flex;align-items:center;justify-content:space-between;gap:var(--uh-s3);padding:var(--uh-s3) var(--uh-s4);background:var(--uh-surface-2);border-bottom:1px solid var(--uh-border)}
.uh-list-head strong{display:block;font-size:var(--uh-fs-sm);font-weight:700;color:var(--uh-text)}
.uh-list-head small{display:block;margin-top:1px;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.uh-count{display:inline-grid;place-items:center;min-width:26px;height:24px;padding:0 8px;border-radius:999px;background:var(--uh-primary-soft);color:var(--uh-primary);font-size:var(--uh-fs-xs);font-weight:700}
body.dark-mode .uh-count{color:var(--uh-link)}
.uh-list-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--uh-s3);padding:10px var(--uh-s4);border-top:1px solid var(--uh-border)}
.uh-list-head+.uh-list-row{border-top:0}
.uh-list-main{min-width:0}
.uh-list-main strong{display:block;font-size:var(--uh-fs-sm);font-weight:600;color:var(--uh-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uh-list-main small{display:block;margin-top:2px;font-size:var(--uh-fs-xs);color:var(--uh-text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uh-list-title{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.uh-list-title strong{display:inline}
.uh-list-side{display:flex;align-items:center;gap:var(--uh-s2)}
.uh-list-empty,.uh-list-foot{padding:var(--uh-s3) var(--uh-s4);font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.uh-list-foot{text-align:right;border-top:1px solid var(--uh-border)}

#v256PriorityList{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:var(--uh-s2);margin:0;padding:0}
.v256-priority-row{
  display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:var(--uh-s3);
  min-height:56px;padding:10px 12px;margin:0;border:1px solid var(--uh-border);border-radius:var(--uh-r-sm);background:var(--uh-surface);box-shadow:none;
}
.v256-priority-row>i{width:8px;height:8px;border-radius:50%;background:var(--uh-text-3)}
.v256-priority-row.red>i{background:#E5564B}
.v256-priority-row.ok>i{background:#1FA97A}
.v256-priority-row>div{min-width:0}
.v256-priority-row strong{display:block;font-size:var(--uh-fs-sm);font-weight:600;color:var(--uh-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v256-priority-row small{display:block;font-size:var(--uh-fs-xs);color:var(--uh-text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v256-priority-row button{
  min-height:30px;height:auto;padding:0 10px;border:1px solid var(--uh-border-strong);border-radius:var(--uh-r-sm);
  background:var(--uh-surface);color:var(--uh-text);font-size:var(--uh-fs-xs);font-weight:600;box-shadow:none;cursor:pointer;
}
.v256-priority-row button:hover{background:var(--uh-surface-2)}

/* Búsquedas (resumen) */
.uhs-dashboard-summary{display:flex;flex-direction:column;gap:var(--uh-s3);padding:var(--uh-s5);margin:0}
.uhs-dash-compact{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:var(--uh-s5);margin:0;padding:0;border:0;background:none}
.uhs-dash-title{min-width:0}
.uhs-dash-title h4{margin:0;font-family:var(--uh-font-display);font-size:var(--uh-fs-md);font-weight:700;color:var(--uh-text)}
.uhs-dash-title span{display:block;margin-top:2px;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.uhs-dash-mini{display:flex;gap:var(--uh-s2);margin:0}
.uhs-dash-mini>div{display:flex;flex-direction:column;justify-content:center;min-width:96px;padding:8px 12px;border:1px solid var(--uh-border);border-radius:var(--uh-r-sm);background:var(--uh-surface-2)}
.uhs-dash-mini span{font-size:11px;font-weight:600;color:var(--uh-text-3);text-transform:none;letter-spacing:0}
.uhs-dash-mini strong{font-family:var(--uh-font-display);font-size:var(--uh-fs-lg);font-weight:700;line-height:1.2;color:var(--uh-text)}
.uhs-dash-mini small{font-size:11px;color:var(--uh-text-3)}
.uhpa-dash-client-alerts{margin:0;padding:0;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}

/* Gmail + Radar */
.v256-tools{display:flex;flex-direction:column;gap:var(--uh-s4);margin:0;padding:0;background:none;border:0}
.v92592-gmail-shortcut{display:grid;grid-template-columns:minmax(180px,240px) minmax(0,1fr) auto;align-items:center;gap:var(--uh-s5);padding:var(--uh-s4) var(--uh-s5);margin:0}
.v92592-gmail-shortcut-brand{display:flex;align-items:center;gap:var(--uh-s3);min-width:0}
.v92592-gmail-shortcut-brand svg{flex:0 0 32px;width:32px;height:32px}
.v92592-gmail-shortcut-brand strong{display:block;font-size:var(--uh-fs);font-weight:700;color:var(--uh-text)}
.v92592-gmail-shortcut-brand small{display:block;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.v92592-dash-mails{min-width:0;margin:0;font-size:var(--uh-fs-sm);color:var(--uh-text-3);background:none;border:0;padding:0}
.v92592-dash-mail-actions{display:flex;gap:var(--uh-s2);flex-wrap:wrap;justify-content:flex-end}
.v92592-dash-mail-actions button:not(.primary){
  display:inline-flex;align-items:center;min-height:36px;padding:0 14px;border:1px solid var(--uh-border-strong);border-radius:var(--uh-r-sm);
  background:var(--uh-surface);color:var(--uh-text);font-size:var(--uh-fs-sm);font-weight:600;box-shadow:none;cursor:pointer;
}
#radarDashCard{padding:var(--uh-s4) var(--uh-s5);margin:0;background-image:none}
#radarDashCard .radar-source-head{display:flex;align-items:center;justify-content:space-between;gap:var(--uh-s4);margin:0;padding:0}
#radarDashCard .radar-source-head>div{min-width:0}
#radarDashCard h4{margin:0;font-family:var(--uh-font-display);font-size:var(--uh-fs);font-weight:700;color:var(--uh-text);letter-spacing:0;text-transform:none}
#radarDashCard p{margin:2px 0 0;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}

/* ---------- 5 · GESTIÓN DE CLIENTES ---------- */
.crm-shell{display:flex;flex-direction:column;gap:var(--uh-s5);max-width:1440px;margin:0 auto;padding:0}
#crmBody{display:flex;flex-direction:column;gap:var(--uh-s5);min-width:0;margin:0;padding:0;background:none;border:0}

/* Pestañas: subrayado, una sola línea con scroll si no entra */
.crm-tabs{
  display:flex;align-items:stretch;gap:var(--uh-s1);flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;
  width:100%;margin:0;padding:0;background:none;border:0;border-bottom:1px solid var(--uh-border);border-radius:0;box-shadow:none;
}
.crm-tabs::-webkit-scrollbar{display:none}
.crm-tab{
  flex:0 0 auto;position:relative;display:inline-flex;align-items:center;min-height:44px;height:auto;padding:0 14px;margin:0 0 -1px;
  border:0;border-bottom:2px solid transparent;border-radius:0;background:none;box-shadow:none;
  color:var(--uh-text-3);font-size:var(--uh-fs);font-weight:600;letter-spacing:0;text-transform:none;white-space:nowrap;cursor:pointer;
}
.crm-tab:hover{color:var(--uh-text)}
.crm-tab.active{color:var(--uh-text);border-bottom-color:var(--uh-primary);background:none}
body.dark-mode .crm-tab.active{border-bottom-color:var(--uh-accent)}

/* Mi jornada · resumen */
.v92533-journey-overview{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--uh-s4);margin:0}
.v92533-journey-overview>.v92533-kpi-panel{order:-1}
.v92533-performance-card{
  display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);grid-template-areas:"head head" "gauge chart";
  column-gap:var(--uh-s6);row-gap:var(--uh-s4);align-items:center;min-width:0;padding:var(--uh-s5);margin:0;
}
.v92533-performance-card>.v92533-performance-head{grid-area:head}
.v92533-performance-card>.v255-summary-gauge{grid-area:gauge;align-self:center}
.v92533-performance-card>.v257-month-chart{grid-area:chart}
.v92533-performance-head{margin:0}
.v92533-performance-pct{font-family:var(--uh-font-display);font-size:var(--uh-fs-xl);font-weight:700;line-height:1;color:var(--uh-text)}
.v255-summary-gauge{width:100%;max-width:none;margin:0;padding:0;background:none;border:0}
.v255-summary-gauge .v92529-meter{max-width:none;width:100%}
.v257-month-chart{margin:0;padding:0 0 0 var(--uh-s6);border:0;border-left:1px solid var(--uh-border);background:none}
.v257-month-chart-head{display:flex;justify-content:space-between;align-items:baseline;gap:var(--uh-s2);flex-wrap:wrap;margin:0 0 var(--uh-s3)}
.v257-month-chart-head strong{font-size:var(--uh-fs-sm);font-weight:700;color:var(--uh-text)}
.v257-month-chart-head span{font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.v257-month-bars{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--uh-s3);align-items:end;height:auto;margin:0;padding:0;border:0}
.v257-month-col{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.v257-month-col>strong{font-size:var(--uh-fs-xs);font-weight:700;color:var(--uh-text-2)}
.v257-month-col>span{font-size:11px;color:var(--uh-text-3);text-transform:capitalize}
.v257-month-track{position:relative;display:flex;align-items:flex-end;width:100%;max-width:40px;height:96px;border-radius:6px;background:var(--uh-surface-3);overflow:hidden}
.v257-month-track i{display:block;width:100%;min-height:3px;border-radius:6px 6px 0 0;background:var(--uh-primary);background-image:none}
body.dark-mode .v257-month-track i{background:var(--uh-accent)}

/* KPIs: grilla uniforme */
.v92533-kpi-panel{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));grid-auto-rows:1fr;gap:var(--uh-s3);align-content:start;margin:0;padding:0;background:none;border:0}
.v92533-kpi-card{
  position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:2px;
  min-width:0;min-height:104px;height:auto;padding:14px 16px 14px 18px;margin:0;grid-column:auto;grid-row:auto;
  background:var(--uh-surface);background-image:none;border:1px solid var(--uh-border);border-radius:var(--uh-r);
  box-shadow:var(--uh-shadow);color:var(--uh-text);text-align:left;font:inherit;overflow:hidden;
}
.v92533-kpi-card::before{content:"";display:block;opacity:1;height:auto;border-radius:0;right:auto;position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--uh-tone,var(--uh-primary))}
.v92533-kpi-card.navy{--uh-tone:var(--uh-brand)}
.v92533-kpi-card.green{--uh-tone:#12936A}
.v92533-kpi-card.amber{--uh-tone:#D98A00}
.v92533-kpi-card.blue{--uh-tone:#1F6FD1}
.v92533-kpi-card.violet{--uh-tone:#6C4FD1}
.v92533-kpi-card.teal{--uh-tone:#1597A6}
body.dark-mode .v92533-kpi-card.navy{--uh-tone:var(--uh-accent)}
.v92533-kpi-card>span{min-height:2.6em;font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2);line-height:1.3;letter-spacing:0;text-transform:none}
.v92533-kpi-card>strong{font-family:var(--uh-font-display);font-size:24px;font-weight:700;line-height:1.2;color:var(--uh-text)}
.v92533-kpi-card>small{margin-top:auto;font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3);line-height:1.35}
button.v92533-kpi-card{cursor:pointer;transition:border-color .15s,background-color .15s}
button.v92533-kpi-card:hover{border-color:var(--uh-border-strong);background:var(--uh-surface-2)}
button.v92533-kpi-card>small{color:var(--uh-link);font-weight:600}

/* Panel de clientes para gestionar */
.v255-priority-crm,.v92533-clients-panel,.crm-panel{display:flex;flex-direction:column;gap:var(--uh-s4);min-width:0;padding:var(--uh-s5);margin:0}
.v92532-journey-head,.crm-toolbar{margin:0}
.v92533-result-count{display:flex;align-items:baseline;gap:6px;margin:0}
.v92533-result-count strong{font-family:var(--uh-font-display);font-size:var(--uh-fs-lg);font-weight:700;color:var(--uh-text)}
.v92533-result-count span{font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.crm-toolbar-left{display:flex;gap:var(--uh-s2);flex-wrap:wrap;margin:0}

/* Filtros: grilla regular, etiquetas arriba, botones alineados al pie */
.v92532-journey-filters,.cq-main-controls,.v92526-filter-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:var(--uh-s3) var(--uh-s4);align-items:end;
  margin:0;padding:var(--uh-s4);border:1px solid var(--uh-border);border-radius:var(--uh-r);background:var(--uh-surface-2);box-shadow:none;
}
.cq-main-controls,.v92526-filter-grid{padding:0;border:0;background:none}
.v92532-journey-filters>*,.cq-main-controls>*,.v92526-filter-grid>*{order:0;grid-column:auto;grid-row:auto;align-self:end;justify-self:stretch;margin:0}
.v92532-journey-filters>label,.cq-main-controls>label,.v92526-filter-grid>label{
  display:flex;flex-direction:column;justify-content:flex-end;gap:6px;min-width:0;height:auto;min-height:0;margin:0;padding:0;
}
.v92526-filter-grid>div{grid-column:1/-1}
.v92532-journey-filters>label>span,.cq-main-controls>label>span,.v92526-filter-grid>label>span{
  display:block;height:auto;min-height:0;margin:0;padding:0;font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2);line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:0;text-transform:none;
}
.v92532-journey-filters input,.cq-main-controls input,.v92526-filter-grid input{
  width:100%;min-width:0;min-height:var(--uh-control-h);height:auto;padding:8px 12px;border:1px solid var(--uh-border-strong);border-radius:var(--uh-r-sm);
  background:var(--uh-surface);color:var(--uh-text);font-family:var(--uh-font);font-size:var(--uh-fs);box-shadow:none;
}
.v92532-journey-filters>button,.cq-main-controls>button,.v92526-filter-grid>button{min-height:var(--uh-control-h);width:100%;grid-column:auto}
body.dark-mode input[type=date]{color-scheme:dark}
.cq-main-controls{display:flex;flex-wrap:wrap;align-items:flex-end}
.cq-main-controls>label{flex:1 1 160px}
.cq-main-controls>.v92526-search{flex:2 1 280px}
.cq-main-controls>button{flex:0 0 auto;width:auto}

.cq-filters{display:flex;flex-direction:column;gap:var(--uh-s4);padding:var(--uh-s4);margin:0;box-shadow:none;background:var(--uh-surface-2)}
.cq-filter-heading strong{display:block;font-size:var(--uh-fs);font-weight:700;color:var(--uh-text)}
.cq-filter-heading span{display:block;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.cq-operation-tabs{display:flex;gap:var(--uh-s2);flex-wrap:wrap;margin:0}
.cq-operation-tabs button{
  display:inline-flex;align-items:center;gap:8px;min-height:36px;height:auto;padding:0 12px;margin:0;
  border:1px solid var(--uh-border-strong);border-radius:999px;background:var(--uh-surface);color:var(--uh-text-2);
  font-size:var(--uh-fs-sm);font-weight:600;box-shadow:none;cursor:pointer;
}
.cq-operation-tabs button b{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;border-radius:999px;background:var(--uh-surface-3);color:var(--uh-text-2);font-size:11px;font-weight:700}
.cq-operation-tabs button.active,.cq-operation-tabs button[aria-pressed=true]{background:var(--uh-primary);border-color:var(--uh-primary);color:#fff}
.cq-operation-tabs button.active b,.cq-operation-tabs button[aria-pressed=true] b{background:rgba(255,255,255,.2);color:#fff}
.cq-advanced{margin:0;padding:var(--uh-s3) 0 0;border:0;border-top:1px solid var(--uh-border);background:none}
.cq-advanced>summary{display:inline-flex;align-items:center;gap:6px;min-height:32px;font-size:var(--uh-fs-sm);font-weight:600;color:var(--uh-link);cursor:pointer;list-style:none}
.cq-advanced>summary::-webkit-details-marker{display:none}
.cq-advanced>summary::before{content:"+";display:inline-grid;place-items:center;width:18px;height:18px;border-radius:4px;background:var(--uh-primary-soft);font-weight:700}
.cq-advanced[open]>summary::before{content:"−"}
.cq-advanced-content{display:flex;flex-direction:column;gap:var(--uh-s4);margin:var(--uh-s3) 0 0}
.cq-filter-note,.v92529-filter-help,.v92530-active-filters{font-size:var(--uh-fs-xs);color:var(--uh-text-3);margin:0}

/* Cola de clientes (Mi jornada) */
.crm-queue{display:flex;flex-direction:column;gap:0;margin:0;padding:0;border:1px solid var(--uh-border);border-radius:var(--uh-r);overflow:hidden;background:var(--uh-surface)}
.crm-queue-item{
  display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:var(--uh-s3);
  min-height:60px;padding:10px var(--uh-s4);margin:0;border:0;border-top:1px solid var(--uh-border);border-radius:0;background:var(--uh-surface);box-shadow:none;
}
.crm-queue-item:first-child{border-top:0}
.crm-queue-item:hover{background:var(--uh-surface-2)}
.crm-queue-item>div{min-width:0}
.crm-queue-item strong{display:block;font-size:var(--uh-fs);font-weight:600;color:var(--uh-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-queue-item small{display:block;margin-top:2px;font-size:var(--uh-fs-xs);color:var(--uh-text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Tabla de clientes */
.v92532-result-head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--uh-s2);margin:0;font-size:var(--uh-fs-sm);color:var(--uh-text-3)}
.v92532-result-head strong{font-family:var(--uh-font-display);font-size:var(--uh-fs-md);font-weight:700;color:var(--uh-text);margin-right:4px}
.crm-table-wrap{width:100%;max-width:100%;margin:0;padding:0;overflow-x:auto;border:1px solid var(--uh-border);border-radius:var(--uh-r);background:var(--uh-surface);box-shadow:none}
.crm-table{table-layout:auto;min-width:880px;width:100%;border-collapse:collapse;border-spacing:0;margin:0;background:none;font-size:var(--uh-fs-sm);color:var(--uh-text)}
.crm-table th{
  position:static;padding:10px var(--uh-s3);background:var(--uh-surface-2);border:0;border-bottom:1px solid var(--uh-border);
  font-size:11px;font-weight:600;color:var(--uh-text-3);letter-spacing:.04em;text-transform:uppercase;text-align:left;white-space:nowrap;vertical-align:middle;
}
.crm-table td{word-break:normal;overflow-wrap:break-word;hyphens:none;padding:var(--uh-s3);border:0;border-top:1px solid var(--uh-border);vertical-align:top;color:var(--uh-text-2);background:none;line-height:1.45}
.crm-table tr,.crm-table tbody tr{background:var(--uh-surface)}
.crm-table tbody tr:first-child td{border-top:0}
.crm-table tbody tr:hover td{background:var(--uh-surface-2)}
.crm-name{display:block;font-size:var(--uh-fs);font-weight:600;color:var(--uh-text)}
.crm-sub{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin-top:4px;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.v92542-contact-link{color:var(--uh-link);font-size:var(--uh-fs-xs);font-weight:500;text-decoration:none}
.v92542-contact-link:hover{text-decoration:underline}
#modalRoot a[href^="mailto:"],.v92542-contact-link.mail{text-transform:none}
.v92543-contact-action{display:inline-flex;align-items:center;gap:4px}
.v92543-copy-contact,.v92543-profile-copy{
  display:inline-grid;place-items:center;width:22px;height:22px;min-height:0;padding:0;border:1px solid var(--uh-border);border-radius:6px;
  background:var(--uh-surface);color:var(--uh-text-3);font-size:11px;cursor:pointer;box-shadow:none;
}
.cq-row-summary{display:flex;align-items:center;gap:6px;min-width:0;margin-top:6px;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.cq-row-summary>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cq-operation-badge{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:999px;font-size:11px;font-weight:600;background:var(--uh-info-soft);color:var(--uh-info)}
.cq-operation-badge.sale{background:var(--uh-ok-soft);color:var(--uh-ok)}
.crm-table td .secondary,.crm-table td .primary{min-height:30px;padding:0 10px;font-size:var(--uh-fs-xs)}
.crm-table td:last-child{white-space:nowrap}

/* ---------- 5b · GMAIL (V9.6.3) ----------
   Reemplaza 196 reglas viejas de uh-legacy.css (todas exclusivas de esta vista).
   Estructura: cabecera · panel de procesamiento · rail | lista | lector.
   Escritorio: lista y lector con scroll propio. ≤1024: todo apilado y el lector
   se lleva a la vista al abrir un correo (v963RevealReader). */
.uh-ico{flex:0 0 auto;width:18px;height:18px;display:block}
.uh-icon-btn{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  width:36px;height:36px;min-height:0;padding:0;margin:0;border-radius:var(--uh-r-sm);
  border:1px solid var(--uh-border-strong);background:var(--uh-surface);color:var(--uh-text-2);
  box-shadow:none;cursor:pointer;transition:background-color .15s,color .15s;
}
.uh-icon-btn:hover{background:var(--uh-surface-2);color:var(--uh-text)}
.uh-icon-btn .uh-ico{width:17px;height:17px}

.v92592-gmail-app{
  display:flex;flex-direction:column;min-width:0;
  background:var(--uh-surface);border:1px solid var(--uh-border);border-radius:var(--uh-r-lg);box-shadow:var(--uh-shadow);color:var(--uh-text);
}
/* Cabecera */
.v92592-gmail-head{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--uh-s4);
  padding:var(--uh-s4) var(--uh-s5);border-bottom:1px solid var(--uh-border);
}
.v92592-gmail-brand{display:flex;align-items:center;gap:var(--uh-s3);min-width:0}
.v92592-gmail-brand svg{flex:0 0 30px;width:30px;height:30px}
.v92592-gmail-brand strong{display:block;font-size:var(--uh-fs-md);font-weight:700;line-height:1.2;color:var(--uh-text)}
.v92592-gmail-brand small{display:block;font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v92592-search{
  display:flex;align-items:center;gap:var(--uh-s2);min-width:0;height:var(--uh-control-h);padding:0 var(--uh-s3);margin:0;
  border:1px solid var(--uh-border-strong);border-radius:999px;background:var(--uh-surface-2);color:var(--uh-text-3);
}
.v92592-search:focus-within{border-color:var(--uh-primary);background:var(--uh-surface);box-shadow:0 0 0 3px color-mix(in srgb,var(--uh-accent) 35%,transparent)}
.v92592-search input{
  flex:1 1 auto;min-width:0;height:100%;padding:0;margin:0;border:0;outline:0;background:transparent;box-shadow:none;
  font-family:var(--uh-font);font-size:var(--uh-fs);color:var(--uh-text);
}
.v92592-head-actions{display:flex;align-items:center;gap:var(--uh-s2);flex-wrap:wrap;justify-content:flex-end}
.v92592-head-actions .primary,.v92592-head-actions .secondary{min-height:var(--uh-control-h)}

/* Panel "Procesamiento Gmail": compacto, con scroll propio (sin recortes) */
.v92-processing{display:flex;flex-direction:column;gap:var(--uh-s3);padding:var(--uh-s3) var(--uh-s5) var(--uh-s4);border-bottom:1px solid var(--uh-border);background:var(--uh-surface-2)}
.v92-processing-head{display:flex;align-items:center;justify-content:space-between;gap:var(--uh-s3)}
.v92-processing-head>div{display:flex;align-items:baseline;gap:var(--uh-s2);flex-wrap:wrap;min-width:0}
.v92-processing-head strong{font-size:var(--uh-fs);font-weight:700;color:var(--uh-text)}
.v92-processing-head small{font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3)}
.v92-processing-counts{display:flex;gap:6px;flex-wrap:wrap;min-width:0}
.v92-processing-counts>span{font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.v92-processing-counts button{
  display:inline-flex;align-items:center;gap:6px;height:28px;min-height:0;padding:0 10px;margin:0;
  border:1px solid var(--uh-border);border-radius:999px;background:var(--uh-surface);color:var(--uh-text-2);
  font-family:var(--uh-font);font-size:var(--uh-fs-xs);font-weight:600;box-shadow:none;cursor:pointer;white-space:nowrap;
}
.v92-processing-counts button strong{font-weight:700;color:var(--uh-text)}
.v92-processing-counts button.active{background:var(--uh-primary);border-color:var(--uh-primary);color:#fff}
.v92-processing-counts button.active strong{color:#fff}
.v92-processing-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:var(--uh-s2);max-height:124px;overflow-y:auto;min-width:0}
.v92-processing-row{
  display:grid;grid-template-columns:28px minmax(0,1fr) auto;grid-template-areas:"ico main time" "ico detail detail";
  align-items:center;column-gap:var(--uh-s3);row-gap:0;min-width:0;padding:var(--uh-s2) var(--uh-s3);margin:0;
  border:1px solid var(--uh-border);border-radius:var(--uh-r-sm);background:var(--uh-surface);color:var(--uh-text);
  font-family:var(--uh-font);text-align:left;box-shadow:none;cursor:pointer;
}
.v92-processing-row:hover{border-color:var(--uh-border-strong)}
.v92-process-icon{grid-area:ico;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:var(--uh-surface-3);color:var(--uh-text-2)}
.v92-process-icon .uh-ico{width:15px;height:15px}
.v92-process-main{grid-area:main;display:flex;align-items:baseline;gap:var(--uh-s2);min-width:0}
.v92-process-main strong{flex:0 0 auto;font-size:11px;font-weight:700;color:var(--uh-text-2);text-transform:uppercase;letter-spacing:.02em}
.v92-process-main small{min-width:0;font-size:var(--uh-fs-sm);font-weight:500;color:var(--uh-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v92-process-detail{grid-area:detail;min-width:0;font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v92-processing-row time{grid-area:time;font-size:var(--uh-fs-xs);color:var(--uh-text-3);white-space:nowrap}
.v92-processing-row.kind-client_created .v92-process-icon{background:var(--uh-ok-soft);color:var(--uh-ok)}
.v92-processing-row.kind-client_updated .v92-process-icon{background:var(--uh-info-soft);color:var(--uh-info)}
.v92-processing-row.kind-search_alert .v92-process-icon{background:var(--uh-violet-soft);color:var(--uh-violet)}
.v92-processing-row.kind-opportunity .v92-process-icon,.v92-processing-row.kind-manual_review .v92-process-icon{background:var(--uh-warn-soft);color:var(--uh-warn)}
.v92-processing-empty{display:flex;flex-direction:column;gap:2px;padding:var(--uh-s2) 0;font-size:var(--uh-fs-sm);color:var(--uh-text-3)}
.v92-processing-empty strong{color:var(--uh-text);font-weight:600}

/* Grilla principal */
.v92592-gmail-grid{
  display:grid;grid-template-columns:208px minmax(340px,.95fr) minmax(0,1.35fr);
  height:clamp(520px,calc(100vh - 300px),980px);min-height:0;
}
.v92592-rail{display:flex;flex-direction:column;gap:var(--uh-s3);min-width:0;padding:var(--uh-s4);border-right:1px solid var(--uh-border);border-bottom-left-radius:var(--uh-r-lg)}
.v92592-compose{width:100%;min-height:var(--uh-control-h)}
.v92592-rail nav{display:flex;flex-direction:column;gap:2px;min-width:0}
.v92592-rail nav button{
  display:flex;align-items:center;gap:var(--uh-s3);width:100%;height:38px;min-height:0;padding:0 var(--uh-s3);margin:0;
  border:0;border-radius:var(--uh-r-sm);background:transparent;color:var(--uh-text-2);
  font-family:var(--uh-font);font-size:var(--uh-fs);font-weight:500;text-align:left;box-shadow:none;cursor:pointer;white-space:nowrap;
}
.v92592-rail nav button:hover{background:var(--uh-surface-2);color:var(--uh-text)}
.v92592-rail nav button.active{background:var(--uh-primary-soft);color:var(--uh-primary);font-weight:600}
body.dark-mode .v92592-rail nav button.active{color:var(--uh-link)}
.v92592-auto{margin-top:auto;padding:var(--uh-s2) var(--uh-s3);border-radius:var(--uh-r-sm);background:var(--uh-surface-2);font-size:var(--uh-fs-xs);line-height:1.4;color:var(--uh-text-3)}
.v92592-auto.ok{background:var(--uh-ok-soft);color:var(--uh-ok)}
.v92592-auto.warn{background:var(--uh-warn-soft);color:var(--uh-warn)}
.v92592-auto.err{background:var(--uh-bad-soft);color:var(--uh-bad)}

/* Lista de correos */
.v92592-list-pane{display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid var(--uh-border)}
.v92592-list-top{display:flex;align-items:baseline;justify-content:space-between;gap:var(--uh-s3);padding:var(--uh-s3) var(--uh-s4);border-bottom:1px solid var(--uh-border)}
.v92592-list-top strong{font-size:var(--uh-fs);font-weight:700;color:var(--uh-text)}
.v92592-list-top span{font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.v92592-list{flex:1 1 auto;min-height:0;overflow-y:auto}
.v92592-mail-row{
  display:grid;grid-template-columns:18px minmax(0,1fr) auto;grid-template-areas:"star from time" ". copy copy";
  align-items:center;column-gap:var(--uh-s2);row-gap:2px;width:100%;min-width:0;padding:var(--uh-s3) var(--uh-s4);margin:0;
  border:0;border-bottom:1px solid var(--uh-border);border-radius:0;background:var(--uh-surface);color:var(--uh-text);
  font-family:var(--uh-font);text-align:left;box-shadow:none;cursor:pointer;
}
.v92592-mail-row:hover{background:var(--uh-surface-2)}
.v92592-mail-row.selected{background:var(--uh-primary-soft)}
.v92592-mail-row .star{grid-area:star;display:flex;color:var(--uh-border-strong)}
.v92592-mail-row .star .uh-ico{width:15px;height:15px}
.v92592-mail-row .star.on{color:var(--uh-warn)}
.v92592-mail-row .star.on .uh-ico{fill:currentColor}
.v92592-mail-row .from{grid-area:from;min-width:0;font-size:var(--uh-fs);font-weight:500;color:var(--uh-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v92592-mail-row time{grid-area:time;font-size:var(--uh-fs-xs);color:var(--uh-text-3);white-space:nowrap}
.v92592-mail-row .mail-copy{grid-area:copy;display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--uh-s2);row-gap:2px;min-width:0}
.v92592-mail-row .mail-copy strong{flex:0 1 auto;max-width:100%;min-width:0;font-size:var(--uh-fs-sm);font-weight:500;color:var(--uh-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v92592-mail-row .mail-copy b{flex:0 0 auto;padding:1px 7px;border-radius:999px;background:var(--uh-ok-soft);color:var(--uh-ok);font-size:10px;font-weight:700;letter-spacing:.02em;white-space:nowrap}
.v92592-mail-row .mail-copy small{flex:1 0 100%;min-width:0;font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* No leídos: negrita + barra a la izquierda */
.v92592-mail-row.unread{box-shadow:inset 3px 0 0 var(--uh-primary)}
body.dark-mode .v92592-mail-row.unread{box-shadow:inset 3px 0 0 var(--uh-link)}
.v92592-mail-row.unread .from,.v92592-mail-row.unread .mail-copy strong{font-weight:700}
.v92592-mail-row.unread time{color:var(--uh-text);font-weight:600}
.v92592-empty{display:flex;flex-direction:column;align-items:center;gap:4px;padding:var(--uh-s6) var(--uh-s4);text-align:center;font-size:var(--uh-fs-sm);color:var(--uh-text-3)}
.v92592-empty strong{color:var(--uh-text);font-weight:600}
.v92592-load-more{display:block;width:calc(100% - 2*var(--uh-s4));min-height:36px;margin:var(--uh-s3) auto;border:1px dashed var(--uh-border-strong);border-radius:var(--uh-r-sm);background:transparent;color:var(--uh-text-2);font-family:var(--uh-font);font-size:var(--uh-fs-sm);font-weight:600;box-shadow:none;cursor:pointer}

/* Lector */
.v92592-reader{display:flex;flex-direction:column;gap:var(--uh-s4);min-width:0;min-height:0;overflow-y:auto;padding:var(--uh-s5)}
.v92592-reader-placeholder{margin:auto;max-width:280px;text-align:center;font-size:var(--uh-fs-sm);color:var(--uh-text-3)}
.v92592-reader-head{display:flex;flex-direction:column;gap:var(--uh-s3);padding-bottom:var(--uh-s4);border-bottom:1px solid var(--uh-border)}
.v92592-reader-head h3{margin:0;font-family:var(--uh-font);font-size:var(--uh-fs-lg);font-weight:700;line-height:1.3;color:var(--uh-text);overflow-wrap:anywhere}
.v92592-meta{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:var(--uh-s2);row-gap:2px;margin-top:var(--uh-s2);min-width:0}
.v92592-meta strong{font-size:var(--uh-fs);font-weight:600;color:var(--uh-text)}
.v92592-meta span{min-width:0;font-size:var(--uh-fs-sm);color:var(--uh-text-3);overflow-wrap:anywhere}
.v92592-meta small{flex-basis:100%;font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3)}
.v92592-reader-actions{display:flex;flex-wrap:wrap;gap:var(--uh-s2)}
.v92592-reader-actions button:not(.primary){
  display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;margin:0;
  border:1px solid var(--uh-border-strong);border-radius:var(--uh-r-sm);background:var(--uh-surface);color:var(--uh-text);
  font-family:var(--uh-font);font-size:var(--uh-fs-sm);font-weight:600;box-shadow:none;cursor:pointer;white-space:nowrap;
}
.v92592-reader-actions button:not(.primary):hover{background:var(--uh-surface-2)}
.v92592-reader-actions .lead-one{background:var(--uh-ok-soft);border-color:transparent;color:var(--uh-ok)}
.v92592-reader-actions button:disabled{opacity:.55;cursor:not-allowed}
.v92592-reader-actions .uh-ico{width:15px;height:15px}
.v92592-lead-detect,.v92592-review-alert,.v92592-search-alert,.v92592-opportunity-alert{
  display:flex;flex-direction:column;gap:2px;padding:var(--uh-s3) var(--uh-s4);border-radius:var(--uh-r-sm);font-size:var(--uh-fs-sm);line-height:1.45;
}
.v92592-lead-detect strong,.v92592-review-alert strong,.v92592-search-alert strong,.v92592-opportunity-alert strong{font-weight:700}
.v92592-lead-detect{background:var(--uh-ok-soft);color:var(--uh-ok)}
.v92592-review-alert{background:var(--uh-warn-soft);color:var(--uh-warn)}
.v92592-search-alert{background:var(--uh-violet-soft);color:var(--uh-violet)}
.v92592-opportunity-alert{background:var(--uh-info-soft);color:var(--uh-info)}
.v92592-body{max-width:75ch;margin:0;font-size:var(--uh-fs);line-height:1.65;color:var(--uh-text);overflow-wrap:anywhere}
.v92592-attachments{display:flex;flex-wrap:wrap;align-items:center;gap:var(--uh-s2);font-size:var(--uh-fs-sm)}
.v92592-attachments strong{flex-basis:100%;font-weight:700;color:var(--uh-text)}
.v92592-attachments span{padding:4px 10px;border-radius:999px;background:var(--uh-surface-3);color:var(--uh-text-2)}
.v92592-reader-msg,#v92592SendMsg{font-size:var(--uh-fs-sm);color:var(--uh-text-3)}
.v92592-reader-msg.ok,#v92592SendMsg.ok{color:var(--uh-ok)}
.v92592-reader-msg.err,#v92592SendMsg.err{color:var(--uh-bad)}

/* Redactar / responder */
.v92592-compose-panel{display:flex;flex-direction:column;gap:var(--uh-s3);min-width:0}
.v92592-compose-title{display:flex;align-items:center;justify-content:space-between;gap:var(--uh-s3);padding-bottom:var(--uh-s3);border-bottom:1px solid var(--uh-border)}
.v92592-compose-title strong{font-size:var(--uh-fs-md);font-weight:700;color:var(--uh-text)}
.v92592-compose-title button{width:36px;height:36px;min-height:0;padding:0;border:1px solid var(--uh-border);border-radius:var(--uh-r-sm);background:var(--uh-surface);color:var(--uh-text-2);font-size:20px;line-height:1;box-shadow:none;cursor:pointer}
.v92592-compose-panel label{display:flex;flex-direction:column;gap:6px;font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2)}
.v92592-compose-panel input,.v92592-compose-panel textarea{
  width:100%;min-width:0;min-height:var(--uh-control-h);padding:8px 12px;margin:0;
  border:1px solid var(--uh-border-strong);border-radius:var(--uh-r-sm);background:var(--uh-surface);color:var(--uh-text);
  font-family:var(--uh-font);font-size:var(--uh-fs);font-weight:400;line-height:1.5;box-shadow:none;
}
.v92592-compose-panel textarea{min-height:240px;resize:vertical}
.v92592-compose-panel input:focus,.v92592-compose-panel textarea:focus{outline:none;border-color:var(--uh-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--uh-accent) 35%,transparent)}
.v92592-compose-actions{display:flex;align-items:center;gap:var(--uh-s3)}

@media (max-width:1024px){
  .v92592-gmail-head{grid-template-columns:minmax(0,1fr) auto;padding:var(--uh-s4)}
  .v92592-search{grid-column:1/-1;grid-row:2}
  .v92-processing{padding:var(--uh-s3) var(--uh-s4)}
  .v92592-gmail-grid{grid-template-columns:minmax(0,1fr);height:auto}
  .v92592-rail{flex-direction:row;align-items:center;gap:var(--uh-s2);padding:var(--uh-s3) var(--uh-s4);border-right:0;border-bottom:1px solid var(--uh-border);border-radius:0}
  .v92592-compose{width:auto;flex:0 0 auto}
  .v92592-rail nav{flex-direction:row;flex:1 1 auto;gap:4px;overflow-x:auto;scrollbar-width:none}
  .v92592-rail nav button{width:auto;flex:0 0 auto}
  .v92592-auto{display:none}
  .v92592-list-pane{border-right:0;border-bottom:1px solid var(--uh-border)}
  .v92592-list{max-height:min(60vh,560px)}
  .v92592-reader{min-height:320px;overflow:visible;padding:var(--uh-s4);scroll-margin-top:calc(var(--uh-topbar-h) + var(--uh-s3))}
}
@media (max-width:640px){
  .v92592-gmail-head{gap:var(--uh-s3)}
  .v92592-head-actions{grid-column:1/-1;grid-row:3;justify-content:stretch}
  .v92592-head-actions .lead-now{flex:1 1 100%}
  .v92592-head-actions .secondary{flex:1 1 auto}
  .v92-processing-counts{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .v92-processing-counts button{flex:0 0 auto}
  .v92-processing-list{grid-template-columns:minmax(0,1fr)}
  .v92592-rail{flex-wrap:wrap}
  .v92592-compose{width:100%}
  .v92592-rail nav{flex-basis:100%}
  .v92592-reader-actions button:not(.primary),.v92592-reader-actions .primary{flex:1 1 auto}
}

/* ---------- 8 · PROPIEDADES Y TABLERO DE INICIO (V9.7) ----------
   Colores de series validados con el validador de dataviz (CVD y contraste) en ambos temas:
   s1 cobros/disponible · s2 gastos/reservada · s3 vendida · s4 alquilada. Orden fijo. */
:root{--uhp-s1:#2a78d6;--uhp-s2:#eb6834;--uhp-s3:#1baf7a;--uhp-s4:#eda100}
body.dark-mode{--uhp-s1:#3987e5;--uhp-s2:#d95926;--uhp-s3:#199e70;--uhp-s4:#c98500}
.uhp-s1{fill:var(--uhp-s1);background:var(--uhp-s1)} .uhp-s2{fill:var(--uhp-s2);background:var(--uhp-s2)}
.uhp-s3{fill:var(--uhp-s3);background:var(--uhp-s3)} .uhp-s4{fill:var(--uhp-s4);background:var(--uhp-s4)}
i.s1{background:var(--uhp-s1)} i.s2{background:var(--uhp-s2)} i.s3{background:var(--uhp-s3)} i.s4{background:var(--uhp-s4)}

.uhp-shell{display:flex;flex-direction:column;gap:var(--uh-s4);min-width:0;color:var(--uh-text)}
.uhp-head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--uh-s4);flex-wrap:wrap}
.uhp-head h2{margin:0;font-family:var(--uh-font-display);font-size:var(--uh-fs-lg);font-weight:700;color:var(--uh-text);line-height:1.25}
.uhp-head p{margin:2px 0 0;font-size:var(--uh-fs-sm);color:var(--uh-text-3);display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.uhp-head-actions{display:flex;align-items:center;gap:var(--uh-s2);flex-wrap:wrap}
.uhp-seg{display:inline-flex;padding:3px;border:1px solid var(--uh-border-strong);border-radius:var(--uh-r-sm);background:var(--uh-surface)}
.uhp-seg button{min-height:30px;padding:0 12px;margin:0;border:0;border-radius:6px;background:transparent;color:var(--uh-text-2);font-family:var(--uh-font);font-size:var(--uh-fs-sm);font-weight:600;box-shadow:none;cursor:pointer}
.uhp-seg button.active{background:var(--uh-primary);color:#fff}
.uhp-tabs{display:flex;gap:var(--uh-s5);border-bottom:1px solid var(--uh-border);overflow-x:auto;scrollbar-width:none}
.uhp-tabs button{display:inline-flex;align-items:center;gap:6px;padding:var(--uh-s2) 0 var(--uh-s3);margin:0;border:0;border-bottom:2px solid transparent;background:none;color:var(--uh-text-3);font-family:var(--uh-font);font-size:var(--uh-fs);font-weight:600;white-space:nowrap;box-shadow:none;border-radius:0;cursor:pointer}
.uhp-tabs button.active{color:var(--uh-text);border-bottom-color:var(--uh-accent)}
.uhp-tabs button span{padding:0 7px;border-radius:999px;background:var(--uh-surface-3);color:var(--uh-text-2);font-size:var(--uh-fs-xs)}
.uhp-filters{display:grid;grid-template-columns:minmax(0,2fr) repeat(auto-fit,minmax(160px,1fr));gap:var(--uh-s3);align-items:end}
.uhp-field{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2)}
.uhp-field input,.uhp-field select,.uhp-field textarea{
  width:100%;min-width:0;min-height:var(--uh-control-h);padding:8px 12px;margin:0;border:1px solid var(--uh-border-strong);border-radius:var(--uh-r-sm);
  background:var(--uh-surface);color:var(--uh-text);font-family:var(--uh-font);font-size:var(--uh-fs);font-weight:400;line-height:1.4;box-shadow:none}
.uhp-field textarea{resize:vertical;min-height:110px}
.uhp-field input:focus,.uhp-field select:focus,.uhp-field textarea:focus{outline:none;border-color:var(--uh-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--uh-accent) 35%,transparent)}
.uhp-field input:disabled,.uhp-field select:disabled,.uhp-field textarea:disabled{background:var(--uh-surface-2);color:var(--uh-text-2)}
.uhp-msg{padding:var(--uh-s2) var(--uh-s3);border-radius:var(--uh-r-sm);background:var(--uh-ok-soft);color:var(--uh-ok);font-size:var(--uh-fs-sm);font-weight:600}
.uhp-msg[data-tone=err]{background:var(--uh-bad-soft);color:var(--uh-bad)}
.uhp-loading{padding:var(--uh-s6);text-align:center;color:var(--uh-text-3);font-size:var(--uh-fs-sm)}
.uhp-state{display:flex;flex-direction:column;align-items:center;gap:6px;padding:var(--uh-s6) var(--uh-s4);text-align:center;border:1px dashed var(--uh-border-strong);border-radius:var(--uh-r);background:var(--uh-surface)}
.uhp-state strong{font-size:var(--uh-fs-md);color:var(--uh-text)} .uhp-state p{margin:0;max-width:520px;font-size:var(--uh-fs-sm);color:var(--uh-text-3)}
.uhp-state-off{border-style:solid;background:var(--uh-surface-2)} .uhp-state-err strong{color:var(--uh-bad)}

/* Listado (V9.8): tabla en escritorio, tarjetas apiladas en celular */
.uhp-list{display:flex;flex-direction:column;min-width:0;background:var(--uh-surface);border:1px solid var(--uh-border);border-radius:var(--uh-r);box-shadow:var(--uh-shadow);overflow:hidden}
.uhp-list>.uhp-state{border:0;border-radius:0}
.uhp-lrow{display:grid;grid-template-columns:minmax(0,2.4fr) minmax(110px,.8fr) minmax(250px,1.3fr) minmax(110px,.8fr) minmax(0,1.3fr);gap:var(--uh-s3);align-items:center;padding:var(--uh-s3) var(--uh-s4);border-top:1px solid var(--uh-border);min-width:0}
.uhp-lrow:first-child{border-top:0}
.uhp-lrow:not(.uhp-lhead):hover{background:var(--uh-surface-2)}
.uhp-lhead{padding-top:var(--uh-s2);padding-bottom:var(--uh-s2);background:var(--uh-surface-2);font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2)}
.uhp-lhead span:last-child{text-align:right}
.uhp-lmain{display:flex;align-items:center;gap:var(--uh-s3);min-width:0;padding:0;margin:0;border:0;background:none;box-shadow:none;text-align:left;cursor:pointer;color:var(--uh-text);font-family:var(--uh-font)}
.uhp-thumb{flex:0 0 64px;width:64px;height:48px;border-radius:var(--uh-r-sm);overflow:hidden;background:var(--uh-surface-3)}
.uhp-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.uhp-thumb .uhp-noimg{font-size:10px}
.uhp-ltext{display:flex;flex-direction:column;gap:1px;min-width:0}
.uhp-ltext strong{font-size:var(--uh-fs);font-weight:600;line-height:1.3;color:var(--uh-text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.uhp-ltext small{font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uhp-lmain:hover strong{text-decoration:underline}
.uhp-lchips{display:flex;flex-wrap:wrap;gap:4px}
.uhp-lprice{display:flex;flex-direction:column;gap:1px;font-variant-numeric:tabular-nums}
.uhp-lprice b{font-size:var(--uh-fs);color:var(--uh-text);white-space:nowrap} .uhp-lprice small{font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.uhp-lactions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.uhp-lactions .uhp-publication{text-decoration:none}
.uhp-lactions .primary{background:var(--uh-primary);border-color:var(--uh-primary);color:#fff}
.uhp-seg-sm{padding:2px} .uhp-seg-sm button{min-height:26px;padding:0 10px;font-size:var(--uh-fs-xs)}
.uhp-noimg{display:flex;height:100%;align-items:center;justify-content:center;font-size:var(--uh-fs-sm);color:var(--uh-text-3)}
.uhp-card-chips{display:flex;flex-wrap:wrap;gap:6px}

/* Ficha */
.uhp-ficha-title{display:flex;align-items:flex-start;gap:var(--uh-s3);min-width:0}
.uhp-panel{display:flex;flex-direction:column;gap:var(--uh-s4);min-width:0}
.uhp-form{display:flex;flex-direction:column;gap:var(--uh-s4);min-width:0}
.uhp-form fieldset{margin:0;padding:var(--uh-s4) var(--uh-s5);min-width:0;background:var(--uh-surface);border:1px solid var(--uh-border);border-radius:var(--uh-r)}
.uhp-form legend{padding:0 6px;margin-left:-6px;font-size:var(--uh-fs);font-weight:700;color:var(--uh-text)}
.uhp-form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,140px),1fr));gap:var(--uh-s3)}
.uhp-span-2{grid-column:span 2} .uhp-span-all{grid-column:1/-1}
.uhp-hint{margin:var(--uh-s2) 0 0;font-size:var(--uh-fs-xs);font-weight:400;line-height:1.5;color:var(--uh-text-3)}
.uhp-error{margin:0;color:var(--uh-bad);font-size:var(--uh-fs-sm);font-weight:600}
.uhp-actions{display:flex;gap:var(--uh-s2);flex-wrap:wrap}
.uhp-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) 36px;gap:var(--uh-s2);align-items:end;margin-bottom:var(--uh-s2)}
.uhp-row-share{grid-template-columns:minmax(0,2fr) minmax(0,1fr) 36px}
.uhp-calc{padding:var(--uh-s4) var(--uh-s5);border-radius:var(--uh-r);background:var(--uh-surface-2);border:1px solid var(--uh-border)}
.uhp-calc h4{display:flex;flex-wrap:wrap;align-items:center;gap:var(--uh-s2);margin:0 0 var(--uh-s3);font-size:var(--uh-fs);font-weight:700;color:var(--uh-text)}
.uhp-dl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px var(--uh-s4);margin:0;font-size:var(--uh-fs-sm)}
.uhp-dl dt{color:var(--uh-text-2);min-width:0} .uhp-dl dd{margin:0;text-align:right;color:var(--uh-text);font-variant-numeric:tabular-nums}
.uhp-upload{display:flex;align-items:center;gap:var(--uh-s3);flex-wrap:wrap;font-size:var(--uh-fs-sm);color:var(--uh-text-3)}
.uhp-upload-btn{cursor:pointer}
.uhp-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:var(--uh-s3)}
.uhp-photo{margin:0;display:flex;flex-direction:column;gap:6px;padding:6px;border:1px solid var(--uh-border);border-radius:var(--uh-r);background:var(--uh-surface)}
.uhp-photo.is-cover{border-color:var(--uh-accent)}
.uhp-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--uh-r-sm)}
.uhp-photo figcaption{display:flex;flex-wrap:wrap;gap:6px}
.uhp-photos .uhp-state{grid-column:1/-1}
.uhp-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:var(--uh-s3)}
.uhp-kpi{display:flex;flex-direction:column;gap:4px;padding:var(--uh-s4);background:var(--uh-surface);border:1px solid var(--uh-border);border-radius:var(--uh-r);min-width:0}
.uhp-kpi>span{font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2)}
.uhp-kpi strong{font-family:var(--uh-font-display);font-size:var(--uh-fs-lg);font-weight:700;color:var(--uh-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.uhp-kpi small{font-size:var(--uh-fs-xs);font-weight:400;color:var(--uh-text-3)}
.uhp-table-wrap{overflow-x:auto;border:1px solid var(--uh-border);border-radius:var(--uh-r);background:var(--uh-surface)}
.uhp-table{width:100%;border-collapse:collapse;font-size:var(--uh-fs-sm);color:var(--uh-text)}
.uhp-table caption{padding:var(--uh-s3) var(--uh-s4);text-align:left;font-weight:700}
.uhp-table th,.uhp-table td{padding:var(--uh-s2) var(--uh-s4);border-top:1px solid var(--uh-border);text-align:left;font-variant-numeric:tabular-nums}
.uhp-table th{font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2);background:var(--uh-surface-2)}
.uhp-moves{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:var(--uh-s3)}
.uhp-move{display:flex;flex-direction:column;gap:var(--uh-s2);padding:var(--uh-s4);background:var(--uh-surface);border:1px solid var(--uh-border);border-radius:var(--uh-r);min-width:0}
.uhp-move h4{margin:0;font-size:var(--uh-fs);font-weight:700;color:var(--uh-text)}
.uhp-move ul{margin:0;padding-left:18px;font-size:var(--uh-fs-sm);color:var(--uh-text-2);display:flex;flex-direction:column;gap:2px}
.uhp-move-form{display:flex;flex-direction:column;gap:var(--uh-s2);padding-top:var(--uh-s2);border-top:1px dashed var(--uh-border)}
.uhp-move-form .uhp-form-grid{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
.uhp-modal{width:min(760px,100%)}
.uhp-modal .uhp-form{margin-bottom:var(--uh-s4)}
.uhp-buyer-date[hidden]{display:none}

/* Tablero en Inicio */
.uhp-dash{position:relative;display:flex;flex-direction:column;gap:var(--uh-s4);padding:var(--uh-s5);min-width:0;
  background:var(--uh-surface);border:1px solid var(--uh-border);border-radius:var(--uh-r-lg);box-shadow:var(--uh-shadow);color:var(--uh-text)}
.uhp-dash-head{display:flex;justify-content:space-between;align-items:flex-end;gap:var(--uh-s4);flex-wrap:wrap}
.uhp-dash-head h3{margin:0;font-family:var(--uh-font-display);font-size:var(--uh-fs-md);font-weight:700;color:var(--uh-text)}
.uhp-dash-head p{margin:2px 0 0;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.uhp-dash-filters{display:flex;align-items:flex-end;gap:var(--uh-s2);flex-wrap:wrap}
.uhp-dash-filters .uhp-field select{min-height:34px;padding:4px 10px;font-size:var(--uh-fs-sm)}
.uhp-dash-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--uh-s3)}
.uhp-dkpi{display:flex;flex-direction:column;gap:4px;padding:var(--uh-s3) var(--uh-s4);border-radius:var(--uh-r);background:var(--uh-surface-2);min-width:0}
.uhp-dkpi[role=link]{cursor:pointer} .uhp-dkpi[role=link]:hover{box-shadow:inset 0 0 0 1px var(--uh-border-strong)}
.uhp-dkpi>span{font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-2)}
.uhp-dkpi strong{font-family:var(--uh-font-display);font-size:var(--uh-fs-lg);font-weight:700;line-height:1.2;color:var(--uh-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.uhp-dkpi small{font-size:11px;font-weight:400;color:var(--uh-text-3)}
.uhp-dkpi strong .uhp-amt{display:block;white-space:nowrap}
.uhp-dash-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--uh-s3)}
.uhp-chart{display:flex;flex-direction:column;gap:var(--uh-s2);padding:var(--uh-s4);border:1px solid var(--uh-border);border-radius:var(--uh-r);min-width:0}
.uhp-chart-wide{grid-column:span 2}
.uhp-chart h4{display:flex;align-items:baseline;justify-content:space-between;gap:var(--uh-s2);margin:0;font-size:var(--uh-fs-sm);font-weight:700;color:var(--uh-text)}
.uhp-chart h4 small{font-size:11px;font-weight:600;color:var(--uh-text-3)}
.uhp-chart .uhp-state{padding:var(--uh-s5) var(--uh-s3);border-style:dashed}
.uhp-chart .uhp-state strong{font-size:var(--uh-fs-sm)}
.uhp-svg{display:block;width:100%;height:auto;overflow:visible}
.uhp-svg path{cursor:default} .uhp-svg path:focus{outline:none;stroke:var(--uh-text);stroke-width:1.5}
.uhp-gridline{stroke:var(--uh-border);stroke-width:1}
.uhp-axis{fill:var(--uh-text-3);font-family:var(--uh-font);font-size:11px}
.uhp-legend{display:flex;flex-wrap:wrap;gap:var(--uh-s3);margin:0;padding:0;list-style:none;font-size:var(--uh-fs-xs);color:var(--uh-text-2)}
.uhp-legend span,.uhp-legend li{display:inline-flex;align-items:center;gap:6px}
.uhp-legend i{display:inline-block;width:10px;height:10px;border-radius:3px}
.uhp-legend-list{flex-direction:column;gap:6px}
.uhp-legend-list li{display:grid;grid-template-columns:10px minmax(0,1fr) auto 40px;gap:var(--uh-s2);align-items:center;cursor:pointer;padding:2px 0}
.uhp-legend-list b{color:var(--uh-text);font-variant-numeric:tabular-nums} .uhp-legend-list small{text-align:right;color:var(--uh-text-3)}
.uhp-segbar{display:flex;gap:2px;height:16px;margin:var(--uh-s2) 0;border-radius:4px;overflow:clip}
.uhp-segbar span{min-width:6px;cursor:pointer} .uhp-segbar span:focus-visible{outline-offset:1px}
.uhp-hbars{display:flex;flex-direction:column;gap:var(--uh-s2);margin:0;padding:0;list-style:none}
.uhp-hbars li{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) auto;gap:var(--uh-s2);align-items:center;font-size:var(--uh-fs-xs);color:var(--uh-text-2)}
.uhp-hbars li[role=link]{cursor:pointer} .uhp-hbars li[role=link]:hover .uhp-hbar-label{color:var(--uh-text);text-decoration:underline}
.uhp-hbar-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uhp-hbar-track{height:12px;border-radius:0 4px 4px 0;background:transparent}
.uhp-hbar-track span{display:block;height:100%;border-radius:0 4px 4px 0}
.uhp-hbars b{color:var(--uh-text);font-variant-numeric:tabular-nums}
.uhp-attn-list{display:flex;flex-direction:column;gap:var(--uh-s2);margin:0;padding:0;list-style:none}
.uhp-attn-list li{display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-size:var(--uh-fs-sm);color:var(--uh-text);min-width:0}
.uhp-attn-list li[role=link]{cursor:pointer}
.uhp-datatable summary{cursor:pointer;font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-link)}
.uhp-datatable table{margin-top:var(--uh-s2)}
.uhp-tip{position:absolute;z-index:5;transform:translate(-50%,-100%);padding:6px 10px;border-radius:var(--uh-r-sm);background:var(--uh-text);color:var(--uh-surface);font-size:var(--uh-fs-xs);font-weight:600;white-space:nowrap;pointer-events:none;box-shadow:var(--uh-shadow-lg)}
.uhp-dash-off{display:flex;flex-direction:column;gap:2px;font-size:var(--uh-fs-sm);color:var(--uh-text-3)}
.uhp-dash-off strong{color:var(--uh-text)}

/* Ficha V9.8: visitas, documentos e historial */
.uhp-danger{color:var(--uh-bad)!important}
.uhp-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.uhp-field textarea.uhp-short{min-height:64px}
.uhp-checks{display:flex;gap:var(--uh-s5);margin:var(--uh-s3) 0 var(--uh-s2);font-size:var(--uh-fs-sm);color:var(--uh-text)}
.uhp-checks label{display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.uhp-checks input{width:18px;height:18px;margin:0;accent-color:var(--uh-primary)}
.uhp-cards-list{display:flex;flex-direction:column;gap:var(--uh-s3);margin:0;padding:0;list-style:none}
.uhp-vcard,.uhp-doc{padding:var(--uh-s4);background:var(--uh-surface);border:1px solid var(--uh-border);border-radius:var(--uh-r);min-width:0}
.uhp-vcard{display:flex;flex-direction:column;gap:6px}
.uhp-vcard-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:var(--uh-s2)}
.uhp-vcard-head strong{font-size:var(--uh-fs-md);color:var(--uh-text)} .uhp-vcard-head small{font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.uhp-vcard-flags{display:flex;gap:6px;margin-left:auto}
.uhp-flag{min-height:26px;padding:0 10px;margin:0;border:1px solid var(--uh-border-strong);border-radius:999px;background:var(--uh-surface);color:var(--uh-text-2);font-family:var(--uh-font);font-size:var(--uh-fs-xs);font-weight:600;box-shadow:none;cursor:pointer}
.uhp-flag.on{background:var(--uh-ok);border-color:var(--uh-ok);color:var(--uh-surface)}
.uhp-vcard p{margin:0;font-size:var(--uh-fs-sm);color:var(--uh-text-2);overflow-wrap:anywhere}
.uhp-vcard-offer b{color:var(--uh-text)} .uhp-vcard-comment{font-style:italic}
.uhp-vcard-actions,.uhp-doc-actions{display:flex;gap:6px;flex-wrap:wrap}
.uhp-doc{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:var(--uh-s3);align-items:center}
.uhp-doc-ico{display:grid;place-items:center;width:44px;height:44px;border-radius:var(--uh-r-sm);background:var(--uh-bad-soft);color:var(--uh-bad);font-size:11px;font-weight:700}
.uhp-doc-share{grid-column:1/-1;display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.uhp-doc-share[hidden]{display:none}
.uhp-doc-share .uhp-field{flex:1 1 180px}
.uhp-doc-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.uhp-doc-text strong{font-size:var(--uh-fs);color:var(--uh-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uhp-doc-text small{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:var(--uh-fs-xs);color:var(--uh-text-3)}
.uhp-timeline{margin:0;padding:0 0 0 var(--uh-s4);list-style:none;border-left:2px solid var(--uh-border)}
.uhp-timeline li{position:relative;padding:0 0 var(--uh-s4) var(--uh-s4)}
.uhp-timeline li::before{content:"";position:absolute;left:calc(-1 * var(--uh-s4) - 6px);top:4px;width:10px;height:10px;border-radius:50%;background:var(--uh-surface);border:2px solid var(--uh-primary)}
.uhp-timeline time{display:block;font-size:var(--uh-fs-xs);color:var(--uh-text-3);font-variant-numeric:tabular-nums}
.uhp-timeline p{margin:2px 0 0;font-size:var(--uh-fs-sm);color:var(--uh-text-2)} .uhp-timeline b{color:var(--uh-text)}

/* Totales del mes y del año en Inicio (V9.8) */
.uhp-totals h4{display:flex;align-items:baseline;gap:var(--uh-s2);margin:0 0 var(--uh-s3);font-family:var(--uh-font-display);font-size:var(--uh-fs-md);font-weight:700;color:var(--uh-text)}
.uhp-totals h4 small{font-family:var(--uh-font);font-size:var(--uh-fs-xs);font-weight:600;color:var(--uh-text-3)}
.uhp-tot-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--uh-s3)}
.uhp-tot{display:flex;flex-direction:column;gap:4px;padding:var(--uh-s3) var(--uh-s4);border:1px solid var(--uh-border);border-left:3px solid var(--uh-info);border-radius:var(--uh-r);background:var(--uh-surface);min-width:0}
.uhp-tot[data-tone=ok]{border-left-color:var(--uh-ok)} .uhp-tot[data-tone=warn]{border-left-color:var(--uh-warn)} .uhp-tot[data-tone=bad]{border-left-color:var(--uh-bad)}
.uhp-tot>span{font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--uh-text-2)}
.uhp-tot strong{font-family:var(--uh-font-display);font-size:var(--uh-fs-lg);font-weight:700;line-height:1.2;color:var(--uh-text);font-variant-numeric:tabular-nums}
.uhp-tot strong .uhp-amt{display:block;white-space:nowrap}
.uhp-tot small{font-size:11px;color:var(--uh-text-3)}

@media (max-width:1024px){
  .uhp-dash-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .uhp-dash-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .uhp-chart-wide{grid-column:1/-1}
  .uhp-row{grid-template-columns:repeat(3,minmax(0,1fr)) 36px}
  .uhp-tot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .uhp-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .uhp-lhead{display:none}
  .uhp-lrow{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main price" "chips chips" "status status" "actions actions";row-gap:var(--uh-s2)}
  .uhp-lmain{grid-area:main} .uhp-lprice{grid-area:price;text-align:right} .uhp-lchips{grid-area:chips}
  .uhp-lstatus{grid-area:status} .uhp-lactions{grid-area:actions;justify-content:flex-start}
}
@media (max-width:640px){
  .uhp-dash{padding:var(--uh-s4)}
  .uhp-dash-grid{grid-template-columns:minmax(0,1fr)}
  .uhp-filters{grid-template-columns:minmax(0,1fr)}
  .uhp-span-2{grid-column:1/-1}
  .uhp-form fieldset{padding:var(--uh-s3) var(--uh-s4)}
  .uhp-row,.uhp-row-share{grid-template-columns:minmax(0,1fr) 36px}
  .uhp-row .uhp-field{grid-column:1}
  .uhp-head-actions{width:100%} .uhp-head-actions .primary{flex:1 1 auto}
  .uhp-kpi{padding:var(--uh-s3)} .uhp-kpi strong{font-size:var(--uh-fs-md)}
  .uhp-table th,.uhp-table td{padding:6px var(--uh-s2)}
  .uhp-dash-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .uhp-dkpi{padding:var(--uh-s3)} .uhp-dkpi strong{font-size:var(--uh-fs-md)}
  .uhp-tot{padding:var(--uh-s3)} .uhp-tot strong{font-size:var(--uh-fs-md)}
  .uhp-grid-4{grid-template-columns:minmax(0,1fr)}
  .uhp-lstatus .uhp-seg{display:flex;width:100%} .uhp-lstatus .uhp-seg button{flex:1 1 0;padding:0 4px}
  .uhp-lactions .uh-btn-sm{flex:1 1 auto}
  .uhp-doc{grid-template-columns:44px minmax(0,1fr)} .uhp-doc-actions{grid-column:1/-1}
  .uhp-vcard-flags{margin-left:0;width:100%}
}

/* ---------- 6 · RESPONSIVE (3 cortes) ---------- */
@media (max-width:1024px){
  :root{--uh-pad:16px}
  .app,.app.sidebar-collapsed{grid-template-columns:minmax(0,1fr)}
  .sidebar,.app.sidebar-collapsed .sidebar{
    position:fixed;inset:0 auto 0 0;width:280px;max-width:86vw;height:100dvh;
    transform:translateX(-105%);opacity:1;pointer-events:auto;padding:20px 12px 16px;
    box-shadow:var(--uh-shadow-lg);transition:transform .2s ease;
    z-index:130; /* V9.7.1 · por encima del fondo oscuro del menú móvil (.mobile-sidebar-backdrop, 110) */
  }
  .sidebar.open,.app.sidebar-collapsed .sidebar.open{transform:translateX(0)}
  .topbar .sidebar-mode-action{display:none}
  .topbar-user-copy{display:none}
  .topbar-user{padding-left:var(--uh-s2)}
  .v256-health,#v256Health{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v92524-main-top{grid-template-columns:minmax(0,1fr)}
  .cq-main-controls>.v92526-search{flex-basis:100%}
  .v92533-performance-card{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "gauge" "chart"}
  .v257-month-chart{padding:var(--uh-s4) 0 0;border-left:0;border-top:1px solid var(--uh-border)}
  .v92592-gmail-shortcut{grid-template-columns:minmax(0,1fr) auto}
  .v92592-dash-mails{grid-column:1/-1;grid-row:2}
  .uhs-dash-compact{grid-template-columns:minmax(0,1fr) auto}
  .uhs-dash-mini{grid-column:1/-1;grid-row:2}
}
@media (max-width:640px){
  :root{--uh-pad:12px;--uh-topbar-h:60px}
  .workspace>.topbar,.topbar{gap:var(--uh-s2);padding:0 var(--uh-pad)}
  .topbar-clock,.workspace>.topbar .topbar-clock{display:none}
  .topbar .uhs-top-badge .uhs-top-text{display:none}
  .topbar .uhs-top-badge{padding:0 8px}
  .topbar-user{display:none}
  .topbar-title h2{font-size:15px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.2}
  .topbar-title p{display:none}
  .v256-dashboard,.crm-shell,#crmBody{gap:var(--uh-s4)}
  .v256-card,.v255-priority-crm,.v92533-clients-panel,.crm-panel,.v92533-performance-card,.uhs-dashboard-summary{padding:var(--uh-s4)}
  .v256-health,#v256Health{grid-template-columns:minmax(0,1fr);gap:var(--uh-s3)}
  .v256-health>article{padding:14px 14px 14px 18px}
  .v256-health>article>strong,.v256-health>article>div>strong{font-size:24px}
  .v256-card-head>div:first-child,.v92532-journey-head>div:first-child,.crm-toolbar>div:first-child,.v92533-performance-head>div:first-child{flex:1 1 100%}
  .v256-head-actions{justify-content:flex-start;width:100%}
  .v256-card-foot{justify-content:stretch}
  .v256-card-foot>button{flex:1 1 auto;width:auto}
  .uh-list-row{grid-template-columns:minmax(0,1fr)}
  .uh-list-side{justify-content:space-between}
  #v256PriorityList{grid-template-columns:minmax(0,1fr)}
  .v92592-gmail-shortcut{grid-template-columns:minmax(0,1fr);gap:var(--uh-s3);padding:var(--uh-s4)}
  .v92592-dash-mails{grid-row:auto}
  .v92592-dash-mail-actions{justify-content:stretch}
  .v92592-dash-mail-actions>button{flex:1 1 auto}
  .uhs-dash-compact{grid-template-columns:minmax(0,1fr);gap:var(--uh-s3)}
  .uhs-dash-mini{grid-row:auto}
  .uhs-dash-mini>div{flex:1 1 0;min-width:0}
  #radarDashCard .radar-source-head{flex-direction:column;align-items:stretch}
  .v92533-kpi-panel{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v92532-journey-filters,.v92526-filter-grid{grid-template-columns:minmax(0,1fr)}
  .cq-main-controls>label,.cq-main-controls>button{flex:1 1 100%}
  .crm-queue-item{grid-template-columns:minmax(0,1fr) auto;row-gap:6px}
  .crm-queue-item>.crm-badge{grid-column:2;grid-row:1}
  .crm-queue-item>button{grid-column:1/-1;width:100%}
  .crm-tab{padding:0 10px;font-size:var(--uh-fs-sm)}
  .modal-back{padding:12px}
  .modal{padding:var(--uh-s4)}
}

/* Propiedades e Inicio: tabla contable, superficies simples y gestos táctiles. */
.uhp-dash,.uhp-chart{box-shadow:none}
.uhp-balance-scroll{overflow-x:auto}
.uhp-balance td:not(:first-child),.uhp-balance th:not(:first-child){text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.uhp-balance tfoot{font-weight:700}
@media (pointer:coarse){
  #content{touch-action:pan-x pan-y}
  #content input:not([type=checkbox]):not([type=radio]),#content select,#content textarea{font-size:max(16px,1em)}
}
.uhp-expense-period{max-width:15rem;margin-block:1rem .5rem}
.uhp-expense-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:var(--uh-s3);margin-block:.5rem 1rem}
.uhp-totals-head{display:flex;justify-content:space-between;align-items:baseline;gap:var(--uh-s3);flex-wrap:wrap;margin-bottom:var(--uh-s3)}
.uhp-totals-head h4{margin:0}
.uhp-totals-head h4 small{white-space:normal}
.uhp-tot-pair>div{display:grid;gap:2px}
.uhp-tot-pair>div+div{margin-top:var(--uh-s2);padding-top:var(--uh-s2);border-top:1px solid var(--uh-border)}

/* Balance mensual y ficha de honorarios. */
.uhp-chart.uhp-cash-balance{grid-column:1/-1;gap:var(--uh-s3);background:var(--uh-surface)}
.uhp-cash-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;padding:var(--uh-s3) 0;border-block:1px solid var(--uh-border)}
.uhp-cash-totals div{padding-inline:var(--uh-s3);min-width:0}
.uhp-cash-totals div+div{border-inline-start:1px solid var(--uh-border)}
.uhp-cash-totals dt{display:flex;align-items:center;gap:var(--uh-s2);font-size:var(--uh-fs-xs);color:var(--uh-text-2)}
.uhp-cash-totals dd{margin:3px 0 0;font-size:clamp(13px,2vw,21px);font-weight:700;line-height:1.2;color:var(--uh-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.uhp-cash-key{flex:none;width:10px;height:10px;border-radius:2px}
.uhp-key-receipts{background:var(--uh-primary)}
.uhp-key-expenses{background:var(--uh-text-3)}
.uhp-key-net{height:3px;background:var(--uh-ok)}
.uhp-cash-plot{overflow-x:auto}
.uhp-cash-plot svg{display:block;width:100%;min-width:390px;height:auto}
.uhp-cash-plot-year svg{min-width:590px}
.uhp-cash-plot .uhp-axis{font-size:12px}
.uhp-cash-zero{stroke:var(--uh-text-3)}
.uhp-cash-receipts{fill:var(--uh-primary)}
.uhp-cash-expenses{fill:var(--uh-text-3);opacity:.68}
.uhp-cash-net{fill:none;stroke:var(--uh-ok);stroke-width:2.5;stroke-linejoin:round}
.uhp-cash-point{fill:var(--uh-surface);stroke:var(--uh-ok);stroke-width:2}
.uhp-cash-target{cursor:pointer}
.uhp-cash-target rect{fill:transparent}
.uhp-cash-target:is(:hover,:focus-visible,[aria-pressed=true]) rect{fill:var(--uh-primary);fill-opacity:.06}
.uhp-cash-target:focus-visible rect{stroke:var(--uh-primary);stroke-width:1}
.uhp-cash-target[aria-pressed=true] text{fill:var(--uh-text);font-weight:700}
.uhp-cash-future{opacity:.62}
.uhp-cash-selection{display:flex;align-items:baseline;flex-wrap:wrap;gap:var(--uh-s2) var(--uh-s4);padding:var(--uh-s3);background:var(--uh-surface-2);border-radius:var(--uh-r-sm);font-size:var(--uh-fs-xs);color:var(--uh-text-2)}
.uhp-cash-selection strong,.uhp-cash-selection b{color:var(--uh-text);font-variant-numeric:tabular-nums}
.uhp-cash-month{text-transform:capitalize}
.uhp-cash-balance .uhp-balance-scroll{margin-top:var(--uh-s2);border:1px solid var(--uh-border);border-radius:var(--uh-r-sm)}
.uhp-cash-balance thead th{border-top:0}
.uhp-cash-balance tbody th{background:transparent;color:var(--uh-text);text-transform:capitalize}
.uhp-cash-balance tbody tr:hover,.uhp-cash-balance .uhp-balance-current{background:var(--uh-surface-2)}
.uhp-cash-balance tfoot{background:var(--uh-surface-2)}
.uhp-cash-balance tfoot th{font-size:inherit;font-weight:inherit}
.uhp-cash-balance [data-balance]{font-weight:650}
.uhp-cash-balance [data-balance=positive]{color:var(--uh-ok)}
.uhp-cash-balance [data-balance=negative]{color:var(--uh-bad)}

.uhp-fees-fields,.uhp-fees-summary{display:flex;flex-direction:column;min-width:0;gap:var(--uh-s4)}
.uhp-fees-terms{grid-template-columns:repeat(2,minmax(0,1fr))}
.uhp-fees-extra{margin-top:var(--uh-s3);border-top:1px solid var(--uh-border);padding-top:var(--uh-s3)}
.uhp-fees-extra summary{cursor:pointer;color:var(--uh-text-2);font-size:var(--uh-fs-sm);font-weight:600}
.uhp-fees-extra[open] summary{margin-bottom:var(--uh-s3)}
.uhp-fees .uhp-calc{background:var(--uh-surface)}
.uhp-fees-base,.uhp-fees-total{display:flex;flex-wrap:wrap;gap:4px var(--uh-s3);justify-content:space-between;align-items:baseline}
.uhp-fees-base{margin:0 0 var(--uh-s3);padding-bottom:var(--uh-s3);border-bottom:1px solid var(--uh-border);color:var(--uh-text-2);font-size:var(--uh-fs-sm)}
.uhp-fees-base b,.uhp-fees-total strong{color:var(--uh-text);font-variant-numeric:tabular-nums}
.uhp-fees-total{margin-top:var(--uh-s3);padding:var(--uh-s3);background:var(--uh-surface-2);border-radius:var(--uh-r-sm);font-weight:700}
.uhp-fees-total strong{font-size:var(--uh-fs-md)}
.uhp-fees-payout{width:100%;border-collapse:collapse;margin-top:var(--uh-s3);font-size:var(--uh-fs-sm);color:var(--uh-text)}
.uhp-fees-payout th,.uhp-fees-payout td{padding:var(--uh-s2) 4px;border-bottom:1px solid var(--uh-border);text-align:left}
.uhp-fees-payout th{font-weight:600;overflow-wrap:anywhere}
.uhp-fees-payout thead,.uhp-fees-payout td:nth-child(2){color:var(--uh-text-2);font-size:var(--uh-fs-xs)}
.uhp-fees-payout :is(th,td):last-child{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.uhp-fees-agency{margin-top:var(--uh-s3)}
.uhp-fees-status{margin:var(--uh-s3) 0 0;color:var(--uh-warn);font-size:var(--uh-fs-sm);font-weight:650}
.uhp-fees-status[data-complete=true]{color:var(--uh-ok)}
.uhp-fees-summary .uhp-actions{justify-content:flex-end}
@media (min-width:1025px){
  .uhp-fees{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);align-items:start}
}
@media (max-width:480px){
  .uhp-cash-balance .uhp-balance :is(td,th){padding-inline:5px;font-size:var(--uh-fs-xs)}
}

.uhp-dash-more{border:1px solid var(--uh-border);border-radius:var(--uh-r);padding:var(--uh-s3);background:var(--uh-surface)}
.uhp-dash-more>summary{cursor:pointer;font-size:var(--uh-fs-sm);font-weight:700}
.uhp-dash-more[open]>summary{margin-bottom:var(--uh-s3)}
.uhp-dash-more>.uhp-tot-grid{margin-bottom:var(--uh-s3)}

.v256-health>.uhp-loading,.v256-health>.v256-empty{grid-column:1/-1;margin:0}
.uhp-totals-head h3{margin:0;color:var(--uh-text);font-size:var(--uh-fs-md)}
.uhp-summary-scope{margin:0 0 var(--uh-s2);font-size:var(--uh-fs-xs);color:var(--uh-text-2)}
.uh-home-stats{display:grid;gap:var(--uh-s4);align-items:start}
.uh-home-crm{min-width:0;padding:var(--uh-s5);background:var(--uh-surface);border:1px solid var(--uh-border);border-radius:var(--uh-r-lg);box-shadow:var(--uh-shadow)}
.uh-home-crm>h3{margin:0 0 var(--uh-s3);color:var(--uh-text);font-size:var(--uh-fs-md)}
.uh-home-stats #v256Health,.uh-home-stats .uhp-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--uh-s3)}
.uh-home-stats #v256Health>article{box-shadow:none}
.uh-home-stats #v256Health>article>strong{font-size:var(--uh-fs-lg)}
.uh-home-stats .uhp-summary-grid .uhp-tot strong{font-size:var(--uh-fs-md)}
/* Los importes y los textos de Inicio se ajustan al ancho de su tarjeta. */
.uh-home-stats #v256Health>article,.uh-home-stats .uhp-summary-grid .uhp-tot{
  align-items:stretch;text-align:center;overflow-wrap:anywhere;
}
.uh-home-stats .uhp-summary-grid .uhp-tot strong .uhp-amt{white-space:normal;overflow-wrap:anywhere}
.uh-home-stats .uhp-tot-pair>div{min-width:0}
.uh-home-stats .uhp-tot-link{align-self:center}
.uh-home-stats #v256Health .v256-health-action{align-self:center;width:auto}
.uhp-tot-link{margin-top:auto;align-self:flex-start;padding:var(--uh-s2) 0 0;border:0;background:none;color:var(--uh-link);font-size:var(--uh-fs-xs);font-weight:600;cursor:pointer}
.uhp-tot-link:hover{text-decoration:underline;text-underline-offset:3px}
.uhp-dash-detail,#uhCrmQuickTasks{display:grid;gap:var(--uh-s3);min-width:0}
@media(max-width:620px){
  .uh-home-crm{padding:var(--uh-s4)}
  .v256-dashboard #v256Health>article{padding:10px 10px 10px 13px}
}
@media(min-width:1100px){
  .uh-home-stats .uhp-tot-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start}
  .uh-home-stats .uhp-tot-pair>span{grid-column:1/-1}
  .uh-home-stats .uhp-tot-pair>div+div{margin:0;padding:0 0 0 var(--uh-s2);border-top:0;border-left:1px solid var(--uh-border)}
}
@media(min-width:1250px){.uhp-summary-grid[data-summary-cards="5"]{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:850px){.uh-home-stats #v256Health,.uh-home-stats .uhp-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.uh-home-crm-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
.uh-home-crm-head h3{margin:0;font-size:var(--uh-fs-md)}
.uh-home-crm-head button,.v256-calendar .v256-head-actions button{min-height:36px;padding:6px 9px;font-size:var(--uh-fs-xs)}
.uh-home-stats{gap:12px}
.uh-home-crm,.uh-home-stats .uhp-totals{padding:12px}
.uh-home-stats #v256Health,.uh-home-stats .uhp-summary-grid{gap:8px}
.v256-dashboard .uh-home-stats #v256Health>article,.uh-home-stats .uhp-summary-grid .uhp-tot{padding:8px 9px 8px 12px;gap:3px}
.uh-home-stats #v256Health .v256-health-action{margin:0;min-height:25px;font-size:var(--uh-fs-xs)}
.uh-home-stats .uhp-summary-grid .uhp-tot-pair>div+div{margin-top:0;padding-top:3px}
.v256-dashboard .v256-calendar-list .v256-empty{min-height:0;padding:14px}
@media(min-width:1280px){
  .uh-home-stats:has([data-uh-home-finance]>.uhp-dash){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .uh-home-stats #v256Health,.uh-home-stats .uhp-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1024px),(max-width:1400px) and (any-pointer:coarse){
  .uh-home-crm{padding:8px}
  .uh-home-crm-head{gap:6px;margin-bottom:6px;flex-wrap:wrap}
  .uh-home-crm-head h3{font-size:.95rem}
  .uh-home-stats #v256Health{gap:6px}
  .v256-dashboard .uh-home-stats #v256Health>article{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;
    padding:6px 8px;gap:2px 6px;border-radius:var(--uh-r-sm);
  }
  .uh-home-stats #v256Health>article>:not(.v256-health-action),
  .uh-home-stats #v256Health>article>.v256-health-action:only-of-type{grid-column:1/-1}
  .uh-home-stats #v256Health>article>strong{font-size:1.05rem}
  .uh-home-stats #v256Health>article>small{line-height:1.25}
  .uh-home-stats #v256Health .v256-health-action{
    min-width:0;min-height:28px;padding:2px 0;line-height:1.2;white-space:normal;
  }
}
@media(max-width:600px){
  .uh-home-stats .uhp-totals{padding:9px}
  .uh-home-stats .uhp-summary-grid .uhp-tot strong{font-size:.98rem}
}

.uhp-owner-admin{display:grid;gap:14px}
.uhp-owner-share{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px;border:1px solid var(--uh-border);border-radius:var(--uh-r)}
.uhp-owner-share h3,.uhp-owner-share p{margin:0 0 4px}
.uhp-owner-link{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:end;width:100%}
.uhp-owner-admin [data-owner-attach]{display:flex;align-items:end;flex-wrap:wrap;gap:8px;margin-top:10px}
.uhp-owner-admin [data-owner-attach] label{flex:1 1 180px}

[data-uhp-followup-print]{display:none}
.uhp-owner-admin [data-owner-ad],.uhp-owner-admin [data-owner-link-report]{margin-top:10px}
@media print{
  .uhp-followup-printing #app{display:block}
  .uhp-followup-printing #sidebar,.uhp-followup-printing .topbar,
  .uhp-followup-printing .uhp-shell > :not([data-uhp-panel]),
  .uhp-followup-printing [data-uhp-followup-form]{display:none}
  .uhp-followup-printing [data-uhp-followup-print]{display:block;color:#12233b;background:#fff;font:14px/1.5 system-ui,sans-serif}
  .uhp-followup-printing [data-uhp-followup-print] img{width:160px}
  .uhp-followup-printing [data-uhp-followup-print] p{white-space:pre-wrap;overflow-wrap:anywhere}
}

[data-owner-preview-pane]{min-width:0}
[data-owner-preview-pane] .uhp-actions{justify-content:center;margin:0 0 8px}
[data-owner-preview-status]{text-align:center}
[data-owner-preview-status]:empty{display:none}
.uhp-owner-preview{display:block;width:100%;height:clamp(420px,70vh,850px);border:1px solid var(--uh-border);border-radius:12px}

.uhp-owner-link{grid-template-columns:minmax(0,1fr) repeat(3,auto)}
.uhp-owner-link .uhp-field,.uhp-owner-link .uhp-field input{min-width:0}
.uhp-owner-link .uhp-field span{overflow-wrap:anywhere}
@media(max-width:800px){.uhp-owner-link{grid-template-columns:repeat(3,minmax(0,1fr))}.uhp-owner-link .uhp-field{grid-column:1/-1}.uhp-owner-link>a{text-align:center}}
@media(max-width:460px){.uhp-owner-link{grid-template-columns:repeat(2,minmax(0,1fr))}.uhp-owner-link .uhvf-whatsapp{grid-column:1/-1}}

/* Las leyendas forman parte de la tarjeta de Propiedades. */
.uhp-form fieldset>legend{float:left;width:100%;max-width:100%;padding:0 0 10px;margin:0 0 12px;border-bottom:1px solid var(--uh-border);text-align:center;line-height:1.35;overflow-wrap:anywhere}
.uhp-form fieldset>legend+*{clear:both}
.uhp-form .uhp-field>span{text-align:center;overflow-wrap:anywhere}
.uhp-form .uhp-field input,.uhp-form .uhp-field select{text-align:center;text-align-last:center}
.uhp-form .uhp-field input[type="date"],.uhp-form .uhp-field input[type="time"]{max-width:100%}
.uhp-panel .uhp-kpi{text-align:center;min-width:0;overflow-wrap:anywhere}
.uhp-form [data-marketing-publication] .uhp-form-grid,.uhp-form [data-marketing-contract] .uhp-form-grid{width:min(100%,520px);margin-inline:auto;grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr));align-items:end}
[data-marketing-publication] fieldset,[data-marketing-contract] fieldset{text-align:center}
[data-marketing-publication] fieldset>button,[data-marketing-contract] fieldset>button{margin-top:12px}
[data-uhp-followup-form] .uhp-field+.uhp-field{margin-top:14px}
[data-uhp-followup-form] .uhp-actions,[data-uhp-followup-actions]{justify-content:center;margin-top:14px}
[data-uhp-followup-form] textarea{display:block;width:100%;min-height:8rem}
[data-uhp-followup-form] textarea[name="analysis"]{min-height:12rem}

/* ==========================================================================
   9 · DISEÑO V10 · "prolijo" (inspirado en Urban Motors, colores UrbanHoff)
   --------------------------------------------------------------------------
   Capa final: solo estilos, no cambia datos ni comportamiento. Para volver al
   look anterior alcanza con borrar esta sección (y modules/uh-nav-design.js).
   Principios: tarjetas planas con borde fino, radio chico, texto alineado a la
   izquierda, indicadores en "franja" (una barra dividida por líneas de 1px),
   títulos de sección cortos y menú agrupado en minúscula.
   ========================================================================== */
:root{--uh-r-sm:6px;--uh-r:8px;--uh-r-lg:10px;--uh-shadow:0 1px 2px rgba(14,28,47,.05);--uh-bg:#F2F4F7}
body.dark-mode{--uh-bg:#0A1424}

/* ---- Menú lateral agrupado (grupos y nombres los pone uh-nav-design.js) ---- */
.sidebar .nav{gap:1px}
.sidebar .nav button{min-height:38px;padding:8px 12px;border-radius:var(--uh-r-sm);font-size:14px;font-weight:500;letter-spacing:0;text-transform:none;color:#C9D3E0}
.sidebar .nav button:hover{background:rgba(255,255,255,.06);color:#fff}
.sidebar .nav button.active{background:#12365C;color:#fff;font-weight:600}
.sidebar .nav button.active::before{left:-12px;top:6px;bottom:6px;width:3px;border-radius:0}
.sidebar .nav .uh-nav-group{display:block;padding:14px 12px 4px;margin:0;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8FA3BC;pointer-events:none;user-select:none}
.sidebar .nav .uh-nav-group:first-child{padding-top:4px}

/* ---- Tarjetas: planas, borde fino, mismo encabezado en todo Inicio ---- */
.v256-card,.crm-panel,.v255-priority-crm,.uhs-dashboard-summary,.v92592-gmail-shortcut,#radarDashCard,.uh-home-crm,.uh-home-stats .uhp-totals,.uhp-dash{
  border:1px solid var(--uh-border);border-radius:var(--uh-r-lg);box-shadow:none;background:var(--uh-surface)}
.uh-home-crm-head h3,.uhp-totals-head h3,.v256-card-head h3,.uhs-dash-title h4,#radarDashCard h4{
  font-family:var(--uh-font);font-size:15px;font-weight:700;letter-spacing:0;color:var(--uh-text)}
.v256-card-head span,.uhs-dash-title span,#radarDashCard p{font-size:12.5px;color:var(--uh-text-3)}

/* ---- Inicio: las dos franjas de indicadores a todo el ancho, una debajo de la otra ---- */
.v256-dashboard .uh-home-stats,.v256-dashboard .uh-home-stats:has([data-uh-home-finance]>.uhp-dash){display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.v256-dashboard .uh-home-crm,.v256-dashboard .uh-home-stats .uhp-totals{padding:16px 18px}
.uh-home-crm-head,.uhp-totals-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}

/* Franja: una sola barra dividida por líneas de 1px (en vez de tarjetas sueltas de distinta altura) */
.v256-dashboard .uh-home-stats #v256Health,.v256-dashboard .uh-home-stats .uhp-summary-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;padding:0;
  background:var(--uh-border);border:1px solid var(--uh-border);border-radius:var(--uh-r);overflow:hidden}
.v256-dashboard .uh-home-stats #v256Health>article,.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot{
  display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px;min-width:0;min-height:0;height:auto;
  padding:14px 16px;margin:0;text-align:left;background:var(--uh-surface);border:0;border-radius:0;box-shadow:none;overflow-wrap:normal}
.v256-dashboard .uh-home-stats #v256Health>article::before,.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot::before{display:none}
/* El tono queda como un punto chico junto al título (identidad nunca solo por color: el título lo dice) */
.v256-dashboard .uh-home-stats #v256Health>article>span,.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot>span{
  display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--uh-text-2)}
.v256-dashboard .uh-home-stats #v256Health>article>span::before,.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot>span::before{
  content:"";flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:var(--uh-tone,var(--uh-text-3))}
.uhp-tot[data-tone=ok]{--uh-tone:var(--uh-ok)} .uhp-tot[data-tone=warn]{--uh-tone:#D98A00}
.uhp-tot[data-tone=bad]{--uh-tone:var(--uh-bad)} .uhp-tot[data-tone=info]{--uh-tone:var(--uh-info)}
.v256-dashboard .uh-home-stats #v256Health>article>strong,.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot strong{
  font-family:var(--uh-font-display);font-size:26px;font-weight:700;line-height:1.15;letter-spacing:-.01em;color:var(--uh-text);font-variant-numeric:tabular-nums}
.v256-dashboard .uh-home-stats #v256Health>article>small,.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot small{font-size:12px;line-height:1.35;color:var(--uh-text-3)}
.v256-dashboard .uh-home-stats #v256Health .v256-health-action,.v256-dashboard .uh-home-stats .uhp-tot-link{
  align-self:flex-start;width:auto;min-height:0;margin:auto 0 0;padding:6px 0 0;border:0;background:none;color:var(--uh-link);font-size:12.5px;font-weight:600;text-align:left}
/* Importes de "este mes" y "acumulado": uno debajo del otro, siempre alineados a la izquierda */
.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot.uhp-tot-pair{display:flex;flex-direction:column;gap:4px}
.v256-dashboard .uh-home-stats .uhp-tot-pair>div{display:flex;flex-direction:column;gap:1px;align-self:stretch;width:100%;min-width:0;margin:0;padding:0;border:0}
.v256-dashboard .uh-home-stats .uhp-tot-pair>div+div{margin-top:4px;padding:6px 0 0;border-top:1px solid var(--uh-border);border-left:0}
.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot.uhp-tot-pair strong{font-size:19px}
.v256-dashboard .uh-home-stats .uhp-tot strong .uhp-amt{display:block;white-space:normal;overflow-wrap:anywhere}

/* Propiedades y finanzas: una sola tarjeta (antes había un recuadro dentro de otro) */
.v256-dashboard .uh-home-stats .uhp-dash{padding:16px 18px}
.v256-dashboard .uh-home-stats .uhp-dash .uhp-totals{padding:0;border:0;border-radius:0;background:none}

/* ---- Búsquedas, Gmail y Radar: misma estructura (título a la izquierda, acciones a la derecha) ---- */
.v256-dashboard .uhs-dashboard-summary,.v256-dashboard .v92592-gmail-shortcut,.v256-dashboard #radarDashCard{padding:16px 18px}
.v256-dashboard .uhs-dash-mini{gap:1px;background:var(--uh-border);border:1px solid var(--uh-border);border-radius:var(--uh-r);overflow:hidden}
.v256-dashboard .uhs-dash-mini>div{flex:1 1 0;min-width:104px;padding:8px 14px;border:0;border-radius:0;background:var(--uh-surface)}
.v256-dashboard .uhs-dash-mini span{font-size:12px;font-weight:600;color:var(--uh-text-3)}
.v256-dashboard .uhs-dash-mini strong{font-size:22px}
.v256-dashboard .v256-tools{gap:16px}
.v256-dashboard .v92592-dash-mails>button{border-radius:var(--uh-r-sm)}
.v256-dashboard .v92592-dash-mails>button>strong{font-size:12px;font-weight:600;color:var(--uh-text-2)}
.v256-dashboard .v92592-dash-mails>button>span{font-size:13px;font-weight:500;color:var(--uh-text)}

/* ---- Gestión de clientes: los indicadores también en franja, con punto de color ---- */
.v92533-kpi-panel.v92541-kpi-panel,.v92533-kpi-panel{gap:1px;padding:0;background:var(--uh-border);border:1px solid var(--uh-border);border-radius:var(--uh-r-lg);overflow:hidden}
.v92533-kpi-card{min-height:96px;padding:14px 16px;border:0;border-radius:0;box-shadow:none}
.v92533-kpi-card::before{display:none}
.v92533-kpi-card>span{display:flex;align-items:flex-start;gap:7px;min-height:0}
.v92533-kpi-card>span::before{content:"";flex:0 0 8px;width:8px;height:8px;margin-top:4px;border-radius:50%;background:var(--uh-tone,var(--uh-primary))}
.v92533-kpi-card>strong{font-size:26px}
button.v92533-kpi-card:hover{background:var(--uh-surface-2)}

/* ---- Botones y chips un poco más sobrios ---- */
.primary,.secondary,.uh-btn-sm{border-radius:var(--uh-r-sm)}
.uh-chip{border-radius:4px}

/* ---- Tablet y celular: franjas de 2 columnas, todo alineado ---- */
@media(max-width:1024px){
  .v256-dashboard .uh-home-stats #v256Health,.v256-dashboard .uh-home-stats .uhp-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v256-dashboard .uh-home-stats #v256Health>article{display:flex;padding:12px 14px}
  .v256-dashboard .uh-home-stats #v256Health>article>strong{font-size:22px}
}
@media(max-width:640px){
  .v256-dashboard .uh-home-crm,.v256-dashboard .uh-home-stats .uhp-totals,.v256-dashboard .uhs-dashboard-summary,.v256-dashboard .v92592-gmail-shortcut,.v256-dashboard #radarDashCard,.v256-dashboard .uh-home-stats .uhp-dash{padding:14px}
  .v256-dashboard .uh-home-stats #v256Health>article,.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot{padding:10px 12px}
  .v256-dashboard .uh-home-stats #v256Health>article>strong,.v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot strong{font-size:20px}
  .v256-dashboard #radarDashCard,.v256-dashboard #radarDashCard .radar-source-head{text-align:left;align-items:flex-start}
  .v256-dashboard .uh-home-stats .uhp-summary-grid .uhp-tot.uhp-tot-pair strong{font-size:16px}
  .v256-dashboard .uhs-dash-mini>div{min-width:0;flex:1 1 0;padding:8px 10px}
  .v92533-kpi-panel>:last-child:nth-child(odd){grid-column:1/-1}
}

/* ---- 9.1 · V10.1 · Mismo criterio en el resto de las pantallas ----
   Se usa #app para ganarle a las hojas de cada módulo (radar.css, searches.css,
   search-alerts.css), que se cargan después y sin capa. */
/* Franjas de indicadores: Búsquedas, alertas, Radar, Balance y fichas de Propiedad */
#app .uhs-kpis,#app .uhpa-kpis,#app .radar-kpis,#app .uhp-summary-grid,#app .uhp-panel .uhp-kpis{
  gap:1px;padding:0;background:var(--uh-border);border:1px solid var(--uh-border);border-radius:var(--uh-r-lg);overflow:hidden;box-shadow:none}
#app .uhs-kpis>.uhs-kpi,#app .uhpa-kpis>div,#app .radar-kpis>.radar-kpi,#app .uhp-summary-grid>.uhp-tot,#app .uhp-panel .uhp-kpis>.uhp-kpi{
  display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;min-height:0;margin:0;padding:14px 16px;
  text-align:left;background:var(--uh-surface);border:0;border-radius:0;box-shadow:none}
#app .uhp-summary-grid>.uhp-tot::before,#app .radar-kpis>.radar-kpi::before,#app .uhs-kpis>.uhs-kpi::before{display:none}
#app .uhs-kpis>.uhs-kpi>span,#app .uhpa-kpis>div>span,#app .radar-kpis>.radar-kpi>span,#app .uhp-panel .uhp-kpis>.uhp-kpi>span{
  display:block;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--uh-text-2)}
#app .uhs-kpis>.uhs-kpi>strong,#app .uhpa-kpis>div>strong,#app .radar-kpis>.radar-kpi>strong,#app .uhp-panel .uhp-kpis>.uhp-kpi>strong{
  font-family:var(--uh-font-display);font-size:24px;font-weight:700;line-height:1.15;color:var(--uh-text);font-variant-numeric:tabular-nums}
#app .uhs-kpis small,#app .uhpa-kpis small,#app .radar-kpis small,#app .uhp-panel .uhp-kpis small{font-size:12px;color:var(--uh-text-3)}
/* Tarjetas de Balance (fuera de Inicio): título con punto de color e importes uno debajo del otro */
#app .uhp-summary-grid>.uhp-tot>span{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--uh-text-2)}
#app .uhp-summary-grid>.uhp-tot>span::before{content:"";flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:var(--uh-tone,var(--uh-text-3))}
#app .uhp-summary-grid>.uhp-tot strong{font-family:var(--uh-font-display);font-size:22px;font-weight:700;line-height:1.15;color:var(--uh-text)}
#app .uhp-summary-grid>.uhp-tot.uhp-tot-pair{display:flex;flex-direction:column;gap:4px}
#app .uhp-summary-grid>.uhp-tot-pair>div{display:flex;flex-direction:column;gap:1px;align-self:stretch;width:100%;min-width:0;margin:0;padding:0;border:0}
#app .uhp-summary-grid>.uhp-tot-pair>div+div{margin-top:4px;padding:6px 0 0;border-top:1px solid var(--uh-border);border-left:0}
#app .uhp-summary-grid>.uhp-tot-pair strong{font-size:19px}
#app .uhp-summary-grid>.uhp-tot strong .uhp-amt{display:block;white-space:normal;overflow-wrap:anywhere}

/* Radar: encabezado plano (sin degradé) y tarjetas iguales al resto */
#app .radar-hero,#app .radar-toolbar,#app .radar-source-panel{background:var(--uh-surface);background-image:none;border:1px solid var(--uh-border);border-radius:var(--uh-r-lg);box-shadow:none}
/* Usuarios: tarjetas del equipo planas, sin franja de color arriba */
#app .crm-team-card{background:var(--uh-surface);background-image:none;border:1px solid var(--uh-border);border-radius:var(--uh-r-lg);box-shadow:none}
#app .crm-team-card::before,#app .crm-team-card::after{display:none}
#app .crm-mini-grid>div{border:1px solid var(--uh-border);border-radius:var(--uh-r-sm);box-shadow:none}
/* Ficha de Propiedad: títulos y campos alineados a la izquierda, como el resto de los formularios */
#app .uhp-form fieldset>legend{text-align:left}
#app .uhp-form .uhp-field>span{text-align:left}
#app .uhp-form .uhp-field input,#app .uhp-form .uhp-field select{text-align:left;text-align-last:auto}
#app .uhp-panel .uhp-kpi{text-align:left}
#app [data-marketing-publication] fieldset,#app [data-marketing-contract] fieldset{text-align:left}
#app .uhp-form [data-marketing-publication] .uhp-form-grid,#app .uhp-form [data-marketing-contract] .uhp-form-grid{width:auto;margin-inline:0}
#app .uhvf-property.uhp-panel{border-top:1px solid var(--uh-border);border-radius:var(--uh-r-lg)}

/* V10.1b: la franja de alertas no se estira (evita el relleno gris) */
#app .uhpa-kpis{align-self:start;align-content:start}
/* Usuarios: tabla y gráficos con el mismo marco plano */
#app #content>.table-wrap,#app .v253-chart-card{background:var(--uh-surface);background-image:none;border:1px solid var(--uh-border);border-radius:var(--uh-r-lg);box-shadow:none}
#app #content>.table-wrap thead th{background:var(--uh-surface-2,#F7F8FA)}

/* V10.1c: el título flota; si lo primero que sigue es un campo oculto (formularios de anuncios),
   la grilla quedaba al costado y los campos se veían en una columna de 1 letra. Todo lo que sigue limpia. */
#app .uhp-form fieldset>legend~*{clear:both}
#app [data-owner-ad] .uhp-form-grid{align-items:end}
#app .uhp-form fieldset>[data-owner-ad]{margin-top:var(--uh-s3)}
#app .uhp-form fieldset>.uhp-hint+button,#app .uhp-form fieldset>.uhp-form-grid+button{margin-top:var(--uh-s3)}

@media(max-width:1024px){
  #app .uhs-kpis,#app .radar-kpis,#app .uhp-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #app .uhs-kpis>:last-child:nth-child(odd),#app .radar-kpis>:last-child:nth-child(odd),#app .uhp-summary-grid>:last-child:nth-child(odd),#app .uhpa-kpis>:last-child:nth-child(odd){grid-column:1/-1}
}
@media(max-width:640px){
  #app .uhs-kpis>.uhs-kpi,#app .uhpa-kpis>div,#app .radar-kpis>.radar-kpi,#app .uhp-summary-grid>.uhp-tot,#app .uhp-panel .uhp-kpis>.uhp-kpi{padding:10px 12px}
  #app .uhs-kpis>.uhs-kpi>strong,#app .uhpa-kpis>div>strong,#app .radar-kpis>.radar-kpi>strong,#app .uhp-panel .uhp-kpis>.uhp-kpi>strong{font-size:20px}
}
