/* Estilo Smart — Panel de administración (mock). All classes prefixed esd-. Uses tokens.css variables. */
.esd-root{container-type:inline-size;container-name:esd;font-family:var(--f-body);color:var(--ink);-webkit-font-smoothing:antialiased;width:100%;min-width:0}
.esd-root *,.esd-root *::before,.esd-root *::after{box-sizing:border-box}
.esd-root :where(button){font:inherit;color:inherit;cursor:pointer}
.esd-root svg{display:block;flex:none}
.esd-num,.esd-root .esd-table td,.esd-root .esd-axis{font-variant-numeric:tabular-nums}

/* window frame */
.esd-window{position:relative;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:var(--sh-3);overflow:hidden}
.esd-chrome{display:grid;grid-template-columns:96px 1fr 96px;align-items:center;height:40px;padding:0 14px;background:var(--mist);border-bottom:1px solid var(--line)}
.esd-lights{display:flex;gap:7px}
.esd-lights i{width:11px;height:11px;border-radius:50%;background:#D9D9DC;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.08)}
.esd-lights i:first-child{background:var(--red-200)}
.esd-url{justify-self:center;display:flex;align-items:center;gap:6px;height:26px;padding:0 14px;min-width:0;max-width:340px;width:100%;justify-content:center;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-pill);font-size:12px;color:var(--ink-3)}
.esd-url svg{color:var(--ink-4)}
.esd-url span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* app layout */
.esd-app{display:grid;grid-template-columns:232px minmax(0,1fr);height:820px;height:clamp(600px,calc(100vh - 120px),820px);height:clamp(600px,calc(100svh - 120px),820px);position:relative}
.esd-window.is-full .esd-app{height:auto}
.esd-side{display:flex;flex-direction:column;gap:16px;padding:20px 12px 16px;border-right:1px solid var(--line);background:var(--mist-2);min-width:0}
.esd-brand{display:flex;align-items:center;gap:10px;padding:0 8px}
.esd-brand img{height:24px;width:auto}
.esd-brand span{font-family:var(--f-display);font-weight:700;font-size:14px;letter-spacing:-.01em;color:var(--ink-2);white-space:nowrap}
.esd-env{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;margin:0 8px;padding:4px 10px;font-size:11.5px;font-weight:500;color:var(--ink-2);background:var(--paper);border:1px solid var(--line);border-radius:var(--r-pill)}
.esd-env i,.esd-sys i{width:6px;height:6px;border-radius:50%;background:var(--ok);box-shadow:0 0 0 3px rgba(31,138,76,.14);flex:none}
.esd-nav{display:flex;flex-direction:column;gap:2px}
.esd-nav-i{position:relative;display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border:0;background:transparent;border-radius:var(--r-sm);font-size:13.5px;font-weight:500;color:var(--ink-2);text-align:left;transition:background .2s var(--ease),color .2s var(--ease)}
.esd-nav-i svg{color:var(--ink-3);--icon-fill:rgba(20,20,20,.06);transition:color .2s var(--ease)}
.esd-nav-i:hover{background:var(--line-2);color:var(--ink)}
.esd-nav-i.is-on{background:var(--paper);color:var(--ink);box-shadow:var(--sh-1),inset 0 0 0 1px var(--line)}
.esd-nav-i.is-on svg{color:var(--red);--icon-fill:rgba(182,6,19,.14)}
.esd-nav-i.is-on::before{content:"";position:absolute;left:-12px;top:9px;bottom:9px;width:3px;border-radius:0 3px 3px 0;background:var(--red)}
.esd-nav-i span{flex:1;white-space:nowrap}
.esd-badge{min-width:18px;height:18px;padding:0 5px;border-radius:var(--r-pill);background:var(--red);color:#fff;font-size:10.5px;font-weight:600;display:grid;place-items:center}
.esd-side-foot{margin-top:auto;display:flex;flex-direction:column;gap:12px}
.esd-sys{display:flex;gap:10px;align-items:flex-start;padding:12px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-sm)}
.esd-sys i{margin-top:5px}
.esd-sys strong,.esd-me strong{display:block;font-size:12.5px;font-weight:600}
.esd-sys span,.esd-me div span{display:block;font-size:11.5px;color:var(--ink-3);margin-top:2px}
.esd-me{display:flex;align-items:center;gap:10px;padding:8px;border-top:1px solid var(--line);padding-top:14px}
.esd-me>div{min-width:0}
.esd-me strong,.esd-me div span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.esd-avatar{flex:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--red-50);color:var(--red);font-size:11.5px;font-weight:600;box-shadow:inset 0 0 0 1px var(--red-100)}
.esd-avatar.is-ink{background:var(--ink);color:#fff;box-shadow:none}

.esd-main{display:flex;flex-direction:column;min-width:0;overflow-y:auto;overflow-x:hidden;background:var(--paper);scroll-behavior:smooth}
.esd-top{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:16px;height:52px;padding:0 24px;background:rgba(255,255,255,.86);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line)}
.esd-crumbs{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink-3);min-width:0;white-space:nowrap}
.esd-crumbs svg{color:var(--ink-4)}
.esd-crumbs b{color:var(--ink);font-weight:500}
.esd-top-r{display:flex;align-items:center;gap:8px}
.esd-bell{position:relative}
.esd-bell i{position:absolute;top:7px;right:8px;width:7px;height:7px;border-radius:50%;background:var(--red);box-shadow:0 0 0 2px var(--paper)}

.esd-view{flex:1;padding:24px 24px 8px;display:flex;flex-direction:column;gap:16px;transition:opacity .2s var(--ease),transform .28s var(--ease)}
.esd-view.is-out{opacity:0;transform:translateY(4px)}
.esd-view.is-in{opacity:0;transform:translateY(-4px);transition:none}
.esd-vh{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:8px}
.esd-vh h1{margin:0;font-family:var(--f-display);font-size:24px;font-weight:700;letter-spacing:-.02em;line-height:1.15}
.esd-vh p{margin:4px 0 0;font-size:13px;color:var(--ink-3)}
.esd-span{color:var(--ink-2);font-variant-numeric:tabular-nums}
.esd-vh-r{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.esd-foot{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:16px 24px 20px;font-size:11.5px;color:var(--ink-4)}
.esd-foot span:first-child{color:var(--ink-3);font-weight:500}

/* controls */
.esd-seg{display:inline-flex;padding:3px;background:var(--line-2);border-radius:var(--r-sm);gap:2px;max-width:100%;overflow-x:auto;scrollbar-width:none}
.esd-seg button{border:0;background:transparent;height:28px;padding:0 12px;border-radius:7px;font-size:12.5px;font-weight:500;color:var(--ink-3);white-space:nowrap;transition:all .2s var(--ease)}
.esd-seg button:hover{color:var(--ink)}
.esd-seg button.is-on{background:var(--paper);color:var(--ink);box-shadow:var(--sh-1),0 0 0 1px rgba(20,20,20,.04)}
.esd-select{position:relative;display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 30px 0 10px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--paper);transition:border-color .2s var(--ease),box-shadow .2s var(--ease);max-width:100%}
.esd-select:hover{border-color:var(--ink-4)}
.esd-select:focus-within{border-color:var(--red);box-shadow:0 0 0 3px var(--red-50)}
.esd-select svg{color:var(--ink-3)}
.esd-select select{appearance:none;-webkit-appearance:none;border:0;background:transparent;font:500 12.5px var(--f-body);color:var(--ink);outline:none;cursor:pointer;min-width:0;width:100%;text-overflow:ellipsis}
.esd-caret{position:absolute;right:11px;top:50%;width:7px;height:7px;margin-top:-5px;border-right:1.5px solid var(--ink-3);border-bottom:1.5px solid var(--ink-3);transform:rotate(45deg);pointer-events:none}
.esd-select-sm{height:30px}
.esd-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:34px;padding:0 14px;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--paper);font-size:12.5px;font-weight:500;white-space:nowrap;transition:background .2s var(--ease),border-color .2s var(--ease),transform .2s var(--ease),box-shadow .2s var(--ease)}
.esd-btn:hover{border-color:var(--ink-4)}
.esd-btn:active{transform:translateY(1px)}
.esd-btn-primary{background:var(--red);border-color:var(--red);color:#fff !important;box-shadow:0 1px 0 rgba(255,255,255,.2) inset,0 6px 14px -8px rgba(182,6,19,.6)}
.esd-btn-primary svg{--icon-fill:rgba(255,255,255,.22)}
.esd-btn-primary:hover{background:var(--red-600);border-color:var(--red-600)}
.esd-btn-ghost svg{color:var(--ink-3)}
.esd-btn-sm{height:28px;padding:0 10px;font-size:12px}
.esd-icon-btn{display:inline-grid;place-items:center;width:32px;height:32px;border:1px solid transparent;border-radius:var(--r-sm);background:transparent;color:var(--ink-3);transition:all .2s var(--ease)}
.esd-icon-btn:hover:not(:disabled){background:var(--line-2);color:var(--ink)}
.esd-icon-btn:disabled{opacity:.4;cursor:default}
.esd-root button:focus-visible,.esd-root input:focus-visible{outline:2px solid var(--red);outline-offset:2px}
.esd-search{display:flex;align-items:center;gap:8px;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--paper);color:var(--ink-3);transition:border-color .2s var(--ease),box-shadow .2s var(--ease);min-width:0}
.esd-search:focus-within{border-color:var(--red);box-shadow:0 0 0 3px var(--red-50)}
.esd-search input{flex:1;min-width:0;border:0;outline:none;background:transparent;font:400 13px var(--f-body);color:var(--ink)}
.esd-search input::placeholder{color:var(--ink-4)}
.esd-search-top{width:260px;background:var(--mist)}
.esd-search kbd{font:500 10.5px var(--f-body);color:var(--ink-4);border:1px solid var(--line);border-radius:5px;padding:1px 5px;background:var(--paper)}

/* cards & grids */
.esd-grid{display:grid;gap:16px}
.esd-g-21{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr)}
.esd-g-11{grid-template-columns:repeat(2,minmax(0,1fr))}
.esd-g-111{grid-template-columns:repeat(3,minmax(0,1fr))}
.esd-g-top{align-items:start}
.esd-stack{display:flex;flex-direction:column;gap:16px;min-width:0}
.esd-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:var(--sh-1);min-width:0;display:flex;flex-direction:column}
.esd-card-h{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;padding:16px 20px 0}
.esd-card-h h3{margin:0;font-size:14px;font-weight:600;letter-spacing:-.005em}
.esd-card-h p{margin:3px 0 0;font-size:12px;color:var(--ink-3)}
.esd-card-b{padding:16px 20px 20px;min-width:0;flex:1}
.esd-card-flush .esd-card-b{padding:16px 0 0}
.esd-card-flush .esd-toolbar{padding:0 20px 12px}
.esd-chart{position:relative;width:100%;min-width:0}
.esd-svg{overflow:visible}
.esd-grid line.esd-grid,.esd-svg .esd-grid{stroke:var(--line);stroke-width:1;shape-rendering:crispEdges}
.esd-axis{font-size:11px;fill:var(--ink-3);font-family:var(--f-body)}
.esd-line{fill:none;stroke:var(--red);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.esd-line2{fill:none;stroke:var(--data-2);stroke-width:1.5;stroke-dasharray:4 4;stroke-linecap:round}
.esd-dot{fill:var(--paper);stroke:var(--red);stroke-width:1.6}
.esd-dot-h{fill:var(--red);stroke:var(--paper);stroke-width:2}
.esd-band{fill:var(--red-50)}
.esd-band-l{font-size:10.5px;fill:var(--red);font-weight:500}
.esd-guide{stroke:var(--ink-4);stroke-width:1;stroke-dasharray:2 3}
.esd-hpv{opacity:0;transition:opacity .15s var(--ease)}
.esd-hp:hover .esd-hpv,.esd-hp.is-tip .esd-hpv{opacity:1}
.esd-bar path,.esd-bar rect{transition:opacity .2s var(--ease)}
.esd-svg:hover .esd-bar path,.esd-svg:hover .esd-bar rect[fill^="var"]{opacity:.45}
.esd-svg .esd-bar:hover path,.esd-svg .esd-bar:hover rect{opacity:1}
.esd-svg.has-tip .esd-bar path,.esd-svg.has-tip .esd-bar rect[fill^="var"]{opacity:.45}
.esd-svg.has-tip .esd-bar.is-tip path,.esd-svg.has-tip .esd-bar.is-tip rect{opacity:1}
.esd-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:11.5px;color:var(--ink-3)}
.esd-legend span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.esd-legend i{width:8px;height:8px;border-radius:2px}

/* KPIs */
.esd-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden;box-shadow:var(--sh-1)}
.esd-kpis-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.esd-kpi{background:var(--paper);padding:16px 20px;display:flex;flex-direction:column;gap:10px;min-width:0;transition:background .2s var(--ease)}
.esd-kpi:hover{background:var(--mist-2)}
.esd-kpi-top{display:flex;align-items:center;gap:8px;min-width:0;min-height:28px}
.esd-kpi-ic{flex:none;width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:var(--red-50);color:var(--red)}
.esd-kpi-l{font-size:12.5px;font-weight:500;line-height:1.3;color:var(--ink-2);min-width:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.esd-kpi-tag{margin-left:auto;font-size:10.5px;color:var(--ink-3);border:1px solid var(--line);border-radius:var(--r-pill);padding:2px 8px;white-space:nowrap}
.esd-kpi-row{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;min-width:0}
.esd-kpi strong.esd-num{font-family:var(--f-display);font-size:28px;font-weight:700;letter-spacing:-.025em;line-height:1}
.esd-kpi-s strong.esd-num{font-size:24px}
.esd-kpi-sub{font-size:12px;color:var(--ink-3)}
.esd-kpi-of{font-size:12.5px;color:var(--ink-3);margin-right:auto;padding-bottom:2px}
.esd-kpi-budget .esd-kpi-row{justify-content:flex-start;gap:8px}
.esd-spark{flex:none;width:96px;height:32px}
.esd-kpi-foot{display:flex;justify-content:space-between;font-size:11.5px;color:var(--ink-3);gap:8px}
.esd-delta{font-size:12px;font-weight:500;line-height:1.35;color:var(--ink-3)}
.esd-delta-up{color:var(--ok)}
.esd-delta-flat{color:var(--ink-3)}

/* capsule meter */
.esd-meter{height:8px;border-radius:var(--r-pill);background:var(--line-2);overflow:hidden;width:100%}
.esd-meter span{display:block;height:100%;background:var(--red);transition:width .6s var(--ease)}
.esd-meter.is-ink span{background:var(--data-2)}
.esd-meter.is-hot span{background:repeating-linear-gradient(-45deg,var(--red) 0 6px,var(--red-600) 6px 12px)}

/* horizontal bars */
.esd-hbars{display:flex;flex-direction:column;gap:4px}
.esd-hbar{display:grid;grid-template-columns:minmax(110px,170px) minmax(0,1fr) auto;align-items:center;gap:12px;padding:6px 8px;margin:0 -8px;border-radius:8px;transition:background .15s var(--ease)}
.esd-hbar:hover{background:var(--mist)}
.esd-hbar-l{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--ink-2);min-width:0}
.esd-hbar-l span{line-height:1.3;overflow-wrap:anywhere}
.esd-hbar-l svg{color:var(--ink-3);--icon-fill:rgba(20,20,20,.06)}
.esd-hbar-t{height:10px;background:var(--line-2);border-radius:var(--r-pill);overflow:hidden}
.esd-hbar-t span{display:block;height:100%;min-width:4px}
.esd-hbar-v{font-size:12.5px;font-weight:600;font-variant-numeric:tabular-nums;text-align:right;min-width:52px;white-space:nowrap}
.esd-hbar-v small{display:inline-block;min-width:42px;margin-left:8px;font-weight:400;font-size:11.5px;color:var(--ink-3);text-align:right}

/* funnel */
.esd-funnel{display:flex;flex-direction:column;gap:12px}
.esd-fstep{padding:6px 8px;margin:-6px -8px;border-radius:8px;transition:background .15s var(--ease)}
.esd-fstep:hover{background:var(--mist)}
.esd-fstep-h{display:flex;justify-content:space-between;font-size:12.5px;color:var(--ink-2);margin-bottom:6px}
.esd-fstep-h .esd-num{font-weight:600;color:var(--ink)}
.esd-ftrack{height:14px;background:var(--line-2);border-radius:4px 999px 999px 4px;overflow:hidden}
.esd-ftrack span{display:block;height:100%;background:var(--red)}
.esd-fstep-f{display:flex;justify-content:space-between;gap:8px;margin-top:4px;font-size:11px;color:var(--ink-3)}

/* heatmap */
.esd-heat-grid{display:grid;grid-template-columns:30px repeat(18,minmax(0,1fr));gap:3px;align-items:center}
.esd-heat-c{height:20px;border-radius:4px;transition:transform .15s var(--ease),box-shadow .15s var(--ease)}
.esd-heat-c.is-tip,.esd-heat-c:hover{transform:scale(1.15);box-shadow:0 0 0 2px var(--paper),0 0 0 3px var(--ink)}
.esd-heat-d{font-size:11px;color:var(--ink-3)}
.esd-heat-h{font-size:10.5px;color:var(--ink-3);text-align:left;white-space:nowrap;height:14px}
.esd-scale{display:flex;align-items:center;gap:3px;font-size:11px;color:var(--ink-3)}
.esd-scale span{margin:0 4px}
.esd-scale i{width:12px;height:12px;border-radius:3px;background:var(--red)}
.esd-scale i:nth-of-type(1){opacity:.08}.esd-scale i:nth-of-type(2){opacity:.28}.esd-scale i:nth-of-type(3){opacity:.5}.esd-scale i:nth-of-type(4){opacity:.75}
.esd-note{display:flex;gap:8px;align-items:flex-start;margin:16px 0 0;padding:10px 12px;font-size:12px;line-height:1.45;color:var(--ink-2);background:var(--mist);border-radius:var(--r-sm)}
.esd-note svg{color:var(--red);margin-top:1px}

/* tooltip */
.esd-tip{position:absolute;left:0;top:0;z-index:40;pointer-events:none;min-width:150px;max-width:min(260px,calc(100% - 16px));padding:10px 12px;background:var(--ink);color:#fff;border-radius:10px;font-size:12px;box-shadow:var(--sh-2);opacity:0;transition:opacity .12s var(--ease)}
.esd-tip.is-on{opacity:1}
.esd-tip strong{display:block;font-weight:600;margin-bottom:6px;font-size:12px}
.esd-tip div{display:flex;justify-content:space-between;gap:16px;line-height:1.7;color:rgba(255,255,255,.72)}
.esd-tip div span{display:flex;align-items:center;gap:6px}
.esd-tip div i{width:7px;height:7px;border-radius:2px;box-shadow:0 0 0 1px rgba(255,255,255,.25)}
.esd-tip b{color:#fff;font-weight:600;font-variant-numeric:tabular-nums}

/* toolbar, chips, tables */
.esd-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.esd-toolbar .esd-search{flex:1 1 220px;max-width:320px}
.esd-chips{display:flex;gap:6px;flex-wrap:wrap}
.esd-chip{height:30px;padding:0 12px;border:1px solid var(--line);border-radius:var(--r-pill);background:var(--paper);font-size:12px;color:var(--ink-2);white-space:nowrap;transition:all .2s var(--ease)}
.esd-chip b{font-weight:600;color:var(--ink-3);font-variant-numeric:tabular-nums;margin-left:2px}
.esd-chip:hover{border-color:var(--ink-4)}
.esd-chip.is-on{background:var(--ink);border-color:var(--ink);color:#fff}
.esd-chip.is-on b{color:rgba(255,255,255,.7)}
.esd-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.esd-table{width:100%;border-collapse:collapse;font-size:12.5px}
.esd-table th{text-align:left;font-weight:500;font-size:11.5px;color:var(--ink-3);padding:10px 20px;background:var(--mist-2);border-top:1px solid var(--line);border-bottom:1px solid var(--line);white-space:nowrap}
.esd-table td{padding:11px 20px;border-bottom:1px solid var(--line-2);white-space:nowrap;color:var(--ink-2)}
.esd-table tbody tr{transition:background .15s var(--ease)}
.esd-table tbody tr:hover{background:var(--mist-2)}
.esd-card:not(.esd-card-flush) .esd-table th,.esd-card:not(.esd-card-flush) .esd-table td{padding-left:12px;padding-right:12px}
.esd-code{font-family:var(--f-mono);font-size:12px;color:var(--ink);background:var(--mist);border:1px solid var(--line);border-radius:6px;padding:2px 7px;letter-spacing:.02em}
.esd-muted{color:var(--ink-4)}
.esd-right{text-align:right}
.esd-empty{text-align:center;padding:40px 20px !important;color:var(--ink-3);white-space:normal !important}
.esd-empty svg{margin:0 auto 8px;color:var(--ink-4)}
.esd-empty small{color:var(--ink-4)}
.esd-table-foot{display:flex;justify-content:space-between;align-items:center;padding:8px 12px 8px 20px;font-size:12px;color:var(--ink-3)}
.esd-pager{display:flex;gap:2px}
.esd-pill{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:var(--r-pill);font-size:11.5px;font-weight:500;background:var(--mist);color:var(--ink-2);border:1px solid var(--line);white-space:nowrap}
.esd-pill i{width:6px;height:6px;border-radius:50%;background:var(--ink-4)}
.esd-pill-ok i{background:var(--ok)}
.esd-pill-warn i{background:var(--warn)}
.esd-cell-ic{display:inline-flex;vertical-align:middle;margin-right:8px;color:var(--ink-3)}
.esd-tag-n{display:inline-block;padding:3px 10px;font-size:11.5px;font-weight:500;background:var(--line-2);color:var(--ink-2);font-variant-numeric:tabular-nums}
.esd-tag-red{background:var(--red-50);color:var(--red)}
.esd-tag{display:inline-block;padding:3px 10px;font-size:11px;font-weight:500;background:var(--red-50);color:var(--red)}

/* models list */
.esd-models{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.esd-model{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:4px 10px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:var(--r-sm);transition:border-color .2s var(--ease),box-shadow .2s var(--ease)}
.esd-model:hover{border-color:var(--ink-4);box-shadow:var(--sh-1)}
.esd-model-ic{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:var(--mist);color:var(--ink-2)}
.esd-model-t{min-width:0}
.esd-model-t strong{display:block;font-size:12.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.esd-model-t span{font-size:11.5px;color:var(--ink-3)}
.esd-model-v{text-align:right}
.esd-model-v .esd-num{display:block;font-weight:600;font-size:14px}
.esd-model-v small{font-size:11px;color:var(--ink-3)}
.esd-model .esd-meter{grid-column:1/-1;margin-top:8px;height:6px}

/* consumo */
.esd-budget-banner{display:grid;grid-template-columns:auto minmax(120px,1fr) auto;align-items:center;gap:16px;padding:14px 20px;border:1px solid var(--red-100);background:linear-gradient(90deg,var(--red-50),var(--paper));border-radius:var(--r-md)}
.esd-bb-t{display:flex;gap:10px;align-items:flex-start;min-width:0}
.esd-bb-t svg{color:var(--red);margin-top:1px}
.esd-bb-t strong{display:block;font-size:13px;font-weight:600}
.esd-bb-t span{display:block;font-size:12px;color:var(--ink-3);margin-top:2px}
.esd-bb-p{font-family:var(--f-display);font-weight:700;font-size:20px;color:var(--red)}
.esd-caps{display:flex;flex-direction:column;gap:16px}
.esd-cap-h{display:flex;justify-content:space-between;gap:12px;font-size:12.5px;color:var(--ink-2);margin-bottom:8px}
.esd-cap-h strong{font-size:14px}
.esd-cap small{display:block;font-size:11.5px;color:var(--ink-3);margin-top:6px}
.esd-histo-h{margin:20px 0 8px;font-size:12px;font-weight:500;color:var(--ink-2)}
.esd-alerts{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.esd-alert{display:flex;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line-2)}
.esd-alert:last-child{border-bottom:0}
.esd-alert-ic{flex:none;width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:var(--mist);color:var(--ink-3)}
.esd-alert-hot .esd-alert-ic{background:var(--red);color:#fff;--icon-fill:rgba(255,255,255,.25)}
.esd-alert-warn .esd-alert-ic{background:var(--red-50);color:var(--red)}
.esd-alert-t{flex:1;min-width:0}
.esd-alert-t strong{display:block;font-size:12.5px;font-weight:500;line-height:1.4}
.esd-alert-hot .esd-alert-t strong{font-weight:600}
.esd-alert-t span{display:block;font-size:11.5px;color:var(--ink-3);margin-top:2px}

/* usuarios */
.esd-insights{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.esd-insight{padding:16px 20px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--paper);box-shadow:var(--sh-1);transition:transform .25s var(--ease),box-shadow .25s var(--ease)}
.esd-insight:hover{transform:translateY(-2px);box-shadow:var(--sh-2)}
.esd-insight:first-child{background:var(--ink);border-color:var(--ink);color:#fff}
.esd-insight:first-child p{color:rgba(255,255,255,.72)}
.esd-insight:first-child .esd-kpi-ic{background:rgba(255,255,255,.1);color:#fff;--icon-fill:rgba(255,255,255,.2)}
.esd-insight:first-child .esd-insight-n{color:#fff}
.esd-insight-h{display:flex;justify-content:space-between;align-items:center}
.esd-insight-n{display:block;margin-top:12px;font-family:var(--f-display);font-size:28px;font-weight:700;letter-spacing:-.025em;color:var(--red);font-variant-numeric:tabular-nums}
.esd-insight p{margin:6px 0 0;font-size:12.5px;line-height:1.5;color:var(--ink-2)}
.esd-donut-wrap{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.esd-donut-c{position:relative;flex:none}
.esd-donut-mid{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.esd-donut-mid strong{font-family:var(--f-display);font-size:24px;font-weight:700;letter-spacing:-.02em}
.esd-donut-mid span{font-size:11.5px;color:var(--ink-3)}
.esd-arc{transition:stroke-width .2s var(--ease),opacity .2s var(--ease);cursor:default}
.esd-donut:hover .esd-arc{opacity:.5}
.esd-donut .esd-arc:hover{opacity:1;stroke-width:22}
.esd-dlegend{list-style:none;margin:0;padding:0;flex:1;min-width:180px;display:flex;flex-direction:column;gap:2px}
.esd-dlegend li{display:flex;align-items:center;gap:10px;padding:7px 0;border-bottom:1px solid var(--line-2);font-size:12.5px;color:var(--ink-2)}
.esd-dlegend li:last-child{border-bottom:0}
.esd-dlegend i{width:10px;height:10px;border-radius:3px}
.esd-dlegend span{flex:1}
.esd-cohort{border-collapse:separate;border-spacing:3px;width:100%;font-size:12px}
.esd-cohort th{font-weight:500;font-size:11px;color:var(--ink-3);text-align:center;padding:4px;white-space:nowrap}
.esd-cohort th:first-child,.esd-cohort td:first-child{text-align:left;white-space:nowrap;color:var(--ink-2);padding-right:8px}
.esd-cohort td:nth-child(2){text-align:right;color:var(--ink-3);padding-right:8px}
.esd-cohort td{padding:0}
.esd-coh{display:grid;place-items:center;height:30px;min-width:40px;border-radius:6px;font-size:11.5px;font-weight:500;font-variant-numeric:tabular-nums;transition:transform .15s var(--ease)}
.esd-coh.is-tip,.esd-coh:hover{transform:scale(1.06);box-shadow:0 0 0 2px var(--paper),0 0 0 3px var(--ink)}
.esd-coh-x{background:repeating-linear-gradient(-45deg,transparent 0 4px,var(--line-2) 4px 5px);border-radius:6px}

/* códigos */
.esd-batches{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.esd-batch{display:flex;flex-direction:column;gap:14px;padding:16px 20px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--paper);box-shadow:var(--sh-1);transition:box-shadow .25s var(--ease),transform .25s var(--ease);animation:esd-in .4s var(--ease)}
.esd-batch:hover{box-shadow:var(--sh-2);transform:translateY(-1px)}
.esd-batch header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.esd-batch header>div{display:flex;gap:10px;align-items:center;min-width:0}
.esd-batch header strong{display:block;font-size:14px;font-weight:600}
.esd-batch header span:not(.esd-pill):not(.esd-batch-ic){display:block;font-size:11.5px;color:var(--ink-3);margin-top:1px}
.esd-batch-ic{flex:none;width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:var(--red-50);color:var(--red)}
.esd-batch-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.esd-batch-stats span{display:block;font-size:11px;color:var(--ink-3)}
.esd-batch-stats strong{display:block;font-size:17px;font-weight:600;margin-top:2px;letter-spacing:-.01em}
.esd-batch footer{display:flex;justify-content:space-between;align-items:center;font-size:11.5px;color:var(--ink-3);margin-top:-4px}
.esd-batch footer div{display:flex}
.esd-mini{padding:16px 20px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--mist-2)}
.esd-mini strong{display:block;margin-top:10px;font-size:13px;font-weight:600}
.esd-mini p{margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--ink-3)}
@keyframes esd-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* configuración */
.esd-input{width:100%;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--paper);font:500 13px var(--f-body);color:var(--ink);font-variant-numeric:tabular-nums;outline:none;transition:border-color .2s var(--ease),box-shadow .2s var(--ease)}
.esd-input:hover{border-color:var(--ink-4)}
.esd-input:focus{border-color:var(--red);box-shadow:0 0 0 3px var(--red-50)}
.esd-input-n{width:84px;height:28px;text-align:right}
.esd-input-g{position:relative;display:flex}
.esd-input-g .esd-input{padding-right:64px}
.esd-input-g em{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-style:normal;font-size:11.5px;color:var(--ink-3);pointer-events:none}
.esd-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;margin-bottom:8px}
.esd-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.esd-field>span{font-size:12px;font-weight:500;color:var(--ink-2)}
.esd-field small{font-size:11px;color:var(--ink-3)}
.esd-field .esd-select{width:100%}
.esd-toggle-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-top:1px solid var(--line-2)}
.esd-toggle-row strong{display:block;font-size:12.5px;font-weight:500}
.esd-toggle-row span{display:block;font-size:11.5px;color:var(--ink-3);margin-top:2px}
.esd-toggle{flex:none;position:relative;width:36px;height:20px;border-radius:var(--r-pill);border:0;background:var(--data-3);transition:background .2s var(--ease)}
.esd-toggle i{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .25s var(--ease)}
.esd-toggle.is-on{background:var(--red)}
.esd-toggle.is-on i{transform:translateX(16px)}
.esd-model-tag{font-size:11.5px;color:var(--ink-2);padding:3px 8px;border-radius:6px;background:var(--mist);border:1px solid var(--line)}
.esd-table-cfg td{padding-top:7px;padding-bottom:7px}
.esd-cascade{list-style:none;margin:0;padding:0}
.esd-cascade li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-2);font-size:12.5px;color:var(--ink-2)}
.esd-cascade li:last-child{border-bottom:0}
.esd-cascade .esd-select{width:190px;flex:none}
.esd-team{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px 24px}
.esd-team li{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line-2)}
.esd-team li>div{flex:1;min-width:0}
.esd-team strong{display:block;font-size:12.5px;font-weight:600}
.esd-team li>div span{display:block;font-size:11.5px;color:var(--ink-3)}
.esd-role{font-size:11px;font-weight:500;padding:3px 9px;border-radius:var(--r-pill);background:var(--mist);border:1px solid var(--line);color:var(--ink-2);white-space:nowrap}
.esd-role.is-red{background:var(--red-50);border-color:var(--red-100);color:var(--red)}

/* modal + toast */
.esd-modal-host{position:absolute;inset:0;z-index:30;display:grid;place-items:center;padding:16px;pointer-events:none;opacity:0;transition:opacity .22s var(--ease)}
.esd-modal-host:empty{display:none}
.esd-modal-host.is-on{opacity:1;pointer-events:auto}
.esd-modal-bg{position:absolute;inset:0;background:rgba(20,20,20,.32);backdrop-filter:blur(2px)}
.esd-modal{position:relative;display:flex;flex-direction:column;width:min(520px,100%);max-height:100%;overflow:hidden;background:var(--paper);border-radius:var(--r-lg);box-shadow:var(--sh-3);transform:translateY(10px) scale(.98);transition:transform .3s var(--ease)}
.esd-modal-host.is-on .esd-modal{transform:none}
.esd-modal header{flex:none;display:flex;justify-content:space-between;gap:12px;padding:20px 20px 0}
.esd-modal h3{margin:0;font-family:var(--f-display);font-size:18px;font-weight:700;letter-spacing:-.02em}
.esd-modal header p{margin:4px 0 0;font-size:12.5px;color:var(--ink-3)}
.esd-modal-b{padding:20px;display:flex;flex-direction:column;gap:16px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-height:0;flex:1 1 auto}
.esd-modal footer{flex:none;display:flex;justify-content:flex-end;gap:8px;padding:16px 20px;border-top:1px solid var(--line);background:var(--mist-2)}
.esd-modal .esd-seg{align-self:flex-start}
.esd-preview{display:flex;flex-direction:column;gap:6px;padding:16px;border:1px dashed var(--red-200);border-radius:var(--r-sm);background:var(--red-50)}
.esd-preview span{font-size:11px;font-weight:500;color:var(--red);text-transform:uppercase;letter-spacing:.06em}
.esd-preview code{font-family:var(--f-mono);font-size:20px;font-weight:500;letter-spacing:.06em;color:var(--ink)}
.esd-preview small{font-size:11.5px;color:var(--ink-3)}
.esd-toast{position:absolute;left:50%;bottom:20px;top:auto;z-index:50;display:flex;align-items:center;gap:8px;max-width:calc(100% - 32px);padding:10px 14px;border-radius:var(--r-pill);background:var(--ink);color:#fff;font-size:12.5px;box-shadow:var(--sh-2);transform:translate(-50%,16px);opacity:0;pointer-events:none;transition:transform .3s var(--ease),opacity .3s var(--ease)}
.esd-toast svg{color:#fff;--icon-fill:rgba(255,255,255,.2)}
.esd-toast.is-on{transform:translate(-50%,0);opacity:1}


.esd-hbar-v b{display:inline-block;min-width:52px;font-weight:600}
.esd-model-t strong{white-space:normal;overflow:visible}

/* scroll containers: fixed fade edges (mask stays put while content scrolls), toggled by JS */
.esd-scrollx{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.esd-scrollx::-webkit-scrollbar{display:none}
.esd-root .is-fade-r{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent)}
.esd-root .is-fade-l{-webkit-mask-image:linear-gradient(90deg,transparent,#000 40px);mask-image:linear-gradient(90deg,transparent,#000 40px)}
.esd-root .is-fade-l.is-fade-r{-webkit-mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 40px),transparent)}
.esd-swipe{display:none;align-items:center;gap:6px;margin-top:10px;font-size:11.5px;color:var(--ink-3)}
.esd-swipe svg{color:var(--ink-4)}
.has-overflow+.esd-swipe,.has-overflow>.esd-swipe{display:flex}
.esd-heat-scroll{margin:0 -4px;padding:4px}
.esd-heat-scroll .esd-heat-grid{min-width:0}
.esd-search-btn{display:none}
.esd-kpi .esd-spark{max-width:100%}

/* ------- responsive (container-based) ------- */
@container esd (max-width:1180px){
  .esd-kpis-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .esd-insights{grid-template-columns:repeat(2,minmax(0,1fr))}
  .esd-models{grid-template-columns:repeat(2,minmax(0,1fr))}
  .esd-g-21{grid-template-columns:minmax(0,1fr)}
  .esd-search-top{width:200px}
}
@container esd (max-width:1000px){
  .esd-app{grid-template-columns:208px minmax(0,1fr)}
  .esd-side{padding:16px 10px 14px}
  .esd-nav-i{padding:0 8px;gap:9px;font-size:13px}
  .esd-nav-i.is-on::before{left:-10px}
  .esd-top{padding:0 20px}
  .esd-view{padding:20px 20px 8px}
  .esd-foot{padding:16px 20px 20px}
  .esd-search-top{width:180px}
}
@container esd (max-width:720px){
  .esd-g-11,.esd-g-111{grid-template-columns:minmax(0,1fr)}
}
@container esd (max-width:980px){
  .esd-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* tablet portrait + phones: top tab strip, panel grows in height (no nested scroll) */
@container esd (max-width:800px){
  .esd-chrome{grid-template-columns:52px 1fr 52px;padding:0 10px;height:36px}
  .esd-lights{gap:5px}.esd-lights i{width:9px;height:9px}
  .esd-app,.esd-window.is-full .esd-app{grid-template-columns:minmax(0,1fr);height:auto}
  .esd-side{flex-direction:column;gap:0;padding:0;border-right:0;border-bottom:1px solid var(--line);background:var(--paper);position:relative}
  .esd-brand{padding:14px 16px 6px}
  .esd-env,.esd-side-foot{display:none}
  .esd-nav{flex-direction:row;gap:2px;overflow-x:auto;overscroll-behavior-x:contain;padding:2px 8px 0;scrollbar-width:none;scroll-snap-type:x proximity;scroll-padding:0 24px}
  .esd-nav::-webkit-scrollbar{display:none}
  .esd-nav-i{flex:none;height:44px;border-radius:0;padding:0 10px;scroll-snap-align:start}
  .esd-nav-i:hover{background:transparent}
  .esd-nav-i.is-on{background:transparent;box-shadow:inset 0 -2px 0 var(--red)}
  .esd-nav-i.is-on::before{display:none}
  .esd-main{overflow:visible}
  .esd-top{position:static;padding:0 8px 0 16px;height:48px}
  .esd-search-top{display:none}
  .esd-search-btn{display:inline-grid}
  .esd-view{padding:20px 16px 8px}
  .esd-vh h1{font-size:22px}
  .esd-card-h{padding:14px 16px 0}
  .esd-card-b{padding:14px 16px 16px}
  .esd-card-flush .esd-card-b{padding:14px 0 0}
  .esd-card-flush .esd-toolbar{padding:0 16px 12px}
  .esd-toolbar .esd-search{max-width:none;flex-basis:100%}
  .esd-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:2px 16px;width:calc(100% + 32px)}
  .esd-chips::-webkit-scrollbar{display:none}
  .esd-chip{flex:none}
  .esd-table th,.esd-table td{padding-left:16px;padding-right:16px}
  .esd-table-foot{padding-left:16px}
  .esd-kpi{padding:14px 16px}
  .esd-budget-banner{grid-template-columns:minmax(0,1fr) auto;padding:14px 16px}
  .esd-budget-banner .esd-bb-t{grid-column:1/-1}
  .esd-foot{padding:16px}
  .esd-cascade .esd-select{width:170px}
  .esd-heat-scroll .esd-heat-grid{min-width:560px}
  /* touch sizing: ≥40px targets, 16px inputs (no iOS zoom) */
  .esd-btn{height:40px;padding:0 16px;font-size:13px}
  .esd-btn-sm{height:36px;padding:0 12px}
  .esd-icon-btn{width:40px;height:40px}
  .esd-bell i{top:10px;right:11px}
  .esd-seg button{height:36px;padding:0 14px;font-size:13px}
  .esd-chip{height:36px;padding:0 14px;font-size:12.5px}
  .esd-select{height:40px}
  .esd-select-sm{height:38px}
  .esd-search{height:42px}
  .esd-input{height:42px}
  .esd-input-n{height:38px;width:76px}
  .esd-root input,.esd-root select,.esd-root textarea{font-size:16px !important}
  .esd-toggle{width:44px;height:26px}
  .esd-toggle i{width:22px;height:22px}
  .esd-toggle.is-on i{transform:translateX(18px)}
  .esd-modal header{padding:18px 16px 0}
  .esd-modal-b{padding:16px}
  .esd-modal footer{padding:12px 16px}
  .esd-modal .esd-seg{display:flex;flex-wrap:wrap;width:100%}
  .esd-modal .esd-seg button{flex:1 1 auto}
}
@container esd (max-width:560px){
  .esd-url{max-width:none}
  .esd-crumbs>span:first-child,.esd-crumbs>svg:first-of-type{display:none}
  .esd-vh{gap:12px}
  .esd-vh h1{font-size:21px}
  .esd-vh-r{width:100%}
  .esd-vh-r .esd-seg{width:100%}
  .esd-vh-r .esd-seg button{flex:1}
  .esd-vh-r .esd-select{flex:1 1 100%}
  .esd-vh-r>.esd-btn{flex:1 1 auto}
  /* KPI cards: 2-up compact tiles, labels wrap instead of truncating */
  .esd-kpis,.esd-kpis-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .esd-kpi{padding:14px;gap:8px}
  .esd-kpi-top{align-items:flex-start}
  .esd-kpi-ic{width:26px;height:26px}
  .esd-kpi-l{font-size:12px}
  .esd-kpi-row{flex-direction:column;align-items:stretch;gap:8px}
  .esd-kpi strong.esd-num{font-size:23px}
  .esd-kpi-s strong.esd-num{font-size:21px}
  .esd-kpi .esd-spark{width:100%;height:28px}
  .esd-delta{font-size:12px}
  .esd-kpi-tag{display:none}
  .esd-kpi-budget .esd-kpi-row{gap:2px}
  .esd-kpi-of{padding:0}
  .esd-kpi-foot{flex-direction:column;gap:2px}
  .esd-kpi-foot{flex-wrap:wrap}
  .esd-insights,.esd-models{grid-template-columns:minmax(0,1fr)}
  /* horizontal bars: label + value on one line, bar underneath */
  .esd-hbar{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"l v" "t t";gap:6px 12px;padding:8px;margin:0 -8px}
  .esd-hbar-l{grid-area:l}.esd-hbar-v{grid-area:v;min-width:0}.esd-hbar-t{grid-area:t;height:8px}
  .esd-hbar-l span{white-space:normal}
  .esd-hbar-v b{min-width:0}
  .esd-hbar-v small{min-width:0}
  .esd-donut-wrap{justify-content:center}
  .esd-dlegend{min-width:100%}
  .esd-scale span{display:none}
  .esd-fstep-f{font-size:12px}
  .esd-alert{flex-wrap:wrap}
  .esd-alert-t{flex:1 1 calc(100% - 42px)}
  .esd-alert .esd-btn{margin-left:42px}
  .esd-heat-scroll .esd-heat-grid{min-width:520px}
  .esd-team{grid-template-columns:minmax(0,1fr)}
  .esd-team li{flex-wrap:wrap}
  .esd-team li{gap:4px 12px;padding:12px 0}
  .esd-team li>div{flex:1 1 calc(100% - 42px)}
  .esd-team li .esd-role{margin-left:42px}
  .esd-cascade li{flex-wrap:wrap;gap:6px 12px}
  .esd-cascade li>span:first-child{flex:1 1 120px}
  .esd-cascade .esd-select{width:100%;flex:1 1 100%}
  .esd-fields{grid-template-columns:minmax(0,1fr)}
  .esd-batch-stats strong{font-size:16px}
  .esd-modal footer .esd-btn{flex:1}
  .esd-modal .esd-seg button{flex:1 1 100%}
  .esd-preview code{font-size:18px}
}
@container esd (max-width:380px){
  .esd-kpi{padding:12px}
  .esd-kpi strong.esd-num{font-size:21px}
  .esd-chrome{grid-template-columns:40px 1fr 40px}
}
/* coarse pointers at wide sizes (iPad landscape): keep targets comfortable */
@media (pointer:coarse){
  .esd-root input,.esd-root select,.esd-root textarea{font-size:16px !important}
  .esd-root .esd-icon-btn{width:40px;height:40px}
  .esd-root .esd-btn{height:40px}
  .esd-root .esd-btn-sm{height:36px}
  .esd-root .esd-nav-i{height:42px}
  .esd-root .esd-seg button{height:34px}
  .esd-root .esd-chip{height:36px}
  .esd-root .esd-input-n{height:36px}
  .esd-root .esd-search kbd{display:none}
  .esd-root .esd-toggle{width:44px;height:26px}
  .esd-root .esd-toggle i{width:22px;height:22px}
  .esd-root .esd-toggle.is-on i{transform:translateX(18px)}
}
@media (hover:none){
  .esd-root .esd-search kbd{display:none}
  .esd-root .esd-insight:hover,.esd-root .esd-batch:hover{transform:none}
}
@media (prefers-reduced-motion:reduce){
  .esd-root *{transition:none !important;animation:none !important}
}
.esd-main>.esd-top,.esd-main>.esd-foot{flex:none}
.esd-main>.esd-view{flex:1 0 auto}
.esd-cohort th:first-child,.esd-cohort td:first-child{position:sticky;left:0;z-index:1;background:var(--paper)}
@container esd (max-width:1000px){
  .esd-crumbs>span:first-child,.esd-crumbs>svg:first-of-type{display:none}
  .esd-search-top{width:210px}
  .esd-me div span{white-space:normal}
}
/* phones: minimum 12px for all secondary text */
@container esd (max-width:560px){
  .esd-badge{font-size:12px;min-width:20px;height:20px}
  .esd-kpi-foot,.esd-kpi-sub,.esd-kpi-of,.esd-legend,.esd-pill,.esd-code,.esd-table th,.esd-hbar-v small,.esd-fstep-f,
  .esd-cohort th,.esd-cohort,.esd-coh,.esd-heat-d,.esd-heat-h,.esd-batch-stats span,.esd-batch header span:not(.esd-pill):not(.esd-batch-ic),.esd-batch footer,
  .esd-role,.esd-model-tag,.esd-field small,.esd-cap small,.esd-alert-t span,.esd-swipe,.esd-scale,.esd-tag,.esd-tag-n,.esd-model-t span,.esd-model-v small,
  .esd-team li>div span,.esd-toggle-row span,.esd-dlegend li,.esd-donut-mid span,.esd-table-foot,.esd-foot,.esd-url,.esd-avatar,.esd-env,.esd-sys span,.esd-me div span,.esd-kpi-tag,.esd-preview span,.esd-preview small,.esd-note,.esd-mini p,.esd-card-h p{font-size:12px}
  .esd-heat-h{height:16px}
  .esd-legend{gap:6px 14px}
  .esd-legend i{width:9px;height:9px}
}
/* card-level queries: horizontal bars stack (label + value, bar below) when the card itself is narrow */
.esd-card-b{container-type:inline-size;container-name:esdcard}
@container esdcard (max-width:440px){
  .esd-hbar{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"l v" "t t";gap:6px 12px;padding:8px;margin:0 -8px}
  .esd-hbar-l{grid-area:l}.esd-hbar-v{grid-area:v;min-width:0}.esd-hbar-t{grid-area:t;height:8px}
  .esd-hbar-v b{min-width:0}
  .esd-hbar-v small{min-width:0}
}
@container esd (max-width:980px){ .esd-g-top{grid-template-columns:minmax(0,1fr)} }
