/* Panel del cliente: Bloques, Saldo primero y Compacto. Las partes salen en el orden del diseño y las ocultas no están;
   cada diseño se apoya en qué partes hay, nunca en su posición. El ancho que manda es el del contenido (con barra
   lateral o sin ella), no el de la pantalla. */

html:is([data-dz-dash="bento"],[data-dz-dash="focus"],[data-dz-dash="compact"]) .client-main:has(>.ca-dash){container:dz-dash / inline-size}

/* Bloques: saldo, resumen y sesiones en bloques de distinto tamaño. El saldo va en tu color y, con el resumen y las
   sesiones, alto a un lado; con menos partes, cada una ocupa lo que queda de su fila */
html[data-dz-dash="bento"] .ca-dash{gap:1rem}
html[data-dz-dash="bento"] :is(.ca-welcome,.ca-balance-card,.ca-overview,.ca-sessions){border-radius:calc(var(--radius-xl) * 1.3)}
html[data-dz-dash="bento"] .ca-welcome{padding:1.5rem 1.75rem}
html[data-dz-dash="bento"] .ca-welcome-title{font-size:clamp(1.375rem,1.15rem + .9vw,1.75rem)}
html[data-dz-dash="bento"] .ca-welcome-text .btn{margin-top:1rem}
html[data-dz-dash="bento"] .ca-welcome-art{width:11.5rem}
html[data-dz-dash="bento"] .ca-notice{border-radius:calc(var(--radius-xl) * 1.3)}
html[data-dz-dash="bento"] .ca-balance-card{--bb-soft:color-mix(in oklab,var(--primary-foreground) 68%,var(--primary));--bb-line:color-mix(in oklab,var(--primary-foreground) 16%,transparent);container:dz-bal / inline-size;display:flex;flex-direction:column;background:var(--primary);box-shadow:0 20px 40px -30px color-mix(in oklab,var(--primary) 85%,transparent);color:var(--primary-foreground)}
html[data-dz-dash="bento"] .ca-balance-card .ca-label{color:var(--bb-soft)}
html[data-dz-dash="bento"] .ca-balance-top .ca-label{color:var(--primary-foreground)}
html[data-dz-dash="bento"] .ca-balance-card .badge-outline{border-color:var(--bb-line);background:transparent;color:var(--primary-foreground)}
html[data-dz-dash="bento"] .ca-balance-top{flex-direction:column;align-items:stretch;gap:1.125rem;padding:1.5rem 1.5rem 1.25rem}
html[data-dz-dash="bento"] .ca-balance-amount{margin-top:.625rem;font-size:clamp(2.25rem,1.8rem + 1.5vw,3rem);letter-spacing:-.045em;overflow-wrap:anywhere}
html[data-dz-dash="bento"] .ca-balance-credit{color:var(--bb-soft)}
html[data-dz-dash="bento"] .ca-balance-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(9.5rem,1fr));gap:.5rem}
html[data-dz-dash="bento"] .ca-balance-actions .btn{--btn-h:2.5rem;justify-content:center}
html[data-dz-dash="bento"] .ca-balance-actions .btn:not(.btn-outline){border-color:transparent;background:var(--primary-foreground);color:var(--primary)}
html[data-dz-dash="bento"] .ca-balance-actions .btn:not(.btn-outline):hover{background:color-mix(in oklab,var(--primary-foreground) 88%,var(--primary))}
html[data-dz-dash="bento"] .ca-balance-actions .btn-outline{border-color:var(--bb-line);background:transparent;box-shadow:none;color:var(--primary-foreground)}
html[data-dz-dash="bento"] .ca-balance-actions .btn-outline:hover{border-color:color-mix(in oklab,var(--primary-foreground) 30%,transparent);background:color-mix(in oklab,var(--primary-foreground) 10%,transparent);color:var(--primary-foreground)}
html[data-dz-dash="bento"] .ca-balance-actions .btn:focus-visible{outline:2px solid var(--primary-foreground);outline-offset:2px}
html[data-dz-dash="bento"] .ca-balance-cells{grid-template-columns:minmax(0,1fr);margin-top:auto;border-top-color:var(--bb-line)}
html[data-dz-dash="bento"] .ca-balance-cells>div{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem 1.5rem}
html[data-dz-dash="bento"] .ca-balance-cells>div+div{border-top:1px solid var(--bb-line);border-left:0}
html[data-dz-dash="bento"] .ca-balance-cells dd{margin:0;font-size:1.0625rem}
@container dz-bal (min-width:34rem){
  html[data-dz-dash="bento"] .ca-balance-top{flex-direction:row;flex-wrap:wrap;align-items:flex-end;justify-content:space-between}
  html[data-dz-dash="bento"] .ca-balance-actions{display:flex}
  html[data-dz-dash="bento"] .ca-balance-cells{grid-template-columns:repeat(3,minmax(0,1fr))}
  html[data-dz-dash="bento"] .ca-balance-cells>div{display:block;padding:1rem 1.5rem}
  html[data-dz-dash="bento"] .ca-balance-cells>div+div{border-top:0;border-left:1px solid var(--bb-line)}
  html[data-dz-dash="bento"] .ca-balance-cells dd{margin-top:.375rem;font-size:1.25rem}
}
html[data-dz-dash="bento"] :is(.ca-overview,.ca-sessions){padding:1.375rem 1.5rem}
html[data-dz-dash="bento"] .ca-overview-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,6rem),1fr));gap:.625rem}
html[data-dz-dash="bento"] .ca-ov{--muted-foreground:color-mix(in oklab,var(--foreground) 66%,var(--card));padding:.875rem 1rem 1rem;border-radius:var(--radius-xl);background:var(--surface-muted);box-shadow:inset 0 0 0 1px var(--border)}
html[data-dz-dash="bento"] .ca-ov.is-success{background:color-mix(in oklab,var(--success) 6%,var(--card))}
html[data-dz-dash="bento"] .ca-ov.is-progress{background:color-mix(in oklab,var(--info) 6%,var(--card))}
html[data-dz-dash="bento"] .ca-ov.is-failed{background:color-mix(in oklab,var(--destructive) 6%,var(--card))}
html[data-dz-dash="bento"] .ca-ov-value{margin:.5rem 0 .75rem}
html[data-dz-dash="bento"] .ca-ov-value b{font-size:2rem;letter-spacing:-.04em}
@container dz-dash (max-width:36rem){
  html[data-dz-dash="bento"] .ca-ov{padding:.75rem .75rem .875rem}
  html[data-dz-dash="bento"] .ca-ov .ca-label{gap:.375rem;font-size:.8125rem}
  html[data-dz-dash="bento"] .ca-ov-value b{font-size:1.625rem}
}
html[data-dz-dash="bento"] .ca-ov-bar .is-track{fill:color-mix(in oklab,var(--foreground) 8%,transparent)}
@container dz-dash (min-width:48rem){
  html[data-dz-dash="bento"] .ca-dash{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-flow:row dense}
  html[data-dz-dash="bento"] .ca-dash>*{grid-column:1/-1}
  html[data-dz-dash="bento"] .ca-dash>.ca-balance-card{grid-column:span 2}
  html[data-dz-dash="bento"] .ca-dash>:is(.ca-overview,.ca-sessions){grid-column:span 4}
  html[data-dz-dash="bento"] .ca-dash:has(>.ca-overview):has(>.ca-sessions)>.ca-balance-card{grid-row:span 2}
  html[data-dz-dash="bento"] .ca-dash:not(:has(>.ca-balance-card))>:is(.ca-overview,.ca-sessions){grid-column:span 3}
  html[data-dz-dash="bento"] .ca-dash:not(:has(>.ca-overview)):not(:has(>.ca-sessions))>.ca-balance-card,
  html[data-dz-dash="bento"] .ca-dash:not(:has(>.ca-balance-card)):not(:has(>.ca-sessions))>.ca-overview,
  html[data-dz-dash="bento"] .ca-dash:not(:has(>.ca-balance-card)):not(:has(>.ca-overview))>.ca-sessions{grid-column:1/-1}
}

/* Saldo primero y Compacto: lo pendiente, lo recargado y lo bloqueado siempre en una fila */
html:is([data-dz-dash="focus"],[data-dz-dash="compact"]) .ca-balance-cells{grid-template-columns:repeat(3,minmax(0,1fr))}
html:is([data-dz-dash="focus"],[data-dz-dash="compact"]) .ca-balance-cells>div+div{border-top:0;border-left:1px solid var(--border)}
@container dz-dash (max-width:36rem){
  html:is([data-dz-dash="focus"],[data-dz-dash="compact"]) .ca-balance-cells>div{padding:.75rem .875rem}
  html:is([data-dz-dash="focus"],[data-dz-dash="compact"]) .ca-balance-cells dt{font-size:.75rem;line-height:1.3}
  html:is([data-dz-dash="focus"],[data-dz-dash="compact"]) .ca-balance-cells dt svg{display:none}
  html:is([data-dz-dash="focus"],[data-dz-dash="compact"]) .ca-balance-cells dd{font-size:1rem;overflow-wrap:anywhere}
}

/* Saldo primero: el saldo en grande arriba con sus botones; encima, solo el saludo en una línea */
html[data-dz-dash="focus"] .ca-dash{gap:1rem}
html[data-dz-dash="focus"] .ca-welcome{order:-2;overflow:visible;padding:.25rem .125rem 0;border-radius:0;background:none;box-shadow:none}
html[data-dz-dash="focus"] .ca-welcome-art,html[data-dz-dash="focus"] .ca-welcome-text>p{display:none}
html[data-dz-dash="focus"] .ca-welcome-text{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem 1.25rem;width:100%}
html[data-dz-dash="focus"] .ca-welcome-title{flex:1 1 16rem;font-size:clamp(1.25rem,1.1rem + .6vw,1.5rem);letter-spacing:-.025em}
html[data-dz-dash="focus"] .ca-welcome-text .btn{--btn-h:2rem;margin-top:0;padding:0 .75rem;font-size:.8125rem}
html[data-dz-dash="focus"] .ca-balance-card{order:-1;border-radius:calc(var(--radius-xl) * 1.4);background:radial-gradient(70% 140% at 100% 0%,color-mix(in oklab,var(--hl) 12%,transparent),transparent 65%),var(--card);box-shadow:var(--shadow-ring),0 28px 56px -36px rgb(0 0 0 / .28)}
html[data-dz-dash="focus"] .ca-balance-top{align-items:flex-end;gap:1.5rem 2rem;padding:clamp(1.5rem,1rem + 2vw,2.75rem)}
html[data-dz-dash="focus"] .ca-balance-top .ca-label{font-size:.9375rem}
html[data-dz-dash="focus"] .ca-balance-amount{margin-top:.875rem;font-size:clamp(3rem,1.75rem + 5vw,5.5rem);font-weight:600;letter-spacing:-.055em;line-height:.95;overflow-wrap:anywhere}
html[data-dz-dash="focus"] .ca-balance-credit{margin-top:.75rem;font-size:.875rem}
html[data-dz-dash="focus"] .ca-balance-actions{gap:.625rem}
html[data-dz-dash="focus"] .ca-balance-actions .btn{--btn-h:3rem;padding:0 1.375rem;border-radius:var(--radius-lg);font-size:.9375rem}
html[data-dz-dash="focus"] .ca-balance-actions .btn:not(.btn-outline){box-shadow:0 10px 24px -14px var(--primary)}
html[data-dz-dash="focus"] .ca-balance-cells{border-top:1px solid var(--border);background:color-mix(in oklab,var(--surface-muted) 70%,transparent)}
html[data-dz-dash="focus"] .ca-balance-cells>div{padding:1rem clamp(1.5rem,1rem + 2vw,2.75rem)}
html[data-dz-dash="focus"] .ca-balance-cells dd{font-size:1.25rem}
@container dz-dash (max-width:36rem){
  html[data-dz-dash="focus"] .ca-balance-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr));width:100%}
  html[data-dz-dash="focus"] .ca-balance-actions .btn{padding:0 1rem}
  html[data-dz-dash="focus"] .ca-balance-cells>div{padding:.875rem 1rem}
  html[data-dz-dash="focus"] .ca-balance-cells dd{font-size:1.0625rem}
}
/* Debajo, el resumen y las sesiones lado a lado cuando hay sitio */
@container dz-dash (min-width:60rem){
  html[data-dz-dash="focus"] .ca-dash{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:row dense;align-items:start}
  html[data-dz-dash="focus"] .ca-dash>*{grid-column:1/-1}
  html[data-dz-dash="focus"] .ca-dash:has(>.ca-overview):has(>.ca-sessions)>:is(.ca-overview,.ca-sessions){grid-column:auto;align-self:stretch}
}

/* Compacto: todo más junto. El saludo en una línea, avisos y bloques más bajos y, cuando van seguidos, el saldo y el
   resumen lado a lado */
html[data-dz-dash="compact"] .ca-dash{gap:.625rem}
html[data-dz-dash="compact"] .ca-welcome{padding:.875rem 1.125rem}
html[data-dz-dash="compact"] .ca-welcome-art,html[data-dz-dash="compact"] .ca-welcome-text>p{display:none}
html[data-dz-dash="compact"] .ca-welcome-text{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem 1rem;width:100%}
html[data-dz-dash="compact"] .ca-welcome-title{flex:1 1 14rem;font-size:1.0625rem;letter-spacing:-.02em}
html[data-dz-dash="compact"] .ca-welcome-text .btn{--btn-h:2rem;margin-top:0;padding:0 .75rem;font-size:.8125rem}
html[data-dz-dash="compact"] .ca-announcements .alert{padding-block:.625rem}
html[data-dz-dash="compact"] .ca-announcements .alert+.alert{margin-top:.375rem}
html[data-dz-dash="compact"] :is(.ca-notices,.ca-notice-pair){gap:.5rem}
html[data-dz-dash="compact"] .ca-notice{gap:.5rem .75rem;padding:.625rem .875rem;font-size:.8125rem}
html[data-dz-dash="compact"] .ca-notice-icon{width:1.875rem;height:1.875rem}
html[data-dz-dash="compact"] .ca-notice-icon svg{width:.9375rem;height:.9375rem}
html[data-dz-dash="compact"] :is(.ca-notice-telegram,.ca-notice-google) .ca-notice-icon svg{width:1.875rem;height:1.875rem}
html[data-dz-dash="compact"] .ca-notice-text{font-size:.75rem;line-height:1.45}
html[data-dz-dash="compact"] .ca-notice .btn{--btn-h:1.875rem;font-size:.75rem}
html[data-dz-dash="compact"] .ca-balance-top{gap:.75rem 1rem;padding:.875rem 1.125rem}
html[data-dz-dash="compact"] .ca-label{gap:.375rem;font-size:.8125rem}
html[data-dz-dash="compact"] .ca-label svg{width:.875rem;height:.875rem}
html[data-dz-dash="compact"] .ca-balance-amount{margin-top:.25rem;font-size:1.75rem;letter-spacing:-.03em}
html[data-dz-dash="compact"] .ca-balance-credit{margin-top:.25rem;font-size:.75rem}
html[data-dz-dash="compact"] .ca-balance-actions .btn{--btn-h:2.125rem;padding:0 .75rem;font-size:.8125rem}
html[data-dz-dash="compact"] .ca-balance-cells>div{padding:.625rem 1.125rem}
html[data-dz-dash="compact"] .ca-balance-cells dd{margin-top:.125rem;font-size:1rem}
html[data-dz-dash="compact"] :is(.ca-overview,.ca-sessions){padding:.875rem 1.125rem}
html[data-dz-dash="compact"] .ca-sessions{padding-bottom:.25rem}
html[data-dz-dash="compact"] .ca-card-head{margin-bottom:.625rem}
html[data-dz-dash="compact"] .ca-sessions .ca-card-head{margin-bottom:0}
html[data-dz-dash="compact"] .ca-card-title{font-size:.9375rem}
html[data-dz-dash="compact"] .ca-overview-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem 1.25rem}
html[data-dz-dash="compact"] .ca-ov-value{margin:.25rem 0 .4375rem;font-size:.8125rem}
html[data-dz-dash="compact"] .ca-ov-value b{font-size:1.25rem;letter-spacing:-.02em}
html[data-dz-dash="compact"] .ca-ov-bar{height:.25rem}
html[data-dz-dash="compact"] .ca-session-list li{gap:.625rem;padding:.5rem 0}
html[data-dz-dash="compact"] .ca-session-ico{width:1.75rem;height:1.75rem}
html[data-dz-dash="compact"] .ca-session-ico svg{width:.875rem;height:.875rem}
html[data-dz-dash="compact"] .ca-session-text b{font-size:.8125rem}
@container dz-dash (max-width:36rem){
  html[data-dz-dash="compact"] .ca-balance-cells>div{padding:.625rem .875rem}
}
@container dz-dash (min-width:46rem){
  html[data-dz-dash="compact"] .ca-dash{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  html[data-dz-dash="compact"] .ca-dash>*{grid-column:1/-1}
  html[data-dz-dash="compact"] .ca-dash>:is(.ca-balance-card:has(+.ca-overview),.ca-balance-card+.ca-overview,.ca-overview:has(+.ca-balance-card),.ca-overview+.ca-balance-card){grid-column:auto}
}

/* Piezas del diseño de siempre */
html:is([data-dz-dash="bento"],[data-dz-dash="focus"],[data-dz-dash="compact"]) :is(.ca-tile-ico,.ca-cell-hint,.ca-gauge,.ca-ov-chart,.ca-welcome-new,.ca-welcome-lead,.ca-hero-stats,.ca-ov-recent){display:none}
