/* ==========================================================================
   NEW NAEEM BOOK DEPOT HASILPUR - POS & ERP SOFTWARE
   Dashboard Specific Stylesheet
   ========================================================================== */

.dash {
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(59,130,246,0.06), rgba(236,72,153,0.08));
  border-radius: 20px;
  padding: 18px;
  border: 1px solid var(--bd);
}

.dbn {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
}
.dbn img {
  height: 64px;
  width: auto;
  object-fit: contain;
}
.dbn .dbt {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--tx);
  letter-spacing: 0.5px;
}

/* 7-Days Sales Bar Chart */
.bars {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  height: 160px;
  padding-top: 14px;
}
.bars div {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--mu);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}
.bars span {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 4px;
}
.bars i {
  display: block;
  width: 75%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #f59e0b, #ef6c00);
  min-height: 4px;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.bars div:nth-child(2) i { background: linear-gradient(180deg, #10b981, #047857); }
.bars div:nth-child(3) i { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.bars div:nth-child(4) i { background: linear-gradient(180deg, #8b5cf6, #6d28d9); }
.bars div:nth-child(5) i { background: linear-gradient(180deg, #ec4899, #be185d); }
.bars div:nth-child(6) i { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.bars div:nth-child(7) i { background: linear-gradient(180deg, #14b8a6, #0f766e); }

/* Quick Action Buttons in Dashboard Top Bar */
.quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quick-actions a,
.quick-actions button {
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.quick-actions a:hover,
.quick-actions button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Colored Header Accents on Recent Lists */
.accent-blue { border-top: 4px solid #3b82f6; }
.accent-green { border-top: 4px solid #10b981; }
.accent-purple { border-top: 4px solid #8b5cf6; }
.accent-pink { border-top: 4px solid #ec4899; }
.accent-orange { border-top: 4px solid #f59e0b; }
.accent-teal { border-top: 4px solid #14b8a6; }

/* ═══════════════════════════════════════════════════════════════════════════
   SOLAR ENERGY SMART HUB ANIMATION (Dashboard Energy Telemetry System)
   ═══════════════════════════════════════════════════════════════════════════ */
.solar-dash-hub {
  background: radial-gradient(ellipse at 50% 0%, rgba(17, 34, 68, 0.95) 0%, rgba(8, 14, 28, 0.98) 70%, rgba(4, 7, 16, 0.99) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  padding: 16px 20px 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 40px rgba(245, 158, 11, 0.05);
  position: relative;
  overflow: hidden;
}

/* Background grid accent */
.solar-dash-hub::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Header bar inside the hub */
.sdh-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}

.sdh-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sdh-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

.sdh-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #f8fafc;
}

.sdh-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.sdh-summary-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sdh-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
}

.sdh-pill .lbl {
  color: #94a3b8;
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.5px;
}

.sdh-pill .val {
  font-weight: 800;
  letter-spacing: 0.5px;
}

.sdh-pill .val.green { color: #34d399; text-shadow: 0 0 8px rgba(52, 211, 153, 0.4); }
.sdh-pill .val.amber { color: #fbbf24; text-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.sdh-pill .val.blue { color: #60a5fa; text-shadow: 0 0 8px rgba(96, 165, 250, 0.4); }
.sdh-pill .val.purple { color: #c084fc; text-shadow: 0 0 8px rgba(192, 132, 252, 0.4); }

/* Ambient Floating Particles */
.sdh-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dp {
  position: absolute;
  border-radius: 50%;
  animation: floatParticle linear infinite;
}

.dp1 { width: 3px; height: 3px; background: rgba(245, 158, 11, 0.7); left: 15%; top: 70%; animation-duration: 5s; }
.dp2 { width: 4px; height: 4px; background: rgba(16, 185, 129, 0.6); left: 35%; top: 80%; animation-duration: 7s; animation-delay: 1s; }
.dp3 { width: 3px; height: 3px; background: rgba(59, 130, 246, 0.6); left: 60%; top: 75%; animation-duration: 6s; animation-delay: 2s; }
.dp4 { width: 4px; height: 4px; background: rgba(192, 132, 252, 0.7); left: 85%; top: 85%; animation-duration: 8s; animation-delay: 0.5s; }
.dp5 { width: 2px; height: 2px; background: rgba(251, 191, 36, 0.5); left: 25%; top: 90%; animation-duration: 6.5s; }
.dp6 { width: 3px; height: 3px; background: rgba(52, 211, 153, 0.5); left: 75%; top: 65%; animation-duration: 5.5s; }

@keyframes floatParticle {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { transform: translateY(-70px) scale(0.3); opacity: 0; }
}

/* ── STAGE & NODES LAYOUT ── */
.sdh-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 2;
  padding: 10px 0 6px;
}

.sdh-node {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
}

.sdh-node-meta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sdh-node-meta .title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #94a3b8;
}

.sdh-node-meta .stat {
  font-size: 13px;
  font-weight: 800;
}

.sdh-node-meta .stat.green { color: #34d399; text-shadow: 0 0 10px rgba(52, 211, 153, 0.5); }
.sdh-node-meta .stat.blue { color: #60a5fa; text-shadow: 0 0 10px rgba(96, 165, 250, 0.5); }
.sdh-node-meta .stat.amber { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
.sdh-node-meta .stat.purple { color: #c084fc; text-shadow: 0 0 10px rgba(192, 132, 252, 0.5); }

.sdh-node-meta .sub {
  font-size: 9px;
  color: #64748b;
  font-weight: 600;
}

/* ── NODE 1: MINI SUN & 3D SOLAR PANEL ── */
.sdh-node-pv {
  position: relative;
}

.sdh-sun-mini {
  position: absolute;
  top: -24px;
  right: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  animation: sunMiniSpin 12s linear infinite;
  z-index: 3;
}

.sdh-sun-glow {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 10%, #f59e0b 60%, #d97706 100%);
  box-shadow: 0 0 16px 4px rgba(245, 158, 11, 0.6);
  animation: sunGlowPulse 2s ease-in-out infinite;
}

.sdh-sun-rays {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(251, 191, 36, 0.6);
}

@keyframes sunMiniSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sdh-panel-stand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sdh-panel-3d {
  width: 95px;
  height: 64px;
  background: linear-gradient(135deg, #091b38 0%, #153268 45%, #0d2248 100%);
  border: 2px solid rgba(96, 165, 250, 0.4);
  border-radius: 6px;
  transform: perspective(250px) rotateX(16deg);
  box-shadow: 
    0 8px 18px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(59, 130, 246, 0.25),
    inset 0 0 10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s;
}

.sdh-panel-3d:hover {
  transform: perspective(250px) rotateX(10deg) scale(1.04);
}

.sdh-panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  padding: 4px;
  height: 100%;
  box-sizing: border-box;
}

.sdh-panel-grid span {
  background: rgba(30, 58, 138, 0.35);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 2px;
  animation: cellGlint 3s ease-in-out infinite;
}

.sdh-panel-grid span:nth-child(2) { animation-delay: 0.4s; }
.sdh-panel-grid span:nth-child(3) { animation-delay: 0.8s; }
.sdh-panel-grid span:nth-child(4) { animation-delay: 1.2s; }
.sdh-panel-grid span:nth-child(5) { animation-delay: 0.3s; }
.sdh-panel-grid span:nth-child(6) { animation-delay: 0.7s; }
.sdh-panel-grid span:nth-child(7) { animation-delay: 1.1s; }
.sdh-panel-grid span:nth-child(8) { animation-delay: 1.5s; }

@keyframes cellGlint {
  0%, 100% { background: rgba(30, 58, 138, 0.35); }
  50% { background: rgba(96, 165, 250, 0.5); box-shadow: inset 0 0 6px #60a5fa; }
}

.sdh-panel-sheen {
  position: absolute;
  top: -50%;
  left: -80%;
  width: 60%;
  height: 200%;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  animation: panelGleam 4s ease-in-out infinite;
}

@keyframes panelGleam {
  0% { left: -80%; }
  35%, 100% { left: 160%; }
}

.sdh-stand-leg {
  width: 5px;
  height: 14px;
  background: linear-gradient(to bottom, #475569, #1e293b);
  border-radius: 0 0 2px 2px;
}

/* ── NODE 2: HYBRID INVERTER ── */
.sdh-inv-box {
  width: 95px;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(96, 165, 250, 0.4);
  border-radius: 8px;
  padding: 6px 7px;
  box-shadow: 0 0 22px rgba(59, 130, 246, 0.2), inset 0 0 8px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sdh-inv-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-brand {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #60a5fa;
}

.inv-led-cluster {
  display: flex;
  gap: 3px;
}

.iled {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  animation: ledFlash 1.6s ease-in-out infinite;
}

.green-glow { background: #10b981; box-shadow: 0 0 5px #10b981; }
.amber-glow { background: #f59e0b; box-shadow: 0 0 5px #f59e0b; animation-delay: 0.8s; }

@keyframes ledFlash {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.sdh-inv-display {
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 4px;
  padding: 3px;
}

.inv-wave-box svg {
  width: 100%;
  height: 18px;
  display: block;
}

.sine-wave {
  fill: none;
  stroke: #34d399;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px #10b981);
  stroke-dasharray: 200;
  animation: waveScroll 2s linear infinite;
}

.inv-disp-metrics {
  display: flex;
  justify-content: space-between;
  font-size: 7.5px;
  color: #38bdf8;
  font-weight: 800;
  margin-top: 2px;
}

.sine-badge {
  color: #34d399;
  font-size: 7px;
}

.sdh-inv-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sdh-fan-spin {
  width: 16px;
  height: 16px;
  position: relative;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  animation: fanSpin 1.2s linear infinite;
}

.sdh-fan-spin i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 2px;
  background: #94a3b8;
  border-radius: 1px;
  transform-origin: left center;
}

.sdh-fan-spin i:nth-child(1) { transform: rotate(0deg) translateY(-50%); }
.sdh-fan-spin i:nth-child(2) { transform: rotate(90deg) translateY(-50%); }
.sdh-fan-spin i:nth-child(3) { transform: rotate(180deg) translateY(-50%); }
.sdh-fan-spin i:nth-child(4) { transform: rotate(270deg) translateY(-50%); }

.inv-eff {
  font-size: 7.5px;
  font-weight: 700;
  color: #94a3b8;
}

/* ── NODE 3: LITHIUM BATTERY STORAGE ── */
.sdh-bat-bank {
  display: flex;
  gap: 7px;
  align-items: flex-end;
}

.bat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bat-cap {
  width: 12px;
  height: 4px;
  background: #64748b;
  border-radius: 2px 2px 0 0;
}

.bat-shell {
  width: 32px;
  height: 60px;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(245, 158, 11, 0.5);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.bat-fluid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #d97706 0%, #f59e0b 60%, #fbbf24 100%);
  box-shadow: 0 -2px 8px rgba(251, 191, 36, 0.6);
  animation: fluidPulse 2.5s ease-in-out infinite;
}

@keyframes fluidPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); box-shadow: 0 -3px 12px rgba(251, 191, 36, 0.8); }
}

.bat-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  z-index: 2;
}

/* ── NODE 4: HOME LOAD / CAMPUS ── */
.sdh-house-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sh-roof {
  width: 0;
  height: 0;
  border-left: 36px solid transparent;
  border-right: 36px solid transparent;
  border-bottom: 24px solid #8b5cf6;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.sh-walls {
  width: 58px;
  height: 40px;
  background: rgba(30, 41, 59, 0.9);
  border: 1.5px solid rgba(139, 92, 246, 0.5);
  border-top: none;
  border-radius: 0 0 4px 4px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 5px;
  position: relative;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.sh-win-lit {
  width: 10px;
  height: 10px;
  background: #fef08a;
  border-radius: 2px;
  box-shadow: 0 0 8px #fef08a;
  animation: winGlow 2.5s ease-in-out infinite;
}

@keyframes winGlow {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 4px #fef08a; }
  50% { opacity: 1; box-shadow: 0 0 10px #fef08a; }
}

.sh-door {
  width: 12px;
  height: 18px;
  background: #475569;
  border-radius: 2px 2px 0 0;
  align-self: flex-end;
}

/* ── FLOW LINES (Dynamic Energy Wires) ── */
.sdh-flow {
  flex: 1 1 50px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
}

.sdh-flow svg {
  width: 100%;
  height: 24px;
}

.wire-track {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.wire-pulse {
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  animation: wireStream 1.2s linear infinite;
}

.green-pulse { stroke: #34d399; filter: drop-shadow(0 0 4px #10b981); }
.amber-pulse { stroke: #fbbf24; filter: drop-shadow(0 0 4px #f59e0b); }
.purple-pulse { stroke: #c084fc; filter: drop-shadow(0 0 4px #a855f7); }

@keyframes wireStream {
  from { stroke-dashoffset: 36; }
  to { stroke-dashoffset: 0; }
}

.wire-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  animation: dotMove 1.8s ease-in-out infinite;
}

.wdp1 { background: #34d399; box-shadow: 0 0 8px #34d399; }
.wdb1 { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; animation-delay: 0.5s; }
.wdl1 { background: #c084fc; box-shadow: 0 0 8px #c084fc; animation-delay: 0.9s; }

@keyframes dotMove {
  0% { left: 5%; opacity: 0; transform: translateY(-50%) scale(0.5); }
  25% { opacity: 1; transform: translateY(-50%) scale(1); }
  75% { opacity: 1; transform: translateY(-50%) scale(1); }
  100% { left: 90%; opacity: 0; transform: translateY(-50%) scale(0.5); }
}

.wire-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #64748b;
  margin-top: 2px;
  text-transform: uppercase;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .sdh-stage {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  .sdh-flow {
    display: none;
  }
}


