/* ======================================================
   MaestryAI · Painel Operacional
   Paleta clara ivory / graphite / ouro prestige
   ====================================================== */

:root {
  --lb-ink: #2F2F2F;
  --lb-green-deep: #303030;
  --lb-green: #3A3A3A;
  --lb-green-soft: #4B4B4B;
  --lb-green-sage: #6D7F4B;
  --lb-muted: #7B735F;
  --lb-gold: #F2B300;
  --lb-gold-deep: #9A6500;
  --lb-gold-mid: #E28D00;
  --lb-red: #A56600;
  --lb-glass: rgba(255,255,255,0.72);
  --lb-glass-strong: rgba(255,255,255,0.82);
  --lb-glass-border: rgba(255,255,255,0.92);
  --lb-shadow: 0 12px 34px rgba(156,104,0,0.08);

  /* 🔤 Escala global de fontes. 1 = original, 1.3 = +30%.
     Vale pra TODO texto, menos os números clássicos (Marcellus). */
  --fs: 1.3;
}

:root[data-theme="dark"] {
  --lb-ink: #FFF9EC;
  --lb-green-deep: #FFF9EC;
  --lb-green: #F3E6CF;
  --lb-green-soft: #F8DFAF;
  --lb-green-sage: #FFB347;
  --lb-muted: rgba(255,249,236,0.72);
  --lb-gold: #FFB347;
  --lb-gold-deep: #FFB347;
  --lb-gold-mid: #E28D00;
  --lb-red: #FF9500;
  --lb-glass: rgba(74,44,0,0.72);
  --lb-glass-strong: rgba(74,44,0,0.82);
  --lb-glass-border: rgba(255,179,71,0.24);
  --lb-shadow: 0 18px 46px rgba(0,0,0,0.34);
}

* { box-sizing: border-box; }

html, body {
  background: #F7F1E6; /* ivory/champanhe claro */
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #120D08;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  font-family: 'Manrope', sans-serif;
  color: var(--lb-ink);
  transition: background 0.22s ease, color 0.22s ease;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(226,141,0,0.26); border-radius: 8px; }

@keyframes orbPulse {
  0%   { box-shadow: 0 0 0 0 rgba(226,141,0,0.42), 0 0 0 0 rgba(255,179,71,0.22); }
  70%  { box-shadow: 0 0 0 18px rgba(226,141,0,0), 0 0 0 30px rgba(255,179,71,0); }
  100% { box-shadow: 0 0 0 0 rgba(226,141,0,0), 0 0 0 0 rgba(255,179,71,0); }
}
@keyframes orbSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes orbSpinRev {
  from { transform: rotate(360deg); }
  to   { transform: rotate(0deg); }
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@keyframes orbHalo {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 0.7;  transform: scale(1.12); }
}
@keyframes orbBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes starTwinkle {
  0%, 100% { opacity: 0.85; transform: scale(1) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.18) rotate(8deg); }
}

/* ================= PAGE ================= */
.lb-page {
  min-height: 100vh;
  width: 100%;
  background:
    radial-gradient(1100px 560px at 8% -12%, rgba(226,141,0,0.15), transparent 58%),
    radial-gradient(900px 620px at 100% 0%, rgba(242,179,0,0.10), transparent 52%),
    linear-gradient(165deg, #F7F1E6 0%, #FFF9EC 45%, #F3E6CF 100%);
  padding: 28px clamp(16px, 3vw, 48px) 64px;
}

:root[data-theme="dark"] .lb-page {
  background:
    radial-gradient(1100px 560px at 8% -12%, rgba(226,141,0,0.18), transparent 58%),
    radial-gradient(900px 620px at 100% 0%, rgba(255,179,71,0.09), transparent 52%),
    linear-gradient(165deg, #120D08 0%, #1D1207 48%, #301D08 100%);
}

/* ================= HEADER ================= */
.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.lb-brand { display: flex; align-items: center; gap: 18px; }
.lb-logo {
  height: 47px; width: auto; object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(120,95,20,0.15));
}
.lb-brand-divider {
  width: 1px; height: 38px;
  background: linear-gradient(180deg, transparent, rgba(120,100,50,0.35), transparent);
}
.lb-brand-titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lb-brand-title {
  font-family: 'Playfair Display', serif;
  font-size: calc(19px * var(--fs)); font-weight: 600; color: var(--lb-green-deep); letter-spacing: 0.2px;
}
.lb-brand-sub {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: calc(15px * var(--fs)); color: var(--lb-muted); margin-top: 1px;
}

.lb-header-actions { display: flex; align-items: center; gap: 14px; }
.lb-theme-btn {
  flex: 0 0 auto; font-family: 'Manrope', sans-serif; font-weight: 800;
  font-size: 12.5px; letter-spacing: 0.35px; cursor: pointer; white-space: nowrap;
  padding: 8px 13px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.6);
  color: #2B2A1E;
  background: linear-gradient(135deg, #FFF9EC 0%, #FFB347 58%, #E28D00 100%);
  box-shadow: 0 6px 18px rgba(156,104,0,0.10), inset 0 1px 0 rgba(255,255,255,0.65);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.lb-theme-btn:hover { filter: brightness(1.04); }
.lb-theme-btn:active { transform: scale(0.97); }
.lb-chip {
  display: flex; align-items: center; gap: 9px;
  background: var(--lb-glass-strong);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--lb-glass-border);
  border-radius: 14px; padding: 9px 16px;
  box-shadow: 0 6px 18px rgba(156,104,0,0.07);
}
.lb-chip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lb-green-sage);
  box-shadow: 0 0 0 3px rgba(226,141,0,0.18);
}
.lb-chip-text { font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--lb-green-soft); }

.lb-icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 14px;
  background: var(--lb-glass-strong);
  backdrop-filter: blur(18px);
  border: 1px solid var(--lb-glass-border);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(156,104,0,0.07);
  cursor: pointer; padding: 0;
  color: #5B5238;
}
.lb-icon-btn svg path { stroke: currentColor; }
.lb-icon-badge {
  position: absolute; top: 9px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #A56600; border: 1.5px solid #FFF9EC;
}
.lb-avatar {
  width: 44px; height: 44px; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 6px 18px rgba(156,104,0,0.1);
  background: linear-gradient(135deg, #FFDCA3, #E28D00);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-weight: 700; color: #2B2A26; font-size: calc(15px * var(--fs));
}

/* ================= LAYOUT ================= */
.lb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}
.lb-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
/* Cada view (Operacional/Financeiro) reempilha suas seções com o MESMO respiro
   do .lb-main — sem isto os cards ficam grudados (gap 0), pois viram netos.
   :not([hidden]) é ESSENCIAL: senão o display:flex sobrescreve o `hidden`
   da view inativa e as duas aparecem empilhadas. */
.lb-view:not([hidden]) { display: flex; flex-direction: column; gap: 22px; }
.lb-sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }

/* ================= CARD BASE ================= */
.lb-card {
  background: var(--lb-glass);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--lb-glass-border);
  border-radius: 22px;
  padding: 22px 24px;
  box-shadow: var(--lb-shadow);
  min-width: 0;
  overflow: hidden; /* recorta a fita dourada na curva → pontas pra baixo em todos os cards */
}

:root[data-theme="dark"] .lb-card,
:root[data-theme="dark"] .lb-kpi,
:root[data-theme="dark"] .lb-agent,
:root[data-theme="dark"] .lb-footer {
  background: rgba(12,9,5,0.78); /* obsidiana quente (era rgba(31,18,4,0.62)) */
  backdrop-filter: blur(28px) saturate(190%) contrast(108%);
  -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(108%);
  border-color: rgba(255,179,71,0.28);
  box-shadow:
    0 20px 54px rgba(0,0,0,0.36),
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,179,71,0.08);
}

.lb-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.lb-card-head--tight { margin-bottom: 6px; }
.lb-card-title {
  font-family: 'Playfair Display', serif; font-size: calc(17px * var(--fs)); font-weight: 600; color: var(--lb-green-deep);
}
.lb-card-title--sm { font-size: calc(15px * var(--fs)); margin-bottom: 12px; }
.lb-card-note {
  font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--lb-muted); font-size: calc(14px * var(--fs));
}
.lb-card-caption { font-size: calc(12px * var(--fs)); color: var(--lb-muted); margin-bottom: 6px; }
.lb-section-title {
  font-family: 'Playfair Display', serif; font-size: calc(17px * var(--fs)); font-weight: 600;
  color: var(--lb-green-deep); margin-bottom: 14px;
}
.lb-pill {
  font-size: calc(13px * var(--fs)); font-weight: 700; color: var(--lb-gold-deep);
  background: rgba(255,179,71,0.30); padding: 4px 10px; border-radius: 20px;
}

/* ================= KPIs ================= */
.lb-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.lb-kpi {
  background: var(--lb-glass);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--lb-glass-border);
  border-radius: 22px;
  padding: 20px 20px 16px;
  box-shadow: var(--lb-shadow);
  position: relative; overflow: hidden;
}
.lb-kpi-top { display: flex; align-items: center; justify-content: space-between; }
.lb-kpi-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.lb-kpi-delta { font-size: calc(12px * var(--fs)); font-weight: 700; padding: 4px 9px; border-radius: 20px; }
/* Número clássico de destaque — NÃO escala (fonte Marcellus) */
.lb-kpi-value {
  font-family: 'Marcellus', serif; font-size: 26px; font-weight: 400;
  color: var(--lb-green-deep); margin-top: 14px; line-height: 1; letter-spacing: 0.2px;
}
.lb-kpi-name { font-size: calc(13px * var(--fs)); color: var(--lb-muted); margin-top: 6px; font-weight: 600; }
.lb-kpi-spark { margin-top: 10px; display: block; }

/* ================= FUNNEL ================= */
.lb-two-col { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px; }
.lb-funnel { display: flex; flex-direction: column; gap: 11px; }
.lb-funnel-row-head {
  display: flex; justify-content: space-between; font-size: calc(13px * var(--fs)); margin-bottom: 5px;
}
.lb-funnel-label { font-weight: 700; color: var(--lb-green-soft); }
.lb-funnel-value { color: var(--lb-muted); font-weight: 600; }
.lb-funnel-conv { font-weight: 700; }
.lb-funnel-track {
  height: 14px; border-radius: 8px; background: rgba(156,104,0,0.09); overflow: hidden;
}
:root[data-theme="dark"] .lb-funnel-track,
:root[data-theme="dark"] .lb-agent-track,
:root[data-theme="dark"] .lb-occupancy-track,
:root[data-theme="dark"] .lb-fatdia-bar {
  background: rgba(255,249,236,0.12);
}
.lb-funnel-fill { height: 100%; border-radius: 8px; }

@keyframes mfGridBreathe {
  0%, 100% { opacity: 0.78; transform: translateY(0) scaleY(1); }
  50% { opacity: 1; transform: translateY(2px) scaleY(1.015); }
}
@keyframes mfDash {
  to { stroke-dashoffset: -42; }
}
@keyframes mfParticles {
  0%, 100% { opacity: 0.42; transform: translateY(4px); }
  45% { opacity: 1; transform: translateY(-5px); }
}
@keyframes mfLeadFall {
  0% { opacity: 0; transform: translate(0, -16px) scale(1.05); }
  12% { opacity: 0.95; }
  62% { opacity: 0.86; }
  100% { opacity: 0; transform: translate(var(--fx, 0px), var(--fy, 150px)) scale(0.58); }
}
@keyframes mfRimSpark {
  0% { stroke-dashoffset: 190; opacity: 0.14; }
  45% { opacity: 0.9; }
  100% { stroke-dashoffset: -190; opacity: 0.14; }
}

.lb-mf-card {
  overflow: hidden;
  min-height: 540px;
}
.lb-mf-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
.lb-mf-icon {
  width: 50px; height: 50px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #FFF9EC;
  background: linear-gradient(135deg, #FFB347 0%, #E28D00 48%, #B65337 100%);
  box-shadow: 0 10px 26px rgba(226,141,0,0.32), inset 0 1px 0 rgba(255,255,255,0.55);
}
.lb-mf-title {
  font-size: calc(16px * var(--fs));
  letter-spacing: 5px;
  font-weight: 800;
  color: var(--lb-green-deep);
  line-height: 1.05;
}
.lb-mf-sub {
  margin-top: 6px;
  font-size: calc(12px * var(--fs));
  line-height: 1.35;
  color: var(--lb-muted);
  font-weight: 800;
}
.lb-mf-meta {
  min-width: 68px;
  padding: 9px 13px;
  border-radius: 20px;
  text-align: center;
  color: #A56600;
  background: rgba(255,179,71,0.18);
  border: 1px solid rgba(226,141,0,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.44);
}
.lb-mf-meta strong {
  display: block;
  font-size: calc(15px * var(--fs));
  line-height: 1;
  font-weight: 900;
}
.lb-mf-meta span {
  display: block;
  margin-top: 2px;
  font-size: calc(11px * var(--fs));
  font-weight: 800;
}
.lb-mf-stage {
  position: relative;
  height: 360px;
  margin: 28px -10px 10px;
}
.lb-mf-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.lb-mf-ambient { opacity: 0.95; }
.lb-mf-grid {
  transform-origin: 50% 52%;
  animation: mfGridBreathe 4.8s ease-in-out infinite;
}
.lb-mf-side,
.lb-mf-ring,
.lb-mf-neck,
.lb-mf-meridian {
  fill: none;
  stroke: url(#lbMfWire);
  stroke-width: 1.25;
  stroke-linecap: round;
  opacity: 0.78;
}
.lb-mf-ring,
.lb-mf-neck {
  stroke-dasharray: 7 7;
  animation: mfDash 4.5s linear infinite;
}
.lb-mf-meridian { opacity: 0.52; }
.lb-mf-particles {
  fill: #FFB347;
  filter: url(#lbMfSoftGlow);
  animation: mfParticles 3.8s ease-in-out infinite;
}
.lb-mf-particles circle:nth-child(3n) { fill: #FFF9EC; animation-delay: .35s; }
.lb-mf-particles circle:nth-child(3n + 1) { fill: #E28D00; animation-delay: .75s; }
.lb-mf-leads-rain {
  fill: #FFB347;
  filter: url(#lbMfSoftGlow);
  pointer-events: none;
}
.lb-mf-leads-rain circle {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: mfLeadFall var(--dur, 3.4s) linear infinite;
  animation-delay: var(--delay, 0s);
}
.lb-mf-leads-rain circle:nth-child(3n) { fill: #FFF9EC; }
.lb-mf-leads-rain circle:nth-child(3n + 1) { fill: #E28D00; }
.lb-mf-rim-shadow {
  fill: none;
  stroke: rgba(255,179,71,0.23);
  stroke-width: 5;
  filter: url(#lbMfSoftGlow);
}
.lb-mf-rim {
  fill: none;
  stroke: url(#lbMfRibbon);
  stroke-width: 2.8;
  filter: url(#lbMfSoftGlow);
}
.lb-mf-rim-spark {
  fill: none;
  stroke: #FFF9EC;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 54 260;
  filter: url(#lbMfSoftGlow);
  animation: mfRimSpark 3.8s ease-in-out infinite;
}
.lb-mf-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lb-mf-row {
  position: absolute;
  left: 9%;
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-shadow: 0 0 16px rgba(226,141,0,0.42);
}
.lb-mf-row span {
  font-size: calc(11px * var(--fs));
  letter-spacing: 4px;
  font-weight: 900;
  color: #FFB347;
}
.lb-mf-row b {
  font-family: 'Marcellus', serif;
  font-size: 32px;
  line-height: 1;
  color: var(--lb-green-deep);
}
.lb-mf-row--leads { top: 31%; }
.lb-mf-row--agendado { top: 50%; }
.lb-mf-row--realizado { top: 69%; }
.lb-mf-row--orcamentos { top: 87%; }
.lb-mf-row--agendado span { color: #FF9500; }
.lb-mf-row--realizado span { color: #E28D00; }
.lb-mf-row--orcamentos span { color: #B65337; }
.lb-mf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.lb-mf-chips span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 13px;
  color: var(--lb-muted);
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(226,141,0,0.18);
  font-size: calc(11.5px * var(--fs));
  font-weight: 800;
}
.lb-mf-chips i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #E28D00;
  box-shadow: 0 0 12px rgba(226,141,0,0.75);
}
.lb-mf-chips b { color: var(--lb-green-deep); }

:root[data-theme="dark"] .lb-mf-card {
  background: rgba(12,9,5,0.78); /* obsidiana quente (era rgba(31,18,4,0.62)) */
  border-color: rgba(255,179,71,0.28);
}
:root[data-theme="dark"] .lb-mf-title,
:root[data-theme="dark"] .lb-mf-row b {
  color: #FFF9EC;
}
:root[data-theme="dark"] .lb-mf-meta,
:root[data-theme="dark"] .lb-mf-chips span {
  background: rgba(74,44,0,0.42);
  border-color: rgba(255,179,71,0.24);
}
:root[data-theme="dark"] .lb-mf-meta { color: #FFB347; }
:root[data-theme="dark"] .lb-mf-chips b { color: #FFF9EC; }

/* ================= WEEK ACTIVITY ================= */
.lb-week-activity-card {
  overflow: hidden;
  min-height: 540px;
}
.lb-activity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.lb-activity-titlebox {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}
.lb-activity-icon {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lb-gold);
  background: rgba(226,141,0,0.11);
  border: 1px solid rgba(226,141,0,0.34);
  box-shadow: 0 0 28px rgba(226,141,0,0.16), inset 0 1px 0 rgba(255,255,255,0.38);
}
.lb-activity-title {
  font-size: calc(12px * var(--fs));
  line-height: 1.15;
  letter-spacing: 0.18em;
  font-weight: 900;
  color: var(--lb-green-deep);
  white-space: nowrap;
}
.lb-activity-period {
  margin-top: 12px;
  font-size: calc(11px * var(--fs));
  letter-spacing: 0.28em;
  font-weight: 800;
  color: var(--lb-muted);
  text-transform: uppercase;
}
.lb-activity-total {
  text-align: right;
  color: var(--lb-gold);
}
.lb-activity-total span {
  display: block;
  font-size: calc(12px * var(--fs));
  letter-spacing: 0.32em;
  font-weight: 900;
}
.lb-activity-total strong {
  display: block;
  margin-top: 5px;
  font-family: 'Marcellus', serif;
  font-size: 48px;
  line-height: 0.9;
  font-weight: 400;
  color: var(--lb-green-deep);
  text-shadow: 0 12px 32px rgba(226,141,0,0.18);
}
.lb-activity-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 23px 0 20px;
}
.lb-activity-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: calc(11.5px * var(--fs));
  font-weight: 800;
  color: var(--lb-muted);
}
.lb-activity-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}
.lb-activity-legend .lv-low { background: rgba(74,44,0,0.32); }
.lb-activity-legend .lv-mid { background: rgba(165,102,0,0.58); }
.lb-activity-legend .lv-high { background: rgba(226,141,0,0.78); }
.lb-activity-legend .lv-peak {
  background: var(--lb-gold);
  box-shadow: 0 0 15px rgba(255,179,71,0.72);
}
.lb-activity-frame {
  position: relative;
  border-radius: 24px;
  padding: 24px 14px 18px;
  border: 1px solid rgba(226,141,0,0.22);
  background:
    radial-gradient(220px 180px at 82% 16%, rgba(255,179,71,0.13), transparent 68%),
    linear-gradient(135deg, rgba(255,249,236,0.42), rgba(226,141,0,0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.38);
}
.lb-activity-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
}
.lb-activity-day {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(5, 36px) auto auto auto;
  gap: 8px;
  align-items: stretch;
}
.lb-activity-cell {
  position: relative;
  border-radius: 13px;
  border: 1px solid rgba(226,141,0,0.17);
  background:
    repeating-linear-gradient(105deg, rgba(226,141,0,0.10) 0 2px, transparent 2px 6px),
    rgba(74,44,0,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.20);
  transform-origin: center bottom;
}
.lb-activity-cell.is-active {
  border-color: rgba(255,179,71,0.78);
  background: linear-gradient(180deg, rgba(255,221,130,0.92), rgba(226,141,0,0.72));
  box-shadow:
    0 10px 26px rgba(226,141,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.50);
}
.lb-activity-cell.is-low { opacity: 0.72; }
.lb-activity-cell.is-mid { filter: saturate(0.95) brightness(0.92); }
.lb-activity-cell.is-high { filter: saturate(1.08); }
.lb-activity-cell.is-peak {
  background: linear-gradient(180deg, #FFE7A3 0%, #FFB347 42%, #A56600 100%);
  box-shadow:
    0 0 0 1px rgba(255,179,71,0.42),
    0 12px 34px rgba(226,141,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.70);
}
.lb-activity-cell.is-current::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lb-gold);
  box-shadow: 0 0 16px rgba(255,179,71,0.95);
}
.lb-activity-day-label,
.lb-activity-date,
.lb-activity-count {
  text-align: center;
  min-width: 0;
}
.lb-activity-day-label {
  margin-top: 10px;
  font-size: calc(10.5px * var(--fs));
  line-height: 1;
  letter-spacing: 0.08em;
  font-weight: 900;
  color: var(--lb-green-soft);
  text-transform: uppercase;
}
.lb-activity-day.is-today .lb-activity-day-label {
  color: var(--lb-gold);
  text-shadow: 0 0 16px rgba(255,179,71,0.35);
}
.lb-activity-date {
  font-size: calc(10px * var(--fs));
  line-height: 1;
  font-weight: 700;
  color: rgba(123,115,95,0.72);
}
.lb-activity-count {
  font-family: 'Marcellus', serif;
  font-size: 16px;
  line-height: 1;
  font-weight: 400;
  color: var(--lb-gold-deep);
}
.lb-activity-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(226,141,0,0.16);
}
.lb-activity-footer span {
  display: block;
  font-size: calc(10.5px * var(--fs));
  letter-spacing: 0.38em;
  font-weight: 800;
  color: var(--lb-muted);
}
.lb-activity-footer strong {
  display: block;
  margin-top: 7px;
  font-size: calc(18px * var(--fs));
  line-height: 1;
  font-weight: 900;
  color: var(--lb-gold);
}
.lb-activity-live {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--lb-muted);
}
.lb-activity-live i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #36D78F;
  box-shadow: 0 0 18px rgba(54,215,143,0.8);
}

:root[data-theme="dark"] .lb-week-activity-card {
  background: rgba(12,9,5,0.78); /* obsidiana quente unificado (era rgba(9,8,12,0.74) frio) */
  border-color: rgba(255,179,71,0.23);
}
:root[data-theme="dark"] .lb-activity-icon {
  background: rgba(226,141,0,0.10);
  border-color: rgba(255,179,71,0.34);
}
:root[data-theme="dark"] .lb-activity-total strong,
:root[data-theme="dark"] .lb-activity-title {
  color: #FFF9EC;
}
:root[data-theme="dark"] .lb-activity-frame {
  border-color: rgba(255,179,71,0.22);
  background:
    radial-gradient(260px 220px at 85% 12%, rgba(255,179,71,0.14), transparent 68%),
    radial-gradient(250px 200px at 12% 100%, rgba(226,141,0,0.10), transparent 70%),
    rgba(15,13,18,0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
:root[data-theme="dark"] .lb-activity-cell {
  border-color: rgba(255,179,71,0.15);
  background:
    repeating-linear-gradient(105deg, rgba(255,179,71,0.08) 0 2px, transparent 2px 6px),
    rgba(255,179,71,0.03);
}
:root[data-theme="dark"] .lb-activity-date { color: rgba(255,249,236,0.35); }
:root[data-theme="dark"] .lb-activity-count { color: #FFB347; }

/* Dark: LEDs acesos com brilho claramente ESCALONADO por nível (corrige o dark apagado,
   onde a regra base .lb-activity-cell tinha especificidade maior e clobberava o gradiente). */
:root[data-theme="dark"] .lb-activity-cell.is-active {
  border-color: rgba(255,196,110,0.50);
  box-shadow: 0 8px 22px rgba(226,141,0,0.20), inset 0 1px 0 rgba(255,255,255,0.16);
}
:root[data-theme="dark"] .lb-activity-cell.is-active.is-low {
  opacity: 1; filter: none;
  background: linear-gradient(180deg, #8A5A16, #4E3109);
  border-color: rgba(255,196,110,0.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
:root[data-theme="dark"] .lb-activity-cell.is-active.is-mid {
  filter: none;
  background: linear-gradient(180deg, #CE8A1E, #8C5A12);
  border-color: rgba(255,196,110,0.42);
}
:root[data-theme="dark"] .lb-activity-cell.is-active.is-high {
  filter: none;
  background: linear-gradient(180deg, #FFBB4E, #D57F08);
  border-color: rgba(255,206,130,0.60);
  box-shadow: 0 8px 24px rgba(255,150,40,0.28), inset 0 1px 0 rgba(255,255,255,0.28);
}
:root[data-theme="dark"] .lb-activity-cell.is-active.is-peak {
  background: linear-gradient(180deg, #FFE7A3 0%, #FFB347 45%, #E28D00 100%);
  border-color: rgba(255,214,150,0.70);
  box-shadow: 0 0 0 1px rgba(255,196,110,0.50), 0 12px 34px rgba(255,150,40,0.42), inset 0 1px 0 rgba(255,255,255,0.60);
}
/* Dark: legenda dos níveis alinhada aos LEDs (a lv-low marrom sumia no obsidiana) */
:root[data-theme="dark"] .lb-activity-legend .lv-low { background: #6E4712; }
:root[data-theme="dark"] .lb-activity-legend .lv-mid { background: #B67718; }
:root[data-theme="dark"] .lb-activity-legend .lv-high { background: #F09A22; }

/* Fill encantador: células acendem de baixo p/ cima, coluna a coluna (delay inline no JS) */
@keyframes cellRise { from { opacity: 0; transform: translateY(10px) scaleY(0.5); } to { opacity: 1; transform: none; } }
.lb-week-activity-card.is-playing .lb-activity-cell.is-active {
  animation: cellRise 0.7s cubic-bezier(.2,.85,.3,1.1) both;
}

/* ================= AGENTS ================= */
.lb-agents {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px;
}
.lb-agent {
  background: var(--lb-glass);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--lb-glass-border);
  border-radius: 22px; padding: 20px; box-shadow: var(--lb-shadow);
  overflow: hidden; /* recorta a fita dourada na curva do card → pontas pra baixo (igual cockpit) */
}
.lb-agent-head { display: flex; align-items: center; gap: 12px; }
.lb-agent-avatar {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-weight: 700; color: #fff; font-size: calc(16px * var(--fs));
}
.lb-agent-name { font-weight: 700; font-size: calc(14.5px * var(--fs)); color: var(--lb-green-deep); }
.lb-agent-status { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.lb-agent-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lb-green-sage); }
.lb-agent-status-text { font-size: calc(12px * var(--fs)); color: var(--lb-muted); font-weight: 600; }
.lb-agent-metrics { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.lb-agent-metric { display: flex; justify-content: space-between; font-size: calc(12.5px * var(--fs)); }
.lb-agent-metric-label { color: var(--lb-muted); font-weight: 600; }
.lb-agent-metric-value { color: var(--lb-ink); font-weight: 700; }
.lb-agent-track {
  height: 8px; border-radius: 6px; background: rgba(140,120,60,0.1);
  margin-top: 14px; overflow: hidden;
}
.lb-agent-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #E28D00, #FFB347); }
.lb-agent-cap { font-size: calc(11px * var(--fs)); color: var(--lb-muted); margin-top: 5px; font-weight: 600; }

/* ================= PRIORITIES ================= */
.lb-priorities { display: flex; flex-direction: column; gap: 2px; }
.lb-priority {
  display: flex; align-items: center; gap: 14px; padding: 13px 6px;
  border-bottom: 1px solid rgba(140,120,60,0.12);
}
.lb-priority:last-child { border-bottom: none; }
.lb-priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
/* Avatar (silhueta) do cliente do WhatsApp — cor por contato + badge de urgência */
.lb-priority-avatar {
  position: relative; width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  align-self: flex-start; margin-top: 1px; /* avatar no topo, resto do row centralizado */
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255,255,255,0.7);
  box-shadow: 0 3px 10px rgba(120,95,20,0.18), inset 0 1px 0 rgba(255,255,255,0.4);
}
.lb-priority-badge {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px;
  border-radius: 50%; border: 2px solid #FFF9EC;
}
.lb-priority-body { min-width: 0; flex: 1; }
.lb-priority-client { font-weight: 700; font-size: calc(14px * var(--fs)); color: var(--lb-green-deep); }
.lb-priority-reason { font-size: calc(12.5px * var(--fs)); color: var(--lb-muted); margin-top: 2px; }
.lb-priority-urgency {
  font-size: calc(11.5px * var(--fs)); font-weight: 700; padding: 5px 11px; border-radius: 20px; flex-shrink: 0;
}
.lb-priority-time {
  font-size: calc(12px * var(--fs)); color: var(--lb-muted); font-weight: 600;
  width: 52px; text-align: right; flex-shrink: 0;
}

/* ================= REVENUE / DONUT ================= */
/* Gráfico principal 4:5 (pizza 3D) à esquerda + legenda à direita */
.lb-revenue { display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: center; }
/* Pizza 3D 🍕 — cidade de fatias, proporção retrato 4:5 (300x375) */
.lb-pie3d-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 300px; max-width: 100%; }
#lb-pie3d { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 18px 28px rgba(0,0,0,0.30)); }
/* Pirâmide 3D de blocos — reveal subindo em cascata (base primeiro) */
@keyframes pyrRise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
#lb-pie3d .lb-pyr-block { transform-box: fill-box; transform-origin: center bottom; }
.lb-pie3d-wrap.is-playing #lb-pie3d .lb-pyr-block { animation: pyrRise 0.5s cubic-bezier(.2,.8,.3,1.05) both; }
@media (prefers-reduced-motion: reduce) { .lb-pie3d-wrap.is-playing #lb-pie3d .lb-pyr-block { animation: none; } }
/* Receita: pirâmide + escada lado a lado (2 colunas) */
.lb-revenue-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.lb-revenue-duo > .lb-card { min-width: 0; }
.lb-revenue-duo .lb-revenue { grid-template-columns: 1fr; gap: 12px; justify-items: center; }
.lb-revenue-duo .lb-pie3d-wrap { width: 100%; max-width: 250px; }
.lb-revenue-duo .lb-revenue-list { width: 100%; }
@media (max-width: 740px) { .lb-revenue-duo { grid-template-columns: 1fr; } }

/* Escada 3D (Receita por Produto) */
#lb-cat-stairs { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 16px 24px rgba(0,0,0,0.28)); }
#lb-cat-stairs .lb-stair-block { transform-box: fill-box; transform-origin: center bottom; }
.lb-pie3d-wrap.is-playing #lb-cat-stairs .lb-stair-block { animation: pyrRise 0.5s cubic-bezier(.2,.8,.3,1.05) both; }
@media (prefers-reduced-motion: reduce) { .lb-pie3d-wrap.is-playing #lb-cat-stairs .lb-stair-block { animation: none; } }
#lb-pie3d .lb-pielabel { fill: #2c2418; }
#lb-pie3d .lb-pielabel-val { fill: #8a6a2c; }
:root[data-theme="dark"] #lb-pie3d .lb-pielabel { fill: #FFF9EC; }
:root[data-theme="dark"] #lb-pie3d .lb-pielabel-val { fill: #E7C79A; }
/* fatias sobem do chão (mesmo truque das torres do Cockpit) */
.lb-pieslice { transform-box: fill-box; transform-origin: center bottom; }
.lb-pie3d-wrap.is-playing .lb-pieslice { animation: pieRise 0.72s cubic-bezier(.2,.85,.3,1) both; }
.lb-pie3d-wrap.is-playing .lb-pielabels { animation: pieLabelsIn 0.5s ease 0.55s both; }
@keyframes pieRise { from { transform: scaleY(0.02); } to { transform: scaleY(1); } }
@keyframes pieLabelsIn { from { opacity: 0; } to { opacity: 1; } }
.lb-pie3d-total { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 6px; line-height: 1.18; }
:root[data-theme="dark"] .lb-pie3d-total .lb-donut-total { color: #FFF9EC; }
.lb-donut {
  width: 180px; height: 180px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}
.lb-donut-hole {
  width: 112px; height: 112px; border-radius: 50%; background: #FFF9EC;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 10px; box-sizing: border-box; line-height: 1.18;
  box-shadow: 0 4px 14px rgba(120,95,20,0.12);
}
:root[data-theme="dark"] .lb-donut-hole {
  background: rgba(255,249,236,0.08);
  border: 1px solid rgba(255,249,236,0.10);
  box-shadow: 0 8px 22px rgba(0,0,0,0.22);
}
/* Número clássico de destaque — NÃO escala (fonte Marcellus) */
.lb-donut-total {
  font-family: 'Marcellus', serif; font-size: 16px; font-weight: 400;
  color: var(--lb-green-deep); letter-spacing: 0.2px;
}
.lb-donut-label { font-size: calc(10.5px * var(--fs)); color: var(--lb-muted); font-weight: 700; letter-spacing: 0.3px; }
.lb-revenue-list { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.lb-revenue-item { display: flex; align-items: center; gap: 10px; }
.lb-revenue-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.lb-revenue-name { font-size: calc(13px * var(--fs)); font-weight: 700; color: var(--lb-green-soft); flex: 1; min-width: 0; }
.lb-revenue-value { font-size: calc(13px * var(--fs)); font-weight: 700; color: var(--lb-green-deep); }
.lb-revenue-pct { font-size: calc(12px * var(--fs)); font-weight: 700; color: var(--lb-muted); width: 40px; text-align: right; }

/* ================= ORB / SIDEBAR ================= */
.lb-orb-card {
  padding: 28px 22px; border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 12px 34px rgba(120,95,20,0.1);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  overflow: hidden; /* recorta a fita dourada na curva do card → pontas pra baixo (igual cockpit) */
}
:root[data-theme="dark"] .lb-orb-card {
  background: rgba(12,9,5,0.78); /* obsidiana quente (era rgba(31,18,4,0.62)) */
  border-color: rgba(255,179,71,0.28);
  backdrop-filter: blur(28px) saturate(190%) contrast(108%);
  -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(108%);
  box-shadow:
    0 20px 54px rgba(0,0,0,0.36),
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,179,71,0.08);
}
/* flutuação suave da ORB inteira */
.lb-orb {
  position: relative; width: 120px; height: 120px; margin-bottom: 16px;
  animation: orbFloat 5.5s ease-in-out infinite;
}
/* halo pulsante atrás da ORB */
.lb-orb::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(226,141,0,0.48), rgba(226,141,0,0) 68%);
  filter: blur(6px); z-index: 0;
  animation: orbHalo 3.4s ease-in-out infinite;
}
/* segundo anel, girando ao contrário, mais fino */
.lb-orb::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 90deg, rgba(255,179,71,0), #FFB347, rgba(226,141,0,0.9), rgba(255,179,71,0));
  opacity: 0.4; z-index: 0;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: orbSpinRev 7s linear infinite;
}
.lb-orb-ring {
  position: absolute; inset: 0; border-radius: 50%; z-index: 1;
  background: conic-gradient(from 0deg, #E28D00, #FFB347, #A56600, #E28D00);
  animation: orbSpin 9s linear infinite; opacity: 0.55; filter: blur(1px);
}
.lb-orb-core {
  position: absolute; inset: 10px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 32% 28%, #FFF9EC, #E28D00 55%, #4A2C00 100%);
  animation: orbPulse 2.6s ease-out infinite, orbBreathe 4.4s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(165,102,0,0.30);
}
/* estrela cintilando no centro */
.lb-orb-core svg { transform-origin: center; animation: starTwinkle 2.8s ease-in-out infinite; }

.lb-orb-title { font-family: 'Playfair Display', serif; font-size: calc(18px * var(--fs)); font-weight: 700; color: var(--lb-green-deep); }
.lb-orb-sub {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: calc(14px * var(--fs)); color: var(--lb-muted); margin-top: 2px;
}
.lb-orb-stats { width: 100%; display: flex; flex-direction: column; gap: 9px; margin-top: 20px; }
.lb-orb-stat {
  display: flex; justify-content: space-between; align-items: center;
  /* Vidro puro (sem âmbar sólido): frost translúcido + blur sobre o card. */
  background: rgba(255,255,255,0.16);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  border-radius: 12px; padding: 10px 13px;
}
:root[data-theme="dark"] .lb-orb-stat {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,214,150,0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}
.lb-orb-stat-label { font-size: calc(12.5px * var(--fs)); font-weight: 600; color: #5B5238; }
.lb-orb-stat-value { font-size: calc(13.5px * var(--fs)); font-weight: 800; color: var(--lb-green-deep); }
:root[data-theme="dark"] .lb-orb-stat-label { color: rgba(255,249,236,0.72); }
.lb-orb-now {
  margin-top: 18px; width: 100%; font-size: calc(12px * var(--fs)); line-height: 1.5; color: var(--lb-muted);
  text-align: left; background: rgba(255,255,255,0.5);
  border: 1px solid var(--lb-glass-border); border-radius: 14px; padding: 12px 14px;
}
:root[data-theme="dark"] .lb-orb-now {
  background: rgba(18,13,8,0.34);
  border-color: rgba(255,179,71,0.18);
}
.lb-orb-now-tag { font-weight: 800; color: var(--lb-green-soft); }

/* ================= OCCUPANCY ================= */
.lb-occupancy { display: flex; flex-direction: column; gap: 10px; }
.lb-occupancy-row-head {
  display: flex; justify-content: space-between; font-size: calc(12px * var(--fs)); margin-bottom: 4px;
}
.lb-occupancy-label { font-weight: 700; color: var(--lb-green-soft); }
.lb-occupancy-pct { color: var(--lb-muted); font-weight: 600; }
.lb-occupancy-track {
  height: 7px; border-radius: 6px; background: rgba(140,120,60,0.1); overflow: hidden;
}
.lb-occupancy-fill { height: 100%; border-radius: 6px; }

/* ============ MENU FIXO · LIQUID GLASS (metas) ============ */
.lb-topbar {
  position: sticky; top: 10px; z-index: 60;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 22px;
  /* Liquid glass NEUTRO: saturate() < 100% DESSATURA a cor da página que passa por
     baixo (mata o bege), + véu branco translúcido. Sem nenhum tint colorido. */
  background: linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.26));
  backdrop-filter: blur(28px) saturate(45%) brightness(1.04);
  -webkit-backdrop-filter: blur(28px) saturate(45%) brightness(1.04);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.75);
}
:root[data-theme="dark"] .lb-topbar {
  /* Liquid glass NEUTRO escuro: sem âmbar. saturate() < 100% dessatura o calor da
     página atrás (fica cinza/neutro), véu branco translúcido de leve. */
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.035));
  backdrop-filter: blur(28px) saturate(50%) brightness(1.08);
  -webkit-backdrop-filter: blur(28px) saturate(50%) brightness(1.08);
  border-color: rgba(255,255,255,0.24);
  box-shadow:
    0 18px 50px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.22);
}
.lb-topbar-title {
  flex: 0 0 auto; font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 13.5px;
  letter-spacing: 0.6px; color: #2B2A1E; cursor: pointer; white-space: nowrap;
  padding: 7px 13px; border-radius: 13px; border: 1px solid rgba(255,255,255,0.6);
  background: linear-gradient(135deg, #FFF9EC 0%, #FFB347 55%, #E28D00 100%); /* champanhe da ORB */
  box-shadow: 0 4px 12px rgba(226,141,0,0.28), inset 0 1px 0 rgba(255,255,255,0.65);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.lb-topbar-title:hover { filter: brightness(1.05); }
.lb-topbar-title:active { transform: scale(0.97); }
/* Letreiro de aeroporto (motor em JS): passa sozinho, mas dá pra ARRASTAR
   pro lado pra achar a meta; um toque abre a edição. */
.lb-goals {
  flex: 1 1 240px; min-width: 0; overflow: hidden; padding: 2px; position: relative;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.lb-goals:active { cursor: grabbing; }
.lb-ticker-track {
  display: inline-flex; align-items: center; width: max-content;
  will-change: transform; backface-visibility: hidden; transform: translateZ(0);
}
.lb-ticker-seq { display: inline-flex; align-items: center; flex: 0 0 auto; }
.lb-ticker-sep {
  flex: 0 0 auto; margin: 0 12px; color: var(--lb-gold-mid); font-size: 12px; opacity: 0.75;
}
.lb-goal {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  padding: 5px 12px 5px 6px; border-radius: 16px;
  background: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 3px 10px rgba(120,95,20,0.06);
}
:root[data-theme="dark"] .lb-goal {
  background: rgba(255,249,236,0.88);
  border-color: rgba(255,255,255,0.36);
  box-shadow: 0 6px 18px rgba(0,0,0,0.20);
}
.lb-gauge { flex: 0 0 auto; display: block; }
.lb-goal-info { display: flex; flex-direction: column; line-height: 1.2; }
.lb-goal-name { font-size: 11px; font-weight: 700; color: var(--lb-green-soft); white-space: nowrap; }
.lb-goal-nums { font-size: 11px; font-weight: 600; color: var(--lb-muted); white-space: nowrap; margin-top: 1px; }
.lb-goal-atual { font-weight: 800; color: var(--lb-green-deep); }
:root[data-theme="dark"] .lb-goal-name { color: #4B4B4B; }
:root[data-theme="dark"] .lb-goal-nums { color: #7B735F; }
:root[data-theme="dark"] .lb-goal-atual { color: #303030; }
:root[data-theme="dark"] .lb-goal-meta { color: #9A6500; }
.lb-goal-sep { margin: 0 3px; opacity: 0.6; }
.lb-goal-meta {
  font-weight: 800; color: var(--lb-gold-deep); cursor: pointer;
  border-bottom: 1px dashed rgba(165,102,0,0.50); padding-bottom: 1px;
}
.lb-goal-meta:hover { color: var(--lb-gold-mid); }
.lb-goal-input {
  width: 66px; font-size: 11px; font-weight: 800; font-family: inherit;
  border: 1px solid var(--lb-gold-mid); border-radius: 6px; padding: 1px 4px;
  color: var(--lb-green-deep); background: #fff;
}

.lb-goal { cursor: pointer; }  /* sem hover/transition no letreiro — evita repintar e "agarrar" */

/* ============ POPUP · LIQUID GLASS (definir meta) ============ */
.lb-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(40,35,20,0.20);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: lbFade 0.18s ease;
}
.lb-modal-overlay[hidden] { display: none; }
.lb-modal {
  width: min(300px, 86vw); padding: 22px 22px 18px; border-radius: 24px; text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.30), rgba(255,255,255,0.12));
  backdrop-filter: blur(34px) saturate(190%); -webkit-backdrop-filter: blur(34px) saturate(190%);
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 28px 64px rgba(120,95,20,0.30), inset 0 1px 0 rgba(255,255,255,0.8);
  animation: lbPop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
:root[data-theme="dark"] .lb-modal {
  background: linear-gradient(180deg, rgba(74,44,0,0.82), rgba(74,44,0,0.60));
  border-color: rgba(255,179,71,0.24);
  box-shadow: 0 28px 64px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.10);
}
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbPop { from { opacity: 0; transform: scale(0.94) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.lb-modal-title {
  font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--lb-green-deep);
}
.lb-modal-sub {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 14px;
  color: var(--lb-muted); margin-top: 2px; margin-bottom: 14px;
}
.lb-modal-input {
  width: 100%; text-align: center; font-family: 'Marcellus', serif; font-size: 26px;
  color: var(--lb-green-deep); background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8); border-radius: 14px; padding: 10px 12px;
  box-shadow: inset 0 1px 4px rgba(120,95,20,0.08); outline: none;
}
:root[data-theme="dark"] .lb-modal-input,
:root[data-theme="dark"] .lb-metas-input {
  color: #FFF9EC;
  background: rgba(18,13,8,0.34);
  border-color: rgba(255,179,71,0.22);
}
.lb-modal-input:focus { border-color: var(--lb-gold-mid); box-shadow: 0 0 0 3px rgba(226,141,0,0.25); }
.lb-modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.lb-modal-btn {
  flex: 1; padding: 11px 12px; border-radius: 14px; font-family: 'Manrope', sans-serif;
  font-size: 13.5px; font-weight: 700; cursor: pointer; border: 1px solid transparent;
  transition: filter 0.15s ease;
}
.lb-modal-btn:hover { filter: brightness(1.04); }
.lb-modal-cancel {
  background: rgba(255,255,255,0.45); border-color: rgba(255,255,255,0.7); color: var(--lb-green-soft);
}
.lb-modal-save {
  background: linear-gradient(90deg, #E28D00, #F2B300); color: #2B2A1E;
  box-shadow: 0 6px 16px rgba(226,141,0,0.30);
}

/* Painel com TODAS as metas */
.lb-modal-all { width: min(350px, 90vw); }
.lb-metas-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 2px; text-align: left; }
.lb-metas-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lb-metas-row label { font-size: 13.5px; font-weight: 700; color: var(--lb-green-soft); }
.lb-metas-input {
  width: 116px; text-align: center; font-family: 'Marcellus', serif; font-size: 18px;
  color: var(--lb-green-deep); background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8); border-radius: 10px; padding: 6px 8px; outline: none;
}
.lb-metas-input:focus { border-color: var(--lb-gold-mid); box-shadow: 0 0 0 3px rgba(226,141,0,0.25); }

/* ============ TOGGLE Operacional / Financeiro (mesmo estilo do METAS) ============ */
.lb-viewbtn {
  flex: 0 0 auto; font-family: 'Manrope', sans-serif; font-weight: 800;
  font-size: 13px; letter-spacing: 0.4px; cursor: pointer; white-space: nowrap;
  padding: 7px 14px; border-radius: 13px; border: 1px solid rgba(255,255,255,0.6);
  color: var(--lb-gold-deep); background: rgba(255,255,255,0.42);
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.lb-viewbtn:active { transform: scale(0.97); }
.lb-viewbtn.is-active {
  color: #2B2A1E;
  background: linear-gradient(135deg, #FFF9EC 0%, #FFB347 55%, #E28D00 100%);
  box-shadow: 0 4px 12px rgba(226,141,0,0.28), inset 0 1px 0 rgba(255,255,255,0.65);
}

/* ============ RODAPÉ (padrão MaestryAI · champanhe/glass) ============ */
.lb-footer {
  margin-top: 40px; padding: 26px 28px 20px; border-radius: 22px;
  background: var(--lb-glass);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--lb-glass-border);
  box-shadow: var(--lb-shadow);
}
.lb-footer-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.lb-footer-brand { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lb-footer-logo {
  font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 19px;
  color: var(--lb-green-deep); letter-spacing: 0.3px;
}
.lb-footer-logo span { color: var(--lb-gold-deep); }
.lb-footer-tagline {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: calc(14px * var(--fs)); color: var(--lb-muted);
}
.lb-footer-contact { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.lb-footer-owner { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 12.5px; letter-spacing: 0.5px; color: var(--lb-green-soft); }
.lb-footer-site { font-size: 12.5px; color: var(--lb-muted); }
.lb-footer-phone {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 14px; text-decoration: none;
  font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 13.5px; color: #2B2A1E;
  border: 1px solid rgba(255,255,255,0.6);
  background: linear-gradient(135deg, #FFF9EC 0%, #FFB347 55%, #E28D00 100%);
  box-shadow: 0 4px 12px rgba(226,141,0,0.28), inset 0 1px 0 rgba(255,255,255,0.65);
  transition: filter 0.15s ease, transform 0.1s ease;
}
:root[data-theme="dark"] .lb-chip,
:root[data-theme="dark"] .lb-icon-btn {
  background: rgba(74,44,0,0.70);
  border-color: rgba(255,179,71,0.22);
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}
:root[data-theme="dark"] .lb-icon-btn { color: #FFB347; }
.lb-footer-phone:hover { filter: brightness(1.05); }
.lb-footer-phone:active { transform: scale(0.98); }
.lb-footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(165,102,0,0.18);
  font-size: 11.5px; color: var(--lb-muted); letter-spacing: 0.3px;
}
/* No mobile o rodapé empilha TUDO alinhado à esquerda (no desktop fica lado a lado). */
@media (max-width: 720px) {
  .lb-footer { padding: 22px 20px 18px; }
  .lb-footer-main { flex-direction: column; align-items: flex-start; gap: 16px; }
  .lb-footer-contact { align-items: flex-start; text-align: left; }
  .lb-footer-bottom { flex-direction: column; gap: 6px; }
}

/* ============ Faturamento por Dia (barras empilhadas) ============ */
.lb-fatdia {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; height: 158px;
}
.lb-fatdia-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; height: 100%; }
.lb-fatdia-val { font-family: 'Marcellus', serif; font-size: 11px; color: var(--lb-green-deep); line-height: 1; }
.lb-fatdia-bar {
  width: 62%; max-width: 34px; border-radius: 6px 6px 0 0; overflow: hidden;
  display: flex; flex-direction: column-reverse; box-shadow: 0 2px 6px rgba(120,95,20,0.12);
  background: rgba(140,120,60,0.08);
}
.lb-fatdia-seg { width: 100%; }
.lb-fatdia-day { font-size: calc(11px * var(--fs)); font-weight: 700; color: var(--lb-muted); }
.lb-fatdia-legend { display: flex; gap: 16px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.lb-fatdia-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--lb-green-soft); }
.lb-fatdia-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ============ TEXTURA BRILHOSA no topo das seções ============ */
.lb-card, .lb-kpi, .lb-agent { position: relative; }
.lb-card::before, .lb-kpi::before, .lb-agent::before {
  content: ""; position: absolute; top: 0; left: 8px; right: 8px; height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg,
    #8C6A1F 0%, #C89A3C 14%, #FBEFC9 32%, #E4B43A 50%, #FBEFC9 68%, #C89A3C 86%, #8C6A1F 100%);
  box-shadow: 0 1px 7px rgba(228,180,58,0.48);
  pointer-events: none;
}

/* ============ COCKPIT MAESTRYAI · 7 CONTADORES (import Claude Design) ============
   Portado 1:1 do componente aprovado pelo Moa para HTML/CSS/JS vanilla.
   Os tokens abaixo são LOCAIS do cockpit (não conflitam com os --lb-* da dash)
   e trocam sozinhos no modo escuro via :root[data-theme="dark"].
   A geometria dos SVGs e as animações de entrada ficam em app.js (initCockpit). */
.lb-cockpit {
  --card-bg: rgba(255,255,255,0.72);
  --card-border: rgba(255,255,255,0.92);
  --card-shadow: 0 12px 34px rgba(156,104,0,0.09);
  --card-blur: blur(20px) saturate(160%);
  --ink: #303030;
  --num: #2c2418;
  --label: #8a6a30;
  --gold: #E28D00;
  --chip-bg: #FFDCA3;
  --pill-bg: #FBEFC9;
  --pill-ink: #9A6500;
  --track: rgba(156,104,0,0.16);
  --ring-lit: #E29500;
  --ring-track: rgba(156,104,0,0.16);
  --ring-tick: rgba(156,104,0,0.30);
  --ring-frame: rgba(156,104,0,0.40);
  --ring-glow: rgba(226,141,0,0.38);
  --ring-metal-a: #8A5A12;
  --ring-metal-b: #E8A21C;
  --ring-metal-c: #FFC463;
  --ring-dash: rgba(120,80,10,0.55);
  --conv-empty: #4A2C00;
  --ribbon: linear-gradient(90deg,#8C6A1F 0%,#C89A3C 14%,#FBEFC9 32%,#E4B43A 50%,#FBEFC9 68%,#C89A3C 86%,#8C6A1F 100%);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
:root[data-theme="dark"] .lb-cockpit {
  --card-bg: rgba(12,9,5,0.78); /* obsidiana quente (era rgba(31,18,4,0.62)) */
  --card-border: rgba(255,179,71,0.28);
  --card-shadow: 0 20px 54px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.16), inset 0 -1px 0 rgba(255,179,71,0.08);
  --card-blur: blur(28px) saturate(190%) contrast(108%);
  --ink: #FFF9EC;
  --num: #FFF9EC;
  --label: #C89A3C;
  --gold: #FFB347;
  --chip-bg: rgba(255,179,71,0.16);
  --pill-bg: rgba(255,179,71,0.14);
  --pill-ink: #FFDCA3;
  --track: rgba(255,179,71,0.18);
  --ring-lit: #FFC463;
  --ring-track: rgba(255,179,71,0.15);
  --ring-tick: rgba(255,201,120,0.34);
  --ring-frame: rgba(255,201,120,0.46);
  --ring-glow: rgba(255,179,71,0.60);
  --ring-metal-a: #7A4E10;
  --ring-metal-b: #FFB347;
  --ring-metal-c: #FFD98A;
  --ring-dash: rgba(243,230,207,0.82);
  --conv-empty: rgba(255,220,163,0.20);
}
/* Fita dourada no topo de cada widget (o style-before do Claude Design vira ::before real) */
.lb-cockpit [data-widget] { position: relative; }
.lb-cockpit [data-widget]::before {
  content: ""; position: absolute; top: 0; left: 8px; right: 8px; height: 4px;
  border-radius: 0 0 999px 999px;
  background: var(--ribbon);
  box-shadow: 0 1px 7px rgba(228,180,58,0.48);
  pointer-events: none;
}
/* Taxa de Conversão — base HUD larga (2 colunas): dial metálico + barra de LEDs */
.lb-cockpit [data-widget="1"] { grid-column: span 2; }
.lb-conv [data-g1-bars] rect[data-bar] { filter: drop-shadow(0 0 2px var(--ring-glow)); }
.lb-conv [data-g1-dots] [data-dot-lit] { filter: drop-shadow(0 0 3px var(--ring-glow)); animation: convDots 1.4s ease-in-out infinite; }
@keyframes convDots { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* Intensidade por Hora — torres 3D crescem da base no reveal */
.lb-cockpit [data-tower] { transform-box: fill-box; transform-origin: center bottom; }

/* Anel da Meta — glow dos blocos acesos + respiração suave (estilo HUD) */
.lb-ring3 [data-g3-seg] { filter: drop-shadow(0 0 2.5px var(--ring-glow)); animation: ringBreath 3.8s ease-in-out infinite; }
.lb-ring3 [data-g3-dash] { animation: ringSpin 48s linear infinite; transform-origin: 110px 110px; }
@keyframes ringBreath { 0%,100% { filter: drop-shadow(0 0 2px var(--ring-glow)); } 50% { filter: drop-shadow(0 0 7px var(--ring-glow)); } }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes ecgScroll { from { transform: translateX(0); } to { transform: translateX(-70px); } }
@keyframes softPulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes liveBlink { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@media (max-width: 720px) {
  .lb-cockpit { grid-template-columns: 1fr; justify-items: center; }
  .lb-cockpit [data-widget] { max-width: 360px; width: 100%; }
  .lb-cockpit [data-widget="1"] { grid-column: auto; max-width: 360px; }
}

/* ================= REDUZIR MOVIMENTO (acessibilidade) ================= */
@media (prefers-reduced-motion: reduce) {
  .lb-orb, .lb-orb::before, .lb-orb::after, .lb-orb-ring, .lb-orb-core, .lb-orb-core svg,
  .lb-ring3 [data-g3-seg], .lb-ring3 [data-g3-dash], .lb-conv [data-g1-dots],
  .lb-week-activity-card.is-playing .lb-activity-cell.is-active {
    animation: none !important;
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
  .lb-layout { grid-template-columns: 1fr; }
  /* No celular, o bloco da agente IA (sidebar) sobe pra ser o PRIMEIRO */
  .lb-sidebar { position: static; order: -1; }
  /* ORB some na view Financeiro SÓ no mobile; no desktop ela fica nas duas. */
  body[data-view="financeiro"] .lb-orb-card { display: none; }
  body[data-view="financeiro"] .lb-mf-card { display: none; }
}
@media (max-width: 720px) {
  :root { --fs: 1.08; }
  .lb-two-col { grid-template-columns: 1fr; }
  .lb-revenue { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .lb-revenue-list { width: 100%; }
  .lb-mf-card { min-height: 520px; }
  .lb-mf-head { grid-template-columns: 46px minmax(0, 1fr) 56px; gap: 9px; }
  .lb-mf-icon { width: 42px; height: 42px; border-radius: 15px; }
  .lb-mf-title { font-size: 14px; letter-spacing: 2.8px; }
  .lb-mf-sub { font-size: 12px; }
  .lb-mf-meta { min-width: 54px; padding: 7px 9px; border-radius: 16px; }
  .lb-mf-meta strong { font-size: 14px; }
  .lb-mf-stage { height: 330px; margin: 24px -14px 8px; }
  .lb-mf-row { left: 7%; gap: 11px; }
  .lb-mf-row span { font-size: 11px; letter-spacing: 3px; }
  .lb-mf-row b { font-size: 29px; }
  .lb-mf-chips { gap: 8px; }
  .lb-mf-chips span { padding: 8px 10px; font-size: 11.5px; }
  .lb-week-activity-card { min-height: auto; }
  .lb-activity-head { gap: 12px; }
  .lb-activity-titlebox { gap: 11px; }
  .lb-activity-icon { width: 42px; height: 42px; }
  .lb-activity-title { font-size: 12.5px; letter-spacing: 0.22em; }
  .lb-activity-period { margin-top: 8px; font-size: 9.5px; letter-spacing: 0.18em; }
  .lb-activity-total strong { font-size: 42px; }
  .lb-activity-legend { gap: 10px; margin: 18px 0 16px; }
  .lb-activity-legend span { font-size: 10.5px; }
  .lb-activity-frame { padding: 18px 12px 14px; border-radius: 20px; }
  .lb-activity-grid { gap: 7px; grid-template-columns: repeat(7, minmax(34px, 1fr)); }
  .lb-activity-day { grid-template-rows: repeat(5, 30px) auto auto auto; gap: 6px; }
  .lb-activity-cell { border-radius: 10px; }
  .lb-activity-cell.is-current::after { top: 6px; right: 6px; width: 7px; height: 7px; }
  .lb-activity-day-label { font-size: 9px; letter-spacing: 0.04em; }
  .lb-activity-date { font-size: 8.5px; }
  .lb-activity-count { font-size: 13px; }
  .lb-activity-footer { margin-top: 16px; padding-top: 14px; }
  /* Topo mais enxuto no celular (empresária vê pelo 📲) */
  .lb-brand { gap: 11px; }
  .lb-logo { height: 33px; }
  .lb-brand-divider { height: 28px; }
  .lb-brand-titlerow { gap: 7px; }
  .lb-brand-title { font-size: 16.5px; }
  .lb-brand-sub { font-size: 12.5px; }
  .lb-header-actions { gap: 8px; flex-wrap: wrap; }
  .lb-theme-btn { font-size: 10.5px; letter-spacing: 0.2px; padding: 6px 9px; }
  .lb-topbar { top: 6px; gap: 8px; padding: 7px 9px;
    backdrop-filter: blur(14px) saturate(170%); -webkit-backdrop-filter: blur(14px) saturate(170%); }
  .lb-topbar-title { font-size: 10.5px; letter-spacing: 0.25px; padding: 5px 8px; }
  .lb-viewbtn { font-size: 10.5px; letter-spacing: 0.2px; padding: 5px 9px; }
}
