/* Bloque B 8095: Ventas CG completo. Scope isolated to CloudGestion view only. */
.bloque-b-cloudgestion-active .content > :not(.mobile-topbar):not(.top-identity):not(.bloque-b-cloudgestion){display:none!important}
.bloque-b-cloudgestion{display:grid;gap:16px;padding:clamp(12px,2vw,24px)}
.bloque-b-hero{border:1px solid rgba(59,130,246,.28);background:linear-gradient(135deg,rgba(14,165,233,.14),rgba(15,23,42,.86));border-radius:24px;padding:22px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center}.bloque-b-eyebrow{margin:0 0 8px;color:#7dd3fc;letter-spacing:.16em;text-transform:uppercase;font-size:11px;font-weight:900}.bloque-b-hero h1{margin:0;color:#fff;font-size:clamp(26px,3vw,40px);line-height:1.04}.bloque-b-hero p{margin:10px 0 0;color:#cbd5e1}.bloque-b-badge{border:1px solid rgba(34,197,94,.38);background:rgba(34,197,94,.12);color:#bbf7d0;border-radius:999px;padding:8px 12px;font-weight:900;font-size:12px;white-space:nowrap}.bloque-b-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;border:1px solid rgba(148,163,184,.16);background:rgba(15,23,42,.7);border-radius:18px;padding:12px}.bloque-b-toolbar input,.bloque-b-toolbar select,.bloque-b-operativa select{background:rgba(2,6,23,.75);border:1px solid rgba(148,163,184,.22);color:#fff;border-radius:12px;padding:10px 12px}.bloque-b-toolbar button{border:1px solid rgba(125,211,252,.25);background:rgba(14,165,233,.10);color:#bae6fd;border-radius:12px;padding:10px 12px;font-weight:800;cursor:pointer}.bloque-b-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.bloque-b-card,.bloque-b-panel{border:1px solid rgba(148,163,184,.16);background:rgba(15,23,42,.74);border-radius:18px;padding:15px}.bloque-b-card span{display:block;color:#94a3b8;font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:900}.bloque-b-card strong{display:block;color:#fff;font-size:clamp(22px,2.5vw,34px);margin-top:7px}.bloque-b-card p,.bloque-b-muted{color:#94a3b8;margin:.35rem 0 0}.bloque-b-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.bloque-b-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.bloque-b-panel h2{margin:0 0 12px;color:#fff}.bloque-b-list{display:grid;gap:8px}.bloque-b-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start;border:1px solid rgba(148,163,184,.12);background:rgba(2,6,23,.38);border-radius:14px;padding:10px}.bloque-b-row b{color:#fff}.bloque-b-row span{color:#94a3b8}.bloque-b-row small{display:block;color:#cbd5e1;margin-top:3px}.bloque-b-months{display:grid;gap:6px}.bloque-b-month{display:grid;grid-template-columns:54px repeat(3,minmax(0,1fr));gap:8px;align-items:center;font-size:12px}.bloque-b-bar{height:8px;border-radius:999px;background:rgba(148,163,184,.16);overflow:hidden}.bloque-b-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#0ea5e9,#f97316)}
.bloque-b-operativa{overflow:hidden}.bloque-b-operativa-head,.bloque-b-detail-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.bloque-b-operativa-head label{display:grid;gap:6px;color:#94a3b8;font-weight:800;font-size:12px}.bloque-b-lines,.bloque-b-doc-lines{display:grid;gap:6px;margin-top:12px}.bloque-b-lines-header,.bloque-b-ticket-main{display:grid;grid-template-columns:110px 1.25fr 2fr 92px 110px 120px;gap:8px;align-items:center}.bloque-b-lines-header,.bloque-b-doc-header{color:#7dd3fc;font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:900;padding:0 10px}.bloque-b-ticket{border:1px solid rgba(148,163,184,.12);background:rgba(2,6,23,.34);border-radius:14px;overflow:hidden}.bloque-b-ticket.active{border-color:rgba(125,211,252,.42);background:rgba(14,165,233,.12)}.bloque-b-ticket-main{width:100%;text-align:left;border:0;background:transparent;color:#cbd5e1;padding:10px;cursor:pointer}.bloque-b-ticket-main:hover{background:rgba(14,165,233,.08)}.bloque-b-ticket-main b{display:block;color:#fff}.bloque-b-ticket-main small{display:block;color:#94a3b8;margin-top:2px}.bloque-b-ticket-main .wide{min-width:0}.bloque-b-ticket-main .wide b,.bloque-b-ticket-main .wide small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bloque-b-ticket-lines{display:grid;gap:0;border-top:1px solid rgba(125,211,252,.18);background:rgba(2,6,23,.25);padding:4px 10px 8px 128px}.bloque-b-ticket-lines div{display:grid;grid-template-columns:minmax(220px,1fr) 90px 110px 120px;gap:8px;align-items:center;padding:7px 0;border-top:1px solid rgba(148,163,184,.10);color:#cbd5e1}.bloque-b-ticket-lines div:first-child{border-top:0}.bloque-b-ticket-lines span:first-child{color:#fff}.bloque-b-ticket-lines small{display:block;color:#94a3b8;margin-top:2px}.bloque-b-ticket-lines b{color:#fff}.bloque-b-detail{border-color:rgba(34,197,94,.22);background:linear-gradient(135deg,rgba(34,197,94,.08),rgba(15,23,42,.78))}.bloque-b-detail-head p{margin:4px 0 0;color:#94a3b8}.bloque-b-detail-head strong{color:#bbf7d0;font-size:26px}.bloque-b-doc-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}.bloque-b-doc-kpis span{border:1px solid rgba(148,163,184,.14);background:rgba(2,6,23,.35);border-radius:12px;padding:9px;color:#94a3b8}.bloque-b-doc-kpis b{display:block;color:#fff;margin-top:3px}.bloque-b-doc-header,.bloque-b-doc-line{display:grid;grid-template-columns:minmax(220px,2fr) 90px 90px 90px 70px 100px;gap:8px;align-items:center}.bloque-b-doc-line{border-top:1px solid rgba(148,163,184,.12);padding:9px 10px;color:#cbd5e1}.bloque-b-doc-line span:first-child{color:#fff}.bloque-b-doc-line b{color:#fff}
@media(max-width:1100px){.bloque-b-lines-header{display:none}.bloque-b-ticket-main{grid-template-columns:1fr 1fr}.bloque-b-ticket-main .wide{grid-column:1/-1}.bloque-b-ticket-lines{padding-left:10px}.bloque-b-ticket-lines div{grid-template-columns:1fr 80px 100px 110px}.bloque-b-doc-header{display:none}.bloque-b-doc-line{grid-template-columns:1fr 1fr}.bloque-b-doc-line span:first-child{grid-column:1/-1}}@media(max-width:1000px){.bloque-b-hero,.bloque-b-grid-2{grid-template-columns:1fr}.bloque-b-kpis,.bloque-b-grid-3,.bloque-b-doc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:580px){.bloque-b-cloudgestion{padding:12px}.bloque-b-kpis,.bloque-b-grid-3,.bloque-b-doc-kpis{grid-template-columns:1fr}.bloque-b-month{grid-template-columns:44px 1fr}.bloque-b-month span:nth-child(n+3){display:none}.bloque-b-row{grid-template-columns:1fr}.bloque-b-hero{padding:18px}.bloque-b-ticket-main{grid-template-columns:1fr}.bloque-b-ticket-lines div{grid-template-columns:1fr}.bloque-b-operativa-head,.bloque-b-detail-head{display:grid}.bloque-b-detail-head strong{font-size:22px}}
/* Coexistence fix: Bloque B wins over Bloque A overlay when /cloudgestion is active. */
.app-shell.bloque-b-cloudgestion-active .content > .bloque-b-cloudgestion{display:grid!important}
.app-shell.bloque-b-cloudgestion-active .content > .bloque-a-today{display:none!important}

/* Fer 2026-06-01: Bloque B usa la misma paleta clara que el resto del panel (whites/slate + acento naranja) */
body.light-theme .bloque-b-hero,
body.light-theme .bloque-b-toolbar,
body.light-theme .bloque-b-card,
body.light-theme .bloque-b-panel,
body.light-theme .bloque-b-row,
body.light-theme .bloque-b-ticket,
body.light-theme .bloque-b-detail,
body.light-theme .bloque-b-doc-kpis span,
body.light-theme .bloque-b-ticket-lines {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.86)) !important;
  border-color: rgba(148,163,184,.30) !important;
  color: #334155 !important;
  box-shadow: 0 14px 34px rgba(15,23,42,.08) !important;
}

body.light-theme .bloque-b-hero {
  background:
    radial-gradient(circle at 0% 0%, rgba(245,119,30,.12), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(241,245,249,.9)) !important;
}

body.light-theme .bloque-b-hero h1,
body.light-theme .bloque-b-panel h2,
body.light-theme .bloque-b-card strong,
body.light-theme .bloque-b-row b,
body.light-theme .bloque-b-ticket-main b,
body.light-theme .bloque-b-ticket-lines b,
body.light-theme .bloque-b-ticket-lines span:first-child,
body.light-theme .bloque-b-doc-kpis b,
body.light-theme .bloque-b-doc-line b,
body.light-theme .bloque-b-doc-line span:first-child,
body.light-theme .bloque-b-detail-head strong {
  color: #0f172a !important;
}

body.light-theme .bloque-b-eyebrow,
body.light-theme .bloque-b-card span,
body.light-theme .bloque-b-lines-header,
body.light-theme .bloque-b-doc-header,
body.light-theme .bloque-b-operativa-head label {
  color: #64748b !important;
}

body.light-theme .bloque-b-hero p,
body.light-theme .bloque-b-card p,
body.light-theme .bloque-b-muted,
body.light-theme .bloque-b-row span,
body.light-theme .bloque-b-row small,
body.light-theme .bloque-b-ticket-main,
body.light-theme .bloque-b-ticket-main small,
body.light-theme .bloque-b-ticket-lines div,
body.light-theme .bloque-b-ticket-lines small,
body.light-theme .bloque-b-detail-head p,
body.light-theme .bloque-b-doc-kpis span,
body.light-theme .bloque-b-doc-line {
  color: #475569 !important;
}

body.light-theme .bloque-b-toolbar input,
body.light-theme .bloque-b-toolbar select,
body.light-theme .bloque-b-operativa select {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(148,163,184,.34) !important;
}

body.light-theme .bloque-b-toolbar button,
body.light-theme .bloque-b-badge {
  color: #0f172a !important;
  background: linear-gradient(135deg, rgba(245,119,30,.16), rgba(245,119,30,.07)) !important;
  border-color: rgba(245,119,30,.48) !important;
}

body.light-theme .bloque-b-ticket.active,
body.light-theme .bloque-b-ticket-main:hover {
  background: linear-gradient(135deg, rgba(245,119,30,.16), rgba(245,119,30,.08)) !important;
  border-color: rgba(245,119,30,.50) !important;
}

/* Bloque B · números de dueño: mes acumulado / YoY */
.bloque-b-mtd { display: grid; gap: 14px; }
.bloque-b-mtd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bloque-b-mtd-head h2 { margin: 0 0 4px; }
.bloque-b-mtd-head > strong { font-size: clamp(26px, 4vw, 44px); color: #fff; white-space: nowrap; }
.bloque-b-mtd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bloque-b-mtd-kpis span,
.bloque-b-mtd-kpis .bloque-b-inline-value {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 14px;
  padding: 11px;
  background: rgba(2,6,23,.32);
  color: #94a3b8;
}
.bloque-b-mtd-kpis b,
.bloque-b-mtd-kpis .bloque-b-inline-value { color: #fff; font-size: clamp(20px, 3vw, 31px); }
.bloque-b-mtd-kpis small { color: #cbd5e1; font-weight: 750; }
.bloque-b-yoy-table { display: grid; gap: 4px; overflow-x: auto; }
.bloque-b-yoy-table > div { display: grid; grid-template-columns: 90px repeat(5, minmax(110px, 1fr)); gap: 8px; align-items: center; min-width: 760px; padding: 9px 10px; border-radius: 12px; }
.bloque-b-yoy-table > div:first-child { color: #7dd3fc; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 900; }
.bloque-b-yoy-table > div:not(:first-child) { border: 1px solid rgba(148,163,184,.12); background: rgba(2,6,23,.28); color: #cbd5e1; }
.bloque-b-yoy-table strong { color: #fff; }
body.light-theme .bloque-b-mtd-head > strong,
body.light-theme .bloque-b-mtd-kpis b,
body.light-theme .bloque-b-mtd-kpis .bloque-b-inline-value,
body.light-theme .bloque-b-yoy-table strong { color: #0f172a !important; }
body.light-theme .bloque-b-mtd-kpis span,
body.light-theme .bloque-b-mtd-kpis .bloque-b-inline-value,
body.light-theme .bloque-b-yoy-table > div:not(:first-child) { background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.86)) !important; border-color: rgba(148,163,184,.28) !important; color: #475569 !important; }
body.light-theme .bloque-b-mtd-kpis small,
body.light-theme .bloque-b-yoy-table > div { color: #475569 !important; }
body.light-theme .bloque-b-yoy-table > div:first-child { color: #64748b !important; }
@media(max-width:900px){.bloque-b-mtd-head{display:grid}.bloque-b-mtd-kpis{grid-template-columns:1fr 1fr}.bloque-b-mtd-head > strong{white-space:normal}}
@media(max-width:580px){.bloque-b-mtd-kpis{grid-template-columns:1fr}.bloque-b-yoy-table > div{min-width:680px}}

/* Opción A 2026-05-19 · polish final: más contraste, menos gris sobre beige, móvil más compacto */
body.light-theme.bloque-b-cloudgestion-active,
body.light-theme .app-shell.bloque-b-cloudgestion-active {
  --bloque-b-ink: #0f172a;
  --bloque-b-copy: #334155;
  --bloque-b-muted-strong: #475569;
  --bloque-b-line: rgba(148, 163, 184, .30);
}

body.light-theme .app-shell.bloque-b-cloudgestion-active .sidebar,
body.light-theme .app-shell.bloque-b-cloudgestion-active .mobile-topbar,
body.light-theme .app-shell.bloque-b-cloudgestion-active .top-identity {
  background: linear-gradient(180deg, rgba(255,255,255,.92), #f1f5f9) !important;
  border-color: var(--bloque-b-line) !important;
  color: var(--bloque-b-copy) !important;
}

body.light-theme .app-shell.bloque-b-cloudgestion-active .nav-group button,
body.light-theme .app-shell.bloque-b-cloudgestion-active .nav-group button span,
body.light-theme .app-shell.bloque-b-cloudgestion-active .nav-group button svg {
  color: #334155 !important;
  opacity: 1 !important;
}

body.light-theme .app-shell.bloque-b-cloudgestion-active .nav-group button.active,
body.light-theme .app-shell.bloque-b-cloudgestion-active .nav-group button:hover {
  background: linear-gradient(135deg, rgba(245,119,30,.20), rgba(245,119,30,.10)) !important;
  color: var(--bloque-b-ink) !important;
  box-shadow: inset 3px 0 0 #C45D14, 0 8px 20px rgba(15, 23, 42, .10) !important;
}

body.light-theme .bloque-b-cloudgestion {
  gap: 14px;
}

body.light-theme .bloque-b-hero,
body.light-theme .bloque-b-toolbar,
body.light-theme .bloque-b-card,
body.light-theme .bloque-b-panel,
body.light-theme .bloque-b-row,
body.light-theme .bloque-b-ticket,
body.light-theme .bloque-b-detail,
body.light-theme .bloque-b-doc-kpis span,
body.light-theme .bloque-b-ticket-lines,
body.light-theme .bloque-b-mtd-kpis span,
body.light-theme .bloque-b-yoy-table > div:not(:first-child) {
  border-color: var(--bloque-b-line) !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08) !important;
}

body.light-theme .bloque-b-card,
body.light-theme .bloque-b-panel,
body.light-theme .bloque-b-row,
body.light-theme .bloque-b-ticket,
body.light-theme .bloque-b-doc-kpis span,
body.light-theme .bloque-b-mtd-kpis span,
body.light-theme .bloque-b-yoy-table > div:not(:first-child) {
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
}

body.light-theme .bloque-b-hero h1 {
  color: var(--bloque-b-ink) !important;
  letter-spacing: -.045em;
  max-width: 19ch;
}

body.light-theme .bloque-b-hero p,
body.light-theme .bloque-b-card p,
body.light-theme .bloque-b-muted,
body.light-theme .bloque-b-row span,
body.light-theme .bloque-b-row small,
body.light-theme .bloque-b-ticket-main,
body.light-theme .bloque-b-ticket-main small,
body.light-theme .bloque-b-ticket-lines div,
body.light-theme .bloque-b-ticket-lines small,
body.light-theme .bloque-b-detail-head p,
body.light-theme .bloque-b-doc-kpis span,
body.light-theme .bloque-b-doc-line,
body.light-theme .bloque-b-mtd-kpis small,
body.light-theme .bloque-b-yoy-table > div {
  color: var(--bloque-b-muted-strong) !important;
}

body.light-theme .bloque-b-eyebrow,
body.light-theme .bloque-b-card span,
body.light-theme .bloque-b-lines-header,
body.light-theme .bloque-b-doc-header,
body.light-theme .bloque-b-yoy-table > div:first-child {
  color: #64748b !important;
}

body.light-theme .bloque-b-card strong,
body.light-theme .bloque-b-panel h2,
body.light-theme .bloque-b-row b,
body.light-theme .bloque-b-mtd-head > strong,
body.light-theme .bloque-b-mtd-kpis b,
body.light-theme .bloque-b-yoy-table strong {
  color: var(--bloque-b-ink) !important;
}

body.light-theme .bloque-b-toolbar {
  align-items: center;
}

body.light-theme .bloque-b-toolbar label {
  color: #64748b !important;
  font-weight: 850;
}

body.light-theme .bloque-b-toolbar button,
body.light-theme .bloque-b-badge {
  background: linear-gradient(135deg, rgba(245,119,30,.16), rgba(245,119,30,.07)) !important;
  border-color: rgba(245,119,30,.46) !important;
  color: var(--bloque-b-ink) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08) !important;
}

body.light-theme .bloque-b-toolbar button:hover {
  background: linear-gradient(135deg, rgba(245,119,30,.24), rgba(245,119,30,.12)) !important;
}

body.light-theme .bloque-b-month span,
body.light-theme .bloque-b-month b {
  color: var(--bloque-b-copy) !important;
}

body.light-theme .bloque-b-bar {
  background: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, .24);
}

body.light-theme .bloque-b-yoy-table {
  scrollbar-color: #C45D14 #e2e8f0;
}

@media(max-width:580px){
  body.light-theme .bloque-b-cloudgestion{padding:10px;gap:10px}
  body.light-theme .bloque-b-hero{padding:14px;border-radius:18px;gap:10px}
  body.light-theme .bloque-b-hero h1{font-size:clamp(21px,7vw,28px);max-width:13ch;line-height:1.03}
  body.light-theme .bloque-b-hero p{font-size:13px;line-height:1.35;margin-top:8px}
  body.light-theme .bloque-b-badge{white-space:normal;width:fit-content;max-width:100%;font-size:11px;padding:7px 9px}
  body.light-theme .bloque-b-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:9px;border-radius:15px}
  body.light-theme .bloque-b-toolbar label,
  body.light-theme .bloque-b-toolbar .bloque-b-muted{grid-column:1/-1}
  body.light-theme .bloque-b-toolbar input{width:100%;min-height:38px}
  body.light-theme .bloque-b-toolbar button{padding:8px 9px;font-size:12px;min-height:36px}
  body.light-theme .bloque-b-kpis,.bloque-b-grid-3{gap:8px}
  body.light-theme .bloque-b-card,.bloque-b-panel{padding:11px;border-radius:15px}
  body.light-theme .bloque-b-card strong{font-size:clamp(20px,7vw,27px)}
  body.light-theme .bloque-b-mtd-head{gap:8px}
  body.light-theme .bloque-b-mtd-head > strong{font-size:clamp(24px,8vw,34px)}
  body.light-theme .bloque-b-yoy-table > div{min-width:620px}
}

/* Fer QA 2026-05-19 · calendario y cierre de tickets */
.bloque-b-calendar{display:grid;gap:12px}
.bloque-b-calendar-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.bloque-b-calendar-head h2{margin:0}
.bloque-b-calendar-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px}
.bloque-b-calendar-day{text-align:left;border:1px solid rgba(148,163,184,.14);background:rgba(2,6,23,.30);color:#cbd5e1;border-radius:14px;padding:10px;cursor:pointer;display:grid;gap:3px}
.bloque-b-calendar-day strong{text-transform:capitalize;color:#fff}.bloque-b-calendar-day span{color:#94a3b8;font-size:12px}.bloque-b-calendar-day b{color:#bbf7d0}.bloque-b-calendar-day.active,.bloque-b-calendar-day:hover{border-color:rgba(249,115,22,.52);background:rgba(249,115,22,.12)}
body.light-theme .bloque-b-calendar-day{background:linear-gradient(180deg,#ffffff,#f1f5f9)!important;border-color:rgba(148,163,184,.30)!important;color:#475569!important;box-shadow:0 8px 18px rgba(15,23,42,.06)!important}
body.light-theme .bloque-b-calendar-day strong,body.light-theme .bloque-b-calendar-day b{color:#0f172a!important}body.light-theme .bloque-b-calendar-day span{color:#475569!important}body.light-theme .bloque-b-calendar-day.active,body.light-theme .bloque-b-calendar-day:hover{background:linear-gradient(135deg,rgba(245,119,30,.16),rgba(245,119,30,.08))!important;border-color:rgba(245,119,30,.48)!important}
@media(max-width:580px){.bloque-b-calendar-head{display:grid}.bloque-b-calendar-grid{grid-template-columns:1fr}.bloque-b-calendar-day{padding:9px}}
.bloque-b-money-mark{font-weight:950;color:#fbbf24!important}body.light-theme .bloque-b-money-mark{color:#C45D14!important}
.bloque-b-shifts{display:grid;gap:12px}.bloque-b-shift-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.bloque-b-shift-card{border:1px solid rgba(148,163,184,.14);border-radius:16px;padding:12px;background:rgba(2,6,23,.30)}.bloque-b-shift-card span{display:block;color:#7dd3fc;text-transform:uppercase;letter-spacing:.08em;font-size:11px;font-weight:900}.bloque-b-shift-card strong{display:block;color:#fff;font-size:clamp(22px,3vw,34px);margin-top:4px}.bloque-b-shift-card p{color:#cbd5e1;margin:.35rem 0}.bloque-b-shift-card i{display:block;height:9px;border-radius:999px;background:linear-gradient(90deg,#ea580c,#fb923c,#fed7aa);box-shadow:0 4px 14px rgba(234,88,12,.18)}
body.light-theme .bloque-b-shift-card{background:linear-gradient(180deg,#ffffff,#f1f5f9)!important;border-color:rgba(148,163,184,.30)!important;box-shadow:0 8px 18px rgba(15,23,42,.06)!important}body.light-theme .bloque-b-shift-card span{color:#64748b!important}body.light-theme .bloque-b-shift-card strong{color:#0f172a!important}body.light-theme .bloque-b-shift-card p{color:#475569!important}
@media(max-width:580px){.bloque-b-shift-grid{grid-template-columns:1fr}}

/* Opción A noche · tablas para vender y saber qué vender */
.bloque-b-sell-intel{display:grid;gap:14px}.bloque-b-intel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.bloque-b-intel-grid section{border:1px solid rgba(148,163,184,.14);border-radius:16px;background:rgba(2,6,23,.26);padding:12px;display:grid;gap:8px}.bloque-b-intel-grid h3{margin:0;color:#fff}.bloque-b-intel-row{display:grid;grid-template-columns:38px minmax(0,1fr);gap:8px;align-items:start;border-top:1px solid rgba(148,163,184,.10);padding-top:8px}.bloque-b-intel-row:first-of-type{border-top:0}.bloque-b-intel-row span{grid-row:span 2;display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:rgba(249,115,22,.16);color:#fed7aa;font-weight:950}.bloque-b-intel-row strong{color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bloque-b-intel-row small{color:#cbd5e1;line-height:1.35}
body.light-theme .bloque-b-intel-grid section{background:linear-gradient(180deg,#ffffff,#f1f5f9)!important;border-color:rgba(148,163,184,.30)!important;box-shadow:0 8px 18px rgba(15,23,42,.06)!important}body.light-theme .bloque-b-intel-grid h3,body.light-theme .bloque-b-intel-row strong{color:#0f172a!important}body.light-theme .bloque-b-intel-row small{color:#475569!important}body.light-theme .bloque-b-intel-row{border-color:rgba(148,163,184,.18)!important}body.light-theme .bloque-b-intel-row span{background:rgba(245,119,30,.14)!important;color:#C45D14!important;border:1px solid rgba(245,119,30,.30)!important}
@media(max-width:900px){.bloque-b-intel-grid{grid-template-columns:1fr}.bloque-b-intel-row strong{white-space:normal}}

/* Opción A noche · tablas comerciales densas */
.bloque-b-action-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.bloque-b-action-cards article{border:1px solid rgba(249,115,22,.24);border-radius:16px;background:linear-gradient(135deg,rgba(249,115,22,.12),rgba(2,6,23,.24));padding:12px}.bloque-b-action-cards span{display:block;color:#fdba74;text-transform:uppercase;letter-spacing:.08em;font-weight:900;font-size:11px}.bloque-b-action-cards strong{display:block;color:#fff;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bloque-b-action-cards p{color:#cbd5e1;margin:.35rem 0 0}.bloque-b-mini-table{display:grid;grid-template-columns:minmax(130px,1.5fr) .7fr .8fr .75fr;gap:8px;align-items:start;border-top:1px solid rgba(148,163,184,.10);padding:8px 0;font-size:12px}.bloque-b-mini-table.head{border-top:0;color:#7dd3fc;text-transform:uppercase;letter-spacing:.07em;font-weight:900;font-size:10px}.bloque-b-mini-table strong{color:#fff;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bloque-b-mini-table small{display:block;color:#94a3b8;font-weight:600;margin-top:2px}.bloque-b-mini-table span{color:#cbd5e1;text-align:right}.bloque-b-mini-table strong+span{text-align:left}
body.light-theme .bloque-b-action-cards article{background:linear-gradient(135deg,rgba(245,119,30,.14),rgba(245,119,30,.05))!important;border-color:rgba(245,119,30,.30)!important;box-shadow:0 8px 18px rgba(15,23,42,.07)!important}body.light-theme .bloque-b-action-cards span{color:#64748b!important}body.light-theme .bloque-b-action-cards strong{color:#0f172a!important}body.light-theme .bloque-b-action-cards p{color:#475569!important}body.light-theme .bloque-b-mini-table{border-color:rgba(148,163,184,.18)!important}body.light-theme .bloque-b-mini-table.head{color:#64748b!important}body.light-theme .bloque-b-mini-table strong{color:#0f172a!important}body.light-theme .bloque-b-mini-table small,body.light-theme .bloque-b-mini-table span{color:#475569!important}
@media(max-width:900px){.bloque-b-action-cards{grid-template-columns:1fr}.bloque-b-mini-table{grid-template-columns:1fr 70px 86px 74px}.bloque-b-mini-table strong{white-space:normal}}
@media(max-width:520px){.bloque-b-mini-table{grid-template-columns:1fr 1fr}.bloque-b-mini-table.head{display:none}.bloque-b-mini-table span{text-align:left}.bloque-b-mini-table strong{grid-column:1/-1}}

/* Opción A predeploy · fix overflow móvil */
.bloque-b-cloudgestion,
.bloque-b-cloudgestion * { box-sizing: border-box; }
.bloque-b-cloudgestion { max-width: 100%; overflow-x: hidden; }
.bloque-b-hero > *,
.bloque-b-panel > *,
.bloque-b-card > *,
.bloque-b-toolbar > *,
.bloque-b-calendar-head > *,
.bloque-b-detail-head > * { min-width: 0; }
.bloque-b-hero p,
.bloque-b-muted,
.bloque-b-card p,
.bloque-b-panel p { overflow-wrap: anywhere; }
@media(max-width:580px){
  body.light-theme .bloque-b-cloudgestion{width:100%;max-width:100vw;overflow-x:hidden;padding:8px}
  body.light-theme .bloque-b-hero{grid-template-columns:1fr;width:100%;max-width:100%;padding:12px}
  body.light-theme .bloque-b-hero h1{max-width:100%;font-size:23px;overflow-wrap:anywhere}
  body.light-theme .bloque-b-hero p{max-width:100%;overflow-wrap:anywhere}
  body.light-theme .bloque-b-toolbar{grid-template-columns:1fr!important;width:100%;max-width:100%;padding:8px}
  body.light-theme .bloque-b-toolbar label,
  body.light-theme .bloque-b-toolbar input,
  body.light-theme .bloque-b-toolbar button,
  body.light-theme .bloque-b-toolbar .bloque-b-muted{width:100%;max-width:100%;min-width:0}
  body.light-theme .bloque-b-toolbar button{display:block;text-align:center}
  body.light-theme .bloque-b-badge{max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .bloque-b-kpis,.bloque-b-grid-3,.bloque-b-grid-2,.bloque-b-shift-grid,.bloque-b-intel-grid,.bloque-b-action-cards,.bloque-b-calendar-grid{grid-template-columns:1fr!important;width:100%;max-width:100%;min-width:0}
  .bloque-b-card,.bloque-b-panel,.bloque-b-row,.bloque-b-ticket,.bloque-b-ticket-main,.bloque-b-ticket-lines,.bloque-b-doc-line,.bloque-b-doc-kpis span{width:100%;max-width:100%;min-width:0}
  .bloque-b-ticket-main,.bloque-b-ticket-lines div,.bloque-b-doc-line{grid-template-columns:1fr!important}
  .bloque-b-ticket-main .wide b,.bloque-b-ticket-main .wide small{white-space:normal}
  .bloque-b-mtd-kpis{grid-template-columns:1fr!important}
  .bloque-b-yoy-table{max-width:100%;overflow-x:auto}
  .bloque-b-yoy-table > div{min-width:560px}
}

/* ============================================================= */
/* Fer 2026-06-03 · Code: cabecera "héroe", badge ticket/factura, */
/* filtro segmentado y paginación de la lista de documentos.      */
/* ============================================================= */
.bloque-b-hero{grid-template-columns:minmax(0,1fr) minmax(300px,420px);align-items:center}
.bloque-b-hero .bb-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#F5771E;margin-right:3px;vertical-align:middle}
.bloque-b-hero .bb-ro{opacity:.7;font-weight:800}
.bb-status{display:inline-flex;align-items:center;gap:7px;margin-top:14px;border-radius:999px;padding:7px 13px;font-size:12.5px;font-weight:800}
.bb-status.partial{border:1px solid rgba(245,119,30,.42);background:rgba(245,119,30,.14);color:#fdba74}
.bb-status.done{border:1px solid rgba(34,197,94,.42);background:rgba(34,197,94,.12);color:#86efac}
.bb-status .bb-pulse{width:8px;height:8px;border-radius:50%;background:#F5771E;box-shadow:0 0 0 4px rgba(245,119,30,.18)}
.bb-headline{display:flex;align-items:flex-end;gap:16px;margin-top:20px;flex-wrap:wrap}
.bb-big{font-size:clamp(34px,4.4vw,50px);font-weight:900;letter-spacing:-.03em;line-height:1;color:#fff}
.bb-ctx{color:#cbd5e1;font-size:13.5px;max-width:320px;line-height:1.45;padding-bottom:4px}
.bb-ctx b{color:#fff}
.bb-trend{border:1px solid rgba(148,163,184,.18);border-radius:18px;background:rgba(2,6,23,.30);padding:14px 16px}
.bb-trend-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:11px}
.bb-trend-head span{font-size:11px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#94a3b8}
.bb-trend-head b{font-size:12px;color:#fdba74;font-weight:800}
.bb-bars{display:grid;grid-template-columns:repeat(14,1fr);gap:5px;align-items:end;height:100px}
.bb-col{display:flex;flex-direction:column;align-items:center;gap:5px;height:100%;justify-content:flex-end}
.bb-bar{width:100%;border-radius:5px 5px 2px 2px;background:linear-gradient(180deg,#94a3b8,#cbd5e1);min-height:3px}
.bb-bar.peak{background:linear-gradient(180deg,#F5771E,#fbbf86)}
.bb-bar.today{background:repeating-linear-gradient(135deg,#F5771E,#F5771E 4px,#fbbf86 4px,#fbbf86 8px)}
.bb-lab{font-size:9.5px;color:#94a3b8;font-weight:700}
.bb-lab.now{color:#fdba74}
.bb-kpi-lead .bb-progress{display:inline-block;margin-top:8px;font-size:11.5px;font-weight:800;color:#fdba74;background:rgba(245,119,30,.14);border-radius:999px;padding:3px 10px;font-style:normal}
.bb-kind{display:inline-block;border-radius:999px;padding:1px 8px;font-size:10.5px;font-weight:900;letter-spacing:.02em;vertical-align:middle}
.bb-kind.ticket{background:rgba(56,189,248,.16);color:#7dd3fc;border:1px solid rgba(56,189,248,.30)}
.bb-kind.factura{background:rgba(245,119,30,.16);color:#fdba74;border:1px solid rgba(245,119,30,.30)}
.bloque-b-doctype{display:inline-flex;gap:6px;border:1px solid rgba(148,163,184,.18);background:rgba(2,6,23,.28);border-radius:999px;padding:4px;margin-bottom:4px}
.bloque-b-doctype button{border:0;background:transparent;color:#cbd5e1;border-radius:999px;padding:7px 14px;font-weight:800;font-size:12.5px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.bloque-b-doctype button b{font-size:11px;opacity:.8;background:rgba(148,163,184,.18);border-radius:999px;padding:1px 7px}
.bloque-b-doctype button.active{background:linear-gradient(135deg,#F5771E,#fb923c);color:#fff}
.bloque-b-doctype button.active b{background:rgba(255,255,255,.22);opacity:1}
.bloque-b-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;flex-wrap:wrap}
.bloque-b-pager span{color:#94a3b8;font-size:13px}
.bloque-b-pager span b{color:#fff}
.bloque-b-pager button{border:1px solid rgba(245,119,30,.40);background:rgba(245,119,30,.10);color:#fdba74;border-radius:12px;padding:9px 16px;font-weight:800;cursor:pointer}
.bloque-b-pager button:hover:not([disabled]){background:rgba(245,119,30,.20)}
.bloque-b-pager button[disabled]{opacity:.4;cursor:not-allowed}

/* --- tema claro (prod) --- */
body.light-theme .bloque-b-hero h1{max-width:26ch}
body.light-theme .bb-big{color:#0f172a}
body.light-theme .bb-ctx{color:#475569}
body.light-theme .bb-ctx b{color:#0f172a}
body.light-theme .bb-status.partial{color:#C45D14}
body.light-theme .bb-status.done{color:#15803d}
body.light-theme .bb-trend{background:#ffffff!important;border-color:rgba(148,163,184,.30)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.6)}
body.light-theme .bb-trend-head span{color:#64748b}
body.light-theme .bb-trend-head b{color:#C45D14}
body.light-theme .bb-bar{background:linear-gradient(180deg,#cbd5e1,#e2e8f0)}
body.light-theme .bb-bar.peak{background:linear-gradient(180deg,#F5771E,#fbbf86)}
body.light-theme .bb-bar.today{background:repeating-linear-gradient(135deg,#F5771E,#F5771E 4px,#fbbf86 4px,#fbbf86 8px)}
body.light-theme .bb-lab{color:#94a3b8}
body.light-theme .bb-lab.now{color:#C45D14}
body.light-theme .bb-kpi-lead .bb-progress{color:#C45D14}
body.light-theme .bloque-b-doctype{background:#f1f5f9!important;border-color:rgba(148,163,184,.30)!important}
body.light-theme .bloque-b-doctype button{color:#475569}
body.light-theme .bloque-b-doctype button b{background:rgba(100,116,139,.18)}
body.light-theme .bloque-b-doctype button.active{color:#fff}
body.light-theme .bb-kind.ticket{background:rgba(2,132,199,.12);color:#0369a1;border-color:rgba(2,132,199,.28)}
body.light-theme .bb-kind.factura{background:rgba(245,119,30,.14);color:#C45D14;border-color:rgba(245,119,30,.30)}
body.light-theme .bloque-b-pager span{color:#64748b}
body.light-theme .bloque-b-pager span b{color:#0f172a}
body.light-theme .bloque-b-pager button{color:#C45D14;background:rgba(245,119,30,.10);border-color:rgba(245,119,30,.42)}

/* Ventas CG · productividad por comercial */
.bloque-b-productivity{display:grid;gap:14px}
.bloque-b-productivity-grid{display:grid;gap:8px}
.bloque-b-productivity-row{position:relative;display:grid;grid-template-columns:48px minmax(220px,1.5fr) repeat(3,minmax(110px,1fr));gap:10px;align-items:center;border:1px solid rgba(148,163,184,.14);border-radius:14px;background:rgba(2,6,23,.30);padding:11px;overflow:hidden}
.bloque-b-productivity-row.bb-profit-ok{border-color:rgba(34,197,94,.48);background:linear-gradient(90deg,rgba(34,197,94,.18),rgba(2,6,23,.30) 42%)}
.bloque-b-productivity-row.bb-profit-warn{border-color:rgba(245,158,11,.50);background:linear-gradient(90deg,rgba(245,158,11,.18),rgba(2,6,23,.30) 42%)}
.bloque-b-productivity-row.bb-profit-bad{border-color:rgba(239,68,68,.52);background:linear-gradient(90deg,rgba(239,68,68,.18),rgba(2,6,23,.30) 42%)}
.bloque-b-productivity-row.bb-profit-none{border-color:rgba(148,163,184,.26);background:linear-gradient(90deg,rgba(148,163,184,.14),rgba(2,6,23,.30) 42%)}
.bloque-b-productivity-row .rank{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:rgba(245,119,30,.16);color:#fdba74;font-weight:950}
.bloque-b-productivity-row.bb-profit-ok .rank{background:rgba(34,197,94,.18);color:#86efac}
.bloque-b-productivity-row.bb-profit-warn .rank{background:rgba(245,158,11,.18);color:#fcd34d}
.bloque-b-productivity-row.bb-profit-bad .rank{background:rgba(239,68,68,.18);color:#fca5a5}
.bloque-b-productivity-row.bb-profit-none .rank{background:rgba(148,163,184,.16);color:#cbd5e1}
.bloque-b-productivity-row strong,.bloque-b-productivity-row span{position:relative;z-index:1;color:#fff;min-width:0}
.bloque-b-productivity-row small{display:block;color:#94a3b8;font-weight:750;margin-top:2px}
.bloque-b-productivity-row i{position:absolute;left:0;bottom:0;height:4px;border-radius:0 999px 999px 0;background:linear-gradient(90deg,#F5771E,#fbbf86)}
.bloque-b-productivity-row.bb-profit-ok i{background:linear-gradient(90deg,#16a34a,#86efac)}
.bloque-b-productivity-row.bb-profit-warn i{background:linear-gradient(90deg,#d97706,#fcd34d)}
.bloque-b-productivity-row.bb-profit-bad i{background:linear-gradient(90deg,#dc2626,#fca5a5)}
.bloque-b-productivity-row.bb-profit-none i{background:linear-gradient(90deg,#64748b,#cbd5e1)}
.bloque-b-prod-compare{display:grid;gap:4px;overflow-x:auto}
.bloque-b-prod-head,.bloque-b-prod-day{display:grid;grid-template-columns:180px repeat(5,minmax(120px,1fr)) minmax(150px,1fr);gap:8px;align-items:center;min-width:980px;padding:9px 10px;border-radius:12px}
.bloque-b-prod-head{color:#7dd3fc;text-transform:uppercase;letter-spacing:.07em;font-size:10.5px;font-weight:900}
.bloque-b-prod-day{border:1px solid rgba(148,163,184,.12);background:rgba(2,6,23,.24);color:#cbd5e1}
.bloque-b-prod-day strong,.bloque-b-prod-day b{color:#fff;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bloque-b-prod-day small{display:block;color:#94a3b8;font-weight:750;margin-top:2px}
.bloque-b-prod-products{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px}
.bloque-b-prod-products article{border:1px solid rgba(148,163,184,.14);border-radius:14px;background:rgba(2,6,23,.24);padding:11px;display:grid;gap:7px}
.bloque-b-prod-products h3{margin:0;color:#fff;font-size:15px}
.bloque-b-prod-product{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:8px;align-items:start;border-top:1px solid rgba(148,163,184,.10);padding-top:7px}
.bloque-b-prod-product span{color:#fdba74;font-weight:950}
.bloque-b-prod-product strong{color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bloque-b-prod-product small{display:block;color:#94a3b8;font-weight:700;margin-top:2px}
.bloque-b-prod-product b{color:#fff}
body.light-theme .bloque-b-productivity-row,body.light-theme .bloque-b-prod-day,body.light-theme .bloque-b-prod-products article{background:linear-gradient(180deg,#ffffff,#f1f5f9)!important;border-color:rgba(148,163,184,.30)!important;box-shadow:0 8px 18px rgba(15,23,42,.06)!important}
body.light-theme .bloque-b-productivity-row.bb-profit-ok{border-color:rgba(34,197,94,.45)!important;background:linear-gradient(90deg,rgba(34,197,94,.16),#ffffff 48%,#f1f5f9)!important}
body.light-theme .bloque-b-productivity-row.bb-profit-warn{border-color:rgba(245,158,11,.48)!important;background:linear-gradient(90deg,rgba(245,158,11,.16),#ffffff 48%,#f1f5f9)!important}
body.light-theme .bloque-b-productivity-row.bb-profit-bad{border-color:rgba(239,68,68,.48)!important;background:linear-gradient(90deg,rgba(239,68,68,.16),#ffffff 48%,#f1f5f9)!important}
body.light-theme .bloque-b-productivity-row.bb-profit-none{border-color:rgba(148,163,184,.35)!important;background:linear-gradient(90deg,rgba(148,163,184,.14),#ffffff 48%,#f1f5f9)!important}
body.light-theme .bloque-b-productivity-row strong,body.light-theme .bloque-b-productivity-row span,body.light-theme .bloque-b-prod-day strong,body.light-theme .bloque-b-prod-day b,body.light-theme .bloque-b-prod-products h3,body.light-theme .bloque-b-prod-product strong,body.light-theme .bloque-b-prod-product b{color:#0f172a!important}
body.light-theme .bloque-b-productivity-row small,body.light-theme .bloque-b-prod-day,body.light-theme .bloque-b-prod-day small,body.light-theme .bloque-b-prod-product small{color:#475569!important}
body.light-theme .bloque-b-prod-head{color:#64748b!important}
body.light-theme .bloque-b-productivity-row .rank,body.light-theme .bloque-b-prod-product span{background:rgba(245,119,30,.14)!important;color:#C45D14!important}
@media(max-width:1000px){.bloque-b-hero{grid-template-columns:1fr}.bloque-b-productivity-row{grid-template-columns:42px minmax(0,1fr) 1fr 1fr}.bloque-b-productivity-row span:nth-of-type(4){grid-column:2/-1}}
@media(max-width:580px){.bb-headline{gap:10px}.bb-big{font-size:30px}.bb-ctx{max-width:100%}.bloque-b-doctype{display:flex}.bloque-b-doctype button{flex:1;justify-content:center;padding:8px 6px}.bloque-b-pager{justify-content:center}.bloque-b-pager span{order:-1;width:100%;text-align:center}.bloque-b-productivity-row{grid-template-columns:36px 1fr}.bloque-b-productivity-row > span:not(.rank){grid-column:2/-1}.bloque-b-prod-head,.bloque-b-prod-day{min-width:860px}.bloque-b-prod-product strong{white-space:normal}}
.bloque-b-comparison-pack{display:grid;gap:12px}
.bloque-b-comparison-pack section{border:1px solid rgba(148,163,184,.14);border-radius:14px;background:rgba(2,6,23,.22);padding:11px;overflow-x:auto}
.bloque-b-comparison-pack h3{margin:0 0 8px;color:#fff}
.bloque-b-comp-head,.bloque-b-comp-row{display:grid;grid-template-columns:190px repeat(6,minmax(130px,1fr));gap:8px;align-items:start;min-width:1060px;padding:8px 0}
.bloque-b-comp-head{color:#7dd3fc;text-transform:uppercase;letter-spacing:.07em;font-size:10.5px;font-weight:900}
.bloque-b-comp-row{border-top:1px solid rgba(148,163,184,.10);color:#cbd5e1}
.bloque-b-comp-row strong,.bloque-b-comp-row span{min-width:0;color:#fff}
.bloque-b-comp-row small{display:block;color:#94a3b8;font-weight:750;margin-top:2px}
body.light-theme .bloque-b-comparison-pack section{background:linear-gradient(180deg,#ffffff,#f1f5f9)!important;border-color:rgba(148,163,184,.30)!important;box-shadow:0 8px 18px rgba(15,23,42,.06)!important}
body.light-theme .bloque-b-comparison-pack h3,body.light-theme .bloque-b-comp-row strong,body.light-theme .bloque-b-comp-row span{color:#0f172a!important}
body.light-theme .bloque-b-comp-head{color:#64748b!important}
body.light-theme .bloque-b-comp-row small{color:#475569!important}
@media print{body{background:#fff!important}.sidebar,.mobile-topbar,.top-identity,.bloque-b-toolbar,.bloque-b-operativa,.bloque-b-detail,.bloque-b-shifts,.bloque-b-sell-intel{display:none!important}.content{padding:0!important;margin:0!important}.bloque-b-cloudgestion{display:block!important;padding:0!important;color:#111!important}.bloque-b-hero,.bloque-b-card,.bloque-b-panel,.bloque-b-productivity-row,.bloque-b-prod-day,.bloque-b-prod-products article,.bloque-b-comparison-pack section{break-inside:avoid;background:#fff!important;color:#111!important;border:1px solid #ddd!important;box-shadow:none!important}.bloque-b-prod-head,.bloque-b-prod-day,.bloque-b-comp-head,.bloque-b-comp-row{min-width:0!important;grid-template-columns:150px repeat(6,1fr)!important;font-size:10px}.bloque-b-productivity-row{grid-template-columns:32px 1.4fr repeat(3,1fr)!important}.bloque-b-cloudgestion *{color:#111!important}.bloque-b-muted,small{color:#555!important}.bb-trend,.bloque-b-calendar,.bloque-b-grid-2{display:none!important}}

/* Ventas CG · filtros finos, sueldos y exportación por apartado */
.bb-panel-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.bb-panel-actions button,.bb-section-title button{border:1px solid rgba(245,119,30,.42);background:rgba(245,119,30,.10);color:#fdba74;border-radius:11px;padding:8px 11px;font-weight:850;cursor:pointer}
.bb-productivity-tools{display:grid;grid-template-columns:minmax(220px,1.4fr) repeat(2,minmax(150px,.8fr)) auto;gap:10px;align-items:end}
.bb-productivity-tools label{display:grid;gap:5px;color:#94a3b8;font-size:12px;font-weight:850}
.bb-productivity-tools input,.bb-productivity-tools select,.bb-salary-grid input{width:100%;border:1px solid rgba(148,163,184,.22);background:rgba(2,6,23,.72);color:#fff;border-radius:12px;padding:9px 11px}
.bb-productivity-tools .bb-check{display:flex;gap:7px;align-items:center;min-height:40px}
.bb-productivity-tools .bb-check input{width:auto}
.bb-employee-chips{display:flex;gap:7px;overflow-x:auto;padding-bottom:2px}
.bb-employee-chips button{flex:0 0 auto;border:1px solid rgba(148,163,184,.18);background:rgba(2,6,23,.26);color:#cbd5e1;border-radius:999px;padding:7px 10px;font-weight:850;cursor:pointer}
.bb-employee-chips small{margin-left:5px;color:#94a3b8;font-weight:750}
.bb-employee-chips button:hover{border-color:rgba(245,119,30,.45);background:rgba(245,119,30,.10)}
.bb-salary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;border:1px dashed rgba(245,119,30,.34);border-radius:14px;padding:10px;background:rgba(245,119,30,.06)}
.bb-salary-grid label{display:grid;gap:4px;color:#cbd5e1;font-size:12px;font-weight:850}
.bb-profit-legend{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.bb-profit-legend span{border:1px solid rgba(148,163,184,.18);border-radius:999px;padding:5px 9px;font-size:12px;font-weight:900;color:#cbd5e1;background:rgba(2,6,23,.22)}
.bb-profit-legend .ok{border-color:rgba(34,197,94,.36);background:rgba(34,197,94,.12);color:#86efac}
.bb-profit-legend .warn{border-color:rgba(245,158,11,.38);background:rgba(245,158,11,.13);color:#fcd34d}
.bb-profit-legend .bad{border-color:rgba(239,68,68,.38);background:rgba(239,68,68,.13);color:#fca5a5}
.bb-profit-legend .none{border-color:rgba(148,163,184,.30);background:rgba(148,163,184,.12);color:#cbd5e1}
.bb-rent{display:inline-block;width:fit-content;margin-top:4px;border-radius:999px;padding:3px 8px;font-weight:900}
.bb-rent.ok{background:rgba(34,197,94,.14);color:#86efac!important}.bb-rent.warn{background:rgba(245,158,11,.15);color:#fcd34d!important}.bb-rent.bad{background:rgba(239,68,68,.14);color:#fca5a5!important}.bb-rent.none{background:rgba(148,163,184,.14);color:#cbd5e1!important}
.bb-section-title{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:8px}.bb-section-title h3{margin:0!important}
body.light-theme .bb-panel-actions button,body.light-theme .bb-section-title button{background:rgba(245,119,30,.10)!important;border-color:rgba(245,119,30,.42)!important;color:#C45D14!important}
body.light-theme .bb-productivity-tools label{color:#64748b!important}
body.light-theme .bb-productivity-tools input,body.light-theme .bb-productivity-tools select,body.light-theme .bb-salary-grid input{background:#fff!important;color:#0f172a!important;border-color:rgba(148,163,184,.34)!important}
body.light-theme .bb-employee-chips button{background:#fff!important;border-color:rgba(148,163,184,.30)!important;color:#334155!important;box-shadow:0 6px 14px rgba(15,23,42,.05)!important}
body.light-theme .bb-employee-chips small{color:#64748b!important}
body.light-theme .bb-salary-grid{background:rgba(245,119,30,.05)!important;border-color:rgba(245,119,30,.30)!important}
body.light-theme .bb-salary-grid label{color:#475569!important}
body.light-theme .bb-profit-legend span{background:#fff!important;color:#475569!important;border-color:rgba(148,163,184,.30)!important}
body.light-theme .bb-profit-legend .ok{color:#15803d!important;background:rgba(34,197,94,.10)!important;border-color:rgba(34,197,94,.30)!important}
body.light-theme .bb-profit-legend .warn{color:#b45309!important;background:rgba(245,158,11,.12)!important;border-color:rgba(245,158,11,.32)!important}
body.light-theme .bb-profit-legend .bad{color:#b91c1c!important;background:rgba(239,68,68,.10)!important;border-color:rgba(239,68,68,.30)!important}
body.light-theme .bb-rent.ok{color:#15803d!important;background:rgba(34,197,94,.12)!important}body.light-theme .bb-rent.warn{color:#b45309!important;background:rgba(245,158,11,.14)!important}body.light-theme .bb-rent.bad{color:#b91c1c!important;background:rgba(239,68,68,.12)!important}body.light-theme .bb-rent.none{color:#475569!important;background:rgba(148,163,184,.14)!important}
@media(max-width:900px){.bb-productivity-tools{grid-template-columns:1fr 1fr}.bb-productivity-tools label:first-child{grid-column:1/-1}}
@media(max-width:580px){.bb-panel-actions{justify-content:flex-start}.bb-productivity-tools{grid-template-columns:1fr}.bb-employee-chips{max-width:100%;overflow-x:auto}.bb-section-title{align-items:flex-start;display:grid}}
@media print{
  .bb-panel-actions,.bb-productivity-tools,.bb-employee-chips,.bb-salary-grid,.bb-section-title button{display:none!important}
  body[data-b-print-section] .bloque-b-cloudgestion > *{display:none!important}
  body[data-b-print-section="productividad"] [data-export-section="productividad"],
  body[data-b-print-section="calendario"] [data-export-section="calendario"],
  body[data-b-print-section="turnos"] [data-export-section="turnos"],
  body[data-b-print-section="comparativa-diaria"] [data-export-section="comparativa-diaria"],
  body[data-b-print-section="productos-comercial"] [data-export-section="productos-comercial"],
  body[data-b-print-section="meses-comercial"] [data-export-section="meses-comercial"],
  body[data-b-print-section="mismo-mes-anios"] [data-export-section="mismo-mes-anios"],
  body[data-b-print-section="acumulado-anual"] [data-export-section="acumulado-anual"]{display:block!important}
}

/* =============================================================== */
/* 2026-08-22 · Code: fecha en español, contador del buscador y     */
/* interruptor de empleados históricos. Sin depender de             */
/* body.light-theme: estas reglas valen con cualquier tema.         */
/* =============================================================== */

/* El <input type=date> nativo pinta la fecha en el idioma del navegador
   (a Fer le salía 08/21/2026). Lo dejamos vivo para que abra el calendario,
   pero tapado, y encima mostramos la fecha en dd/mm/aaaa. */
.bloque-b-toolbar .bb-date{position:relative;display:inline-flex;align-items:center;cursor:pointer}
.bloque-b-toolbar .bb-date-txt{
  display:inline-flex;align-items:center;gap:7px;
  border:1px solid rgba(148,163,184,.30);border-radius:10px;
  padding:7px 12px;background:#fff;color:#0f172a;
  font-weight:800;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.bloque-b-toolbar .bb-date-txt::before{
  content:"";width:14px;height:14px;flex:none;background:#C45D14;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='5' width='18' height='16' rx='2'/><path d='M3 10h18M8 3v4M16 3v4'/></svg>") center/contain no-repeat;
  mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='5' width='18' height='16' rx='2'/><path d='M3 10h18M8 3v4M16 3v4'/></svg>") center/contain no-repeat}
.bloque-b-toolbar .bb-date:hover .bb-date-txt{border-color:rgba(245,119,30,.45)}
/* El input real: ocupa el hueco pero no se ve. No usamos display:none para
   que siga siendo enfocable y showPicker() funcione. */
.bloque-b-toolbar .bb-date input[type=date]{
  position:absolute;inset:0;width:100%;height:100%;
  opacity:0;border:0;padding:0;margin:0;cursor:pointer}

/* Cuántos empleados casan con lo que has escrito. */
.bb-search-hits{
  align-self:end;margin-bottom:9px;
  font-size:10.5px;font-weight:800;white-space:nowrap;
  color:#C45D14;background:rgba(245,119,30,.12);
  border:1px solid rgba(245,119,30,.30);border-radius:999px;padding:4px 10px}

/* Interruptor de históricos: apagado por defecto. */
.bb-check-historicos{white-space:nowrap}
.bb-check-historicos b{color:#C45D14;font-weight:800}

/* =============================================================== */
/* 2026-08-22 · Code: Ventas CG con el estilo acordado con Fer      */
/* (crema + color por familia, igual que Inicio). Sin depender de   */
/* body.light-theme para que valga con cualquier tema.              */
/* =============================================================== */
.bloque-b-cloudgestion{
  --violet:#7c3aed; --violet-s:#f3e8ff;
  --orange:#f97316; --orange-s:#fff2e6;
  --cyan:#06b6d4;   --cyan-s:#e6fbfe;
  --green:#059669;  --green-s:#e9faf3;
  --red:#dc2626;    --red-s:#fdeaea;
  --slate:#64748b;  --slate-s:#f1f2f5;
  --bb-ink:#172033; --bb-muted:#6b7280; --bb-line:#eadfd4;
  --bb-shadow:0 4px 14px rgba(75,45,20,.035);
}
.bloque-b-cloudgestion [data-tone="violet"]{--c:var(--violet);--s:var(--violet-s)}
.bloque-b-cloudgestion [data-tone="orange"]{--c:var(--orange);--s:var(--orange-s)}
.bloque-b-cloudgestion [data-tone="cyan"]  {--c:var(--cyan);  --s:var(--cyan-s)}
.bloque-b-cloudgestion [data-tone="green"] {--c:var(--green); --s:var(--green-s)}
.bloque-b-cloudgestion [data-tone="red"]   {--c:var(--red);   --s:var(--red-s)}

/* variación contra el día anterior */
.bb-delta{display:inline-flex;align-items:center;margin-left:12px;padding:3px 10px;border-radius:999px;
  font-size:12px;font-weight:800;white-space:nowrap;vertical-align:middle}
.bb-delta.down{background:var(--red-s);color:#991b1b}
.bb-delta.up{background:var(--green-s);color:#065f46}

/* KPIs con barra de color a la izquierda */
.bb-kpis-v2 .bloque-b-card{position:relative;overflow:hidden;background:#fff!important;
  border:1px solid var(--bb-line)!important;border-radius:15px!important;box-shadow:var(--bb-shadow)}
.bb-kpis-v2 .bloque-b-card::before{content:"";position:absolute;inset:0 auto 0 0;width:3.5px;background:var(--c)}
.bb-kpis-v2 .bloque-b-card>span{color:var(--bb-muted)!important;font-size:9.5px;letter-spacing:.13em;text-transform:uppercase;font-weight:800}
.bb-kpis-v2 .bloque-b-card>strong{color:var(--bb-ink)!important;font-size:clamp(19px,2vw,25px);letter-spacing:-.02em}
.bb-kpis-v2 .bloque-b-card>strong.bb-card-sm{font-size:clamp(14px,1.3vw,17px);line-height:1.25;display:block}
.bb-kpis-v2 .bloque-b-card>p{color:var(--bb-muted)!important;font-size:11px;font-weight:500}
.bb-kpis-v2 .bloque-b-card>p b{color:var(--c)!important;font-weight:800}

/* cabecera de sección */
.bb-sec{display:flex;align-items:center;gap:9px;margin:2px 0 -4px}
.bb-sec h2{margin:0;font-size:12px;font-weight:800;letter-spacing:.13em;text-transform:uppercase;color:#374151}
.bb-sec-line{flex:1;height:1px;background:var(--bb-line)}
.bb-sec-hint{font-size:10.5px;color:var(--bb-muted);font-weight:500}

/* paneles nuevos */
.bb-split{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
.bb-panel-v2{background:#fff!important;border:1px solid var(--bb-line)!important;border-radius:16px!important;
  padding:15px 16px!important;box-shadow:var(--bb-shadow)}
.bb-panel-v2 h3{margin:0 0 12px;font-size:13px;font-weight:800;display:flex;align-items:center;gap:8px;color:var(--bb-ink)}
.bb-sq{width:5px;height:14px;border-radius:3px;background:var(--c);flex:none}
.bb-panel-n{margin-left:auto;font-size:10.5px;color:var(--bb-muted);font-weight:600}

/* curva del día por horas */
.bb-hours{display:flex;align-items:flex-end;gap:5px;height:104px}
.bb-hcol{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;height:100%;min-width:0}
.bb-hb{width:100%;border-radius:4px 4px 0 0;background:#ecdfd0}
.bb-hcol.peak .bb-hb{background:var(--orange)}
.bb-hcol.mid .bb-hb{background:var(--cyan)}
.bb-hv{font-size:8.5px;color:var(--bb-muted);font-weight:600;height:11px;white-space:nowrap}
.bb-hcol.peak .bb-hv{color:#9a3412;font-weight:800}
.bb-hl{font-size:9px;color:var(--bb-muted);font-weight:700}

/* cómo se ha cobrado */
.bb-pays{display:grid;gap:7px}
.bb-pay{display:flex;align-items:center;gap:8px;padding:8px 11px;border-radius:11px;background:var(--s);min-width:0}
.bb-pd{width:7px;height:7px;border-radius:50%;background:var(--c);flex:none}
.bb-pn{font-size:11.5px;font-weight:700;color:var(--bb-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bb-pv{margin-left:auto;font-size:12px;font-weight:800;color:var(--c);white-space:nowrap}

/* listas de top productos y top clientes */
.bb-lrow{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 9px;border-radius:10px}
.bb-lrow:nth-of-type(even){background:#fdfaf6}
.bb-lk{font-size:10.5px;font-weight:800;color:var(--bb-muted);text-align:center}
.bb-ltxt{display:grid;gap:2px;min-width:0}
.bb-ln{font-size:11.5px;font-weight:700;color:var(--bb-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bb-lq{font-size:10px;color:var(--bb-muted);font-weight:500}
.bb-lv{font-size:12.5px;font-weight:800;color:var(--bb-ink);white-space:nowrap}

@media(max-width:980px){.bb-split{grid-template-columns:1fr}}
