/* ===========================
   03B. PULSE360
=========================== */
#pulse360 {
  padding: 118px 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(107,31,184,0.12), transparent 28%),
    radial-gradient(circle at 88% 70%, rgba(255,107,26,0.12), transparent 30%),
    #0f0f12;
  color: #f0eff8;
  overflow: hidden;
}

.pulse360-copy {
  max-width: 780px;
  margin-bottom: 42px;
}
.pulse360-copy .section-title { color: #fff; }
.pulse360-copy .section-sub { color: rgba(240,239,248,0.68); max-width: 720px; }

.pulse360-shell {
  position: relative;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)),
    rgba(15,15,18,0.94);
  box-shadow: 0 34px 110px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.09);
  overflow: hidden;
}
.pulse360-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.58;
  pointer-events: none;
}
.pulse360-shell > :not(.pulse360-particles) {
  position: relative;
  z-index: 1;
}

.pulse360-topbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  background: rgba(22,22,27,0.7);
}
.pulse360-brand img { height: 31px; width: auto; }
.pulse360-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pulse360-nav::-webkit-scrollbar { display: none; }
.pulse360-tab,
.pulse360-lang,
.pulse360-prompts button {
  font: inherit;
  border: 0;
  cursor: pointer;
}
.pulse360-tab {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  color: rgba(240,239,248,0.48);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.pulse360-tab:hover,
.pulse360-tab.active {
  background: rgba(124,58,237,0.18);
  color: #fff;
}
.pulse360-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pulse360-lang {
  width: 34px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(240,239,248,0.55);
  font-size: 11px;
  font-weight: 800;
}
.pulse360-lang.active {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #f59e0b);
}
.pulse360-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-left: 4px;
  background: linear-gradient(135deg, #7c3aed, #f59e0b);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.pulse360-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 680px;
}
.pulse360-dashboard {
  min-width: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}
.pulse360-summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 22px;
  border-right: 1px solid rgba(255,255,255,0.09);
  background:
    linear-gradient(180deg, rgba(124,58,237,0.1), transparent 38%),
    rgba(12,12,15,0.58);
}
.pulse360-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  color: rgba(240,239,248,0.62);
  font-size: 12px;
  font-weight: 700;
}
.pulse360-live span,
.pulse360-ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 6px rgba(16,185,129,0.12);
}
.pulse360-summary h3 {
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.pulse360-summary p {
  color: rgba(240,239,248,0.58);
  font-size: 14px;
  line-height: 1.55;
}
.pulse360-health span {
  display: block;
  color: rgba(240,239,248,0.46);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pulse360-health strong {
  display: block;
  font-size: 38px;
  letter-spacing: -0.05em;
  margin-bottom: 12px;
}
.pulse360-meter {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.pulse360-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #f59e0b);
  transition: width 0.35s var(--ease-out);
}

.pulse360-workspace {
  min-width: 0;
  padding: 18px;
}
.pulse360-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.pulse360-kpi,
.pulse360-chart-card,
.pulse360-channel-card,
.pulse360-table-card,
.pulse360-flow-card {
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 12px;
  background: rgba(22,22,27,0.76);
  box-shadow: 0 10px 34px rgba(0,0,0,0.24);
}
.pulse360-kpi {
  position: relative;
  padding: 15px;
  overflow: hidden;
}
.pulse360-kpi::after {
  content: "";
  position: absolute;
  top: -34px;
  right: -28px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.18), transparent 68%);
}
.pulse360-kpi span,
.pulse360-card-head span {
  display: block;
  color: rgba(240,239,248,0.44);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pulse360-kpi strong {
  display: block;
  margin: 10px 0 7px;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.pulse360-kpi small {
  display: block;
  font-size: 11px;
  font-weight: 700;
}
.pulse360-kpi .positive { color: #10b981; }
.pulse360-kpi .warning { color: #f59e0b; }
.pulse360-kpi svg {
  width: 76px;
  height: 25px;
  margin-top: 10px;
}
.pulse360-kpi polyline {
  fill: none;
  stroke: #9d5cf7;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pulse360-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.75fr);
  gap: 12px;
  margin-bottom: 12px;
}
.pulse360-chart-card,
.pulse360-channel-card,
.pulse360-table-card,
.pulse360-flow-card {
  padding: 16px;
}
.pulse360-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.pulse360-card-head h4,
.pulse360-sofia-head h3 {
  font-size: 16px;
  line-height: 1.15;
  margin-top: 4px;
  color: #fff;
}
.pulse360-card-head strong {
  color: #fff;
  font-size: 22px;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.pulse360-line-chart {
  width: 100%;
  min-height: 184px;
  display: block;
}
.pulse360-line-chart .axis {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 1.5;
}
.pulse360-line-chart .area {
  fill: url(#pulseArea);
  stroke: none;
}
.pulse360-line-chart .line {
  fill: none;
  stroke: url(#pulseLine);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pulse360-line-chart .line.muted {
  stroke: #f59e0b;
  stroke-width: 2;
  stroke-dasharray: 7 7;
  opacity: 0.46;
}
.pulse360-line-chart circle {
  fill: #f59e0b;
  stroke: #111116;
  stroke-width: 4;
}
.pulse360-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  color: rgba(240,239,248,0.34);
  font-size: 10px;
  font-weight: 700;
}
.pulse360-donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 190px;
}
.pulse360-donut {
  width: 118px;
  height: 118px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(#7c3aed 0 45%, #9d5cf7 45% 75%, #f59e0b 75% 93%, #fb923c 93% 100%);
  position: relative;
}
.pulse360-donut::before {
  content: "45%";
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #16161b;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.pulse360-legend {
  display: grid;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.pulse360-legend span {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
  color: rgba(240,239,248,0.64);
  font-size: 12px;
}
.pulse360-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.pulse360-legend b { color: #fff; }

.pulse360-bottom {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
}
.pulse360-bars {
  height: 132px;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  align-items: end;
  gap: 6px;
  padding: 18px 10px 6px;
}
.pulse360-bars span,
.pulse360-bars i {
  display: block;
  height: var(--h);
  min-height: 18px;
  border-radius: 4px 4px 1px 1px;
}
.pulse360-bars span {
  background: linear-gradient(180deg, #8b3ff4, rgba(124,58,237,0.58));
}
.pulse360-bars i {
  background: linear-gradient(180deg, #f59e0b, rgba(245,158,11,0.58));
}
.pulse360-bars-legend {
  display: flex;
  gap: 16px;
  color: rgba(240,239,248,0.48);
  font-size: 12px;
  font-weight: 700;
}
.pulse360-bars-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.pulse360-bars-legend span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #8b3ff4;
}
.pulse360-bars-legend span:nth-child(2)::before {
  background: #f59e0b;
}
.pulse360-table {
  display: grid;
  gap: 0;
}
.pulse360-table [role="row"] {
  display: grid;
  grid-template-columns: 1.4fr 1.3fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(240,239,248,0.7);
  font-size: 12px;
}
.pulse360-table [role="row"]:first-child {
  color: rgba(240,239,248,0.38);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.pulse360-table [role="row"]:last-child { border-bottom: 0; }
.pulse360-table em {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.pulse360-table .done {
  color: #10b981;
  background: rgba(16,185,129,0.12);
}
.pulse360-table .process {
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
}
.pulse360-sofia {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.1);
  background:
    linear-gradient(180deg, rgba(124,58,237,0.12), transparent 30%),
    rgba(10,10,14,0.72);
}
.pulse360-sofia-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 8px;
}
.pulse360-sofia-orb {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #8b3ff4, #f59e0b);
  box-shadow: 0 0 0 8px rgba(124,58,237,0.1), 0 18px 40px rgba(124,58,237,0.28);
}
.pulse360-sofia-orb svg {
  width: 23px;
  height: 23px;
}
.pulse360-sofia-head h3 {
  font-size: 20px;
  margin: 0 0 4px;
  letter-spacing: -0.03em;
}
.pulse360-sofia-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-size: 12px;
  font-weight: 800;
}
.pulse360-sofia-head i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}
.pulse360-sofia-sub {
  padding: 0 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  color: rgba(240,239,248,0.48);
  font-size: 13px;
}
.pulse360-chat {
  flex: 1;
  min-height: 260px;
  max-height: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px;
}
.pulse360-chat p {
  max-width: 94%;
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(240,239,248,0.72);
  font-size: 13px;
  line-height: 1.55;
}
.pulse360-chat p.user {
  align-self: flex-end;
  margin-left: 26px;
  background: rgba(124,58,237,0.2);
  color: #fff;
}
.pulse360-chat p.typing {
  width: fit-content;
  min-width: 128px;
}
.pulse360-chat strong { color: #fff; }
.pulse360-writing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  transform: translateY(1px);
}
.pulse360-writing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(240,239,248,0.76);
  animation: pulse360-writing-dot 1s ease-in-out infinite;
}
.pulse360-writing i:nth-child(2) { animation-delay: 0.14s; }
.pulse360-writing i:nth-child(3) { animation-delay: 0.28s; }
@keyframes pulse360-writing-dot {
  0%, 80%, 100% { opacity: 0.28; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.pulse360-prompts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 10px 20px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.09);
}
.pulse360-prompts button {
  min-width: 0;
  border-radius: 8px;
  padding: 8px 6px;
  background: rgba(255,255,255,0.07);
  color: rgba(240,239,248,0.72);
  font-size: 11px;
  font-weight: 800;
}
.pulse360-prompts button:hover {
  color: #fff;
  background: rgba(245,158,11,0.18);
}
.pulse360-prompts button:disabled,
.pulse360-sofia-input button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.pulse360-sofia-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 18px;
}
.pulse360-sofia-input span {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 12px 14px;
  color: rgba(240,239,248,0.54);
  background: rgba(255,255,255,0.055);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pulse360-sofia-input button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #8b3ff4, #a855f7);
}
.pulse360-powered {
  min-height: 46px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 8px 22px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(10,10,14,0.72);
  color: rgba(240,239,248,0.44);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.pulse360-powered img {
  height: 28px;
  width: auto;
}

@media (max-width: 1180px) {
  .pulse360-main { grid-template-columns: 1fr; }
  .pulse360-dashboard { grid-template-columns: 220px minmax(0, 1fr); }
  .pulse360-sofia {
    order: -1;
    border-left: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .pulse360-chat {
    min-height: 150px;
    max-height: 230px;
  }
  .pulse360-summary {
    border-right: 1px solid rgba(255,255,255,0.09);
  }
  .pulse360-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pulse360-panels,
  .pulse360-bottom { grid-template-columns: 1fr; }
  .pulse360-donut-wrap { min-height: auto; }
}

@media (max-width: 760px) {
  #pulse360 { padding: 84px 0; }
  .pulse360-topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
  }
  .pulse360-brand img { height: 28px; }
  .pulse360-nav {
    grid-column: 1 / -1;
    order: 3;
    padding-top: 2px;
  }
  .pulse360-actions { justify-self: end; }
  .pulse360-dashboard { grid-template-columns: 1fr; }
  .pulse360-summary {
    padding: 20px;
    display: grid;
    gap: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.09);
  }
  .pulse360-summary h3 { font-size: 22px; }
  .pulse360-live { margin-bottom: 16px; }
  .pulse360-workspace { padding: 12px; }
  .pulse360-kpis { grid-template-columns: 1fr; }
  .pulse360-donut-wrap { align-items: flex-start; }
  .pulse360-table {
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .pulse360-table [role="row"] {
    min-width: 560px;
  }
  .pulse360-months span:nth-child(2n) { display: none; }
  .pulse360-prompts { grid-template-columns: repeat(2, 1fr); }
  .pulse360-powered {
    justify-content: center;
    padding: 10px 14px;
  }
}

@media (max-width: 460px) {
  .pulse360-shell { border-radius: 12px; margin: 0 -8px; }
  .pulse360-actions { gap: 4px; }
  .pulse360-avatar { display: none; }
  .pulse360-tab { padding: 8px 10px; }
  .pulse360-card-head {
    flex-direction: column;
    gap: 6px;
  }
  .pulse360-donut-wrap {
    display: grid;
    justify-items: center;
  }
  .pulse360-legend { width: 100%; }
  .pulse360-line-chart { min-height: 150px; }
}
