/* RELOADER Weighing System Demo */

@import url('erp-demo.css');

body.store-body.page-weighing-demo {
  --erp-sidebar: #0a3560;
  --erp-sidebar-dark: #061f38;
  --erp-accent: #1565c0;
  --erp-accent-light: #42a5f5;
  --weigh-amber: #e65100;
  --weigh-amber-light: #ff9800;
}

/* Hero */
.weigh-demo-hero {
  position: relative;
  padding-top: 2rem;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(227, 242, 253, 0.95) 0%, rgba(255, 255, 255, 0.98) 50%, rgba(255, 243, 224, 0.45) 100%);
  border-bottom: 1px solid rgba(21, 101, 192, 0.1);
}

.weigh-hero-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.weigh-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
}

.weigh-hero-orb--1 {
  width: 300px;
  height: 300px;
  background: rgba(21, 101, 192, 0.25);
  top: -60px;
  right: 8%;
}

.weigh-hero-orb--2 {
  width: 240px;
  height: 240px;
  background: rgba(230, 81, 0, 0.15);
  bottom: -40px;
  left: 6%;
}

.weigh-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  position: relative;
  z-index: 1;
}

.weigh-demo-badge {
  background: rgba(21, 101, 192, 0.1);
  border-color: rgba(21, 101, 192, 0.22);
  color: var(--brand-primary-dark);
}

.weigh-demo-title {
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--navy);
  line-height: 1.2;
}

.weigh-title-gradient {
  display: block;
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #e65100 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.weigh-demo-lead {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 0 1.25rem;
  line-height: 1.75;
}

.weigh-tech-tags span {
  background: rgba(21, 101, 192, 0.07);
  border-color: rgba(21, 101, 192, 0.15);
}

.weigh-btn-primary {
  background: linear-gradient(135deg, #0d47a1, #1565c0) !important;
}

.weigh-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 1.75rem;
  max-width: 520px;
}

.weigh-hero-stat {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(21, 101, 192, 0.12);
  text-align: center;
  box-shadow: var(--shadow);
}

.weigh-hero-stat strong {
  display: block;
  font-size: 0.95rem;
  color: var(--brand-primary-dark);
}

.weigh-hero-stat span {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weigh-hero-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weigh-hero-shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(21, 101, 192, 0.15);
  box-shadow: var(--shadow-lg);
  background: #fff;
}

.weigh-hero-shot-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.weigh-hero-shot-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #0d47a1, #1565c0);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.weigh-hero-shot-caption img {
  height: 22px;
  filter: brightness(0) invert(1);
}

.scale-live-mock {
  background: linear-gradient(160deg, #061f38, #0a3560);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(66, 165, 245, 0.3);
  box-shadow: var(--shadow-lg);
  color: #fff;
}

.scale-live-label {
  font-size: 0.82rem;
  opacity: 0.85;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scale-live-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.scale-live-display strong {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #90caf9;
  line-height: 1;
}

.scale-live-unit {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
}

.scale-live-status {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.scale-live-status.is-pass {
  background: rgba(76, 175, 80, 0.25);
  color: #81c784;
  border: 1px solid rgba(129, 199, 132, 0.5);
}

.scale-live-status.is-hold {
  background: rgba(255, 152, 0, 0.2);
  color: #ffb74d;
  border: 1px solid rgba(255, 183, 77, 0.4);
}

.scale-live-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.scale-live-meta div {
  text-align: center;
  font-size: 0.75rem;
}

.scale-live-meta strong {
  display: block;
  font-size: 0.95rem;
  color: #e3f2fd;
}

.weigh-tare-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: #e65100;
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
}

.weigh-tare-btn:hover {
  background: #f57c00;
}

.weigh-module-list {
  list-style: none;
  margin: 0;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid rgba(21, 101, 192, 0.12);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
}

.weigh-module-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.weigh-module-list i {
  color: var(--brand-primary);
}

/* Workflow */
.weigh-flow-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(227, 242, 253, 0.4));
  border-bottom: 1px solid rgba(21, 101, 192, 0.08);
}

.weigh-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.weigh-flow-card {
  position: relative;
  padding: 1.35rem 1.2rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fff 0%, #f0f7ff 100%);
  border: 1px solid rgba(21, 101, 192, 0.12);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.weigh-flow-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.weigh-flow-num {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(21, 101, 192, 0.3);
}

.weigh-flow-card i {
  font-size: 1.5rem;
  color: var(--brand-primary);
  margin-bottom: 0.65rem;
  display: block;
}

.weigh-flow-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--navy);
}

.weigh-flow-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Demo app */
.weigh-demo-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, rgba(227, 242, 253, 0.9), rgba(255, 243, 224, 0.5));
  border: 1px solid rgba(21, 101, 192, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.page-weighing-demo .erp-chart-bar {
  background: linear-gradient(180deg, #42a5f5, #1565c0);
}

.page-weighing-demo .erp-progress > div {
  background: linear-gradient(90deg, #1565c0, #42a5f5);
}

.weigh-scale-panel {
  text-align: center;
  padding: 1.5rem;
}

.weigh-scale-big {
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand-primary-dark);
  font-variant-numeric: tabular-nums;
}

.weigh-scale-big span {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.weigh-stations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.weigh-station-card {
  padding: 14px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}

.weigh-station-card:hover,
.weigh-station-card.is-selected {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: 2px solid var(--brand-primary);
}

.weigh-station-card strong {
  display: block;
  font-size: 1rem;
  color: var(--navy);
}

.weigh-station-card small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.weigh-station-card.is-active-station {
  background: #e3f2fd;
  border-color: #90caf9;
}

.weigh-station-detail {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f0f7ff;
  border: 1px solid rgba(21, 101, 192, 0.12);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.weigh-recipe-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.weigh-recipe-row:last-child {
  border-bottom: none;
}

.weigh-recipe-row.is-done {
  background: #e8f5e9;
}

.weigh-recipe-row.is-active {
  background: #fff8e1;
}

.weigh-recipe-qty {
  margin-left: auto;
  font-weight: 700;
  color: var(--navy);
}

/* Simulator frame (existing) */
.weighing-demo-frame-section {
  padding-top: 0;
}

.weighing-demo-frame-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: #070d18;
}

.weighing-demo-frame {
  display: block;
  width: 100%;
  height: min(88vh, 920px);
  min-height: 560px;
  border: none;
  background: #070d18;
}

.weighing-demo-fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.weighing-demo-fullscreen:hover {
  background: var(--brand-primary);
  color: #fff;
}

.feature-grid a.feature-item {
  text-decoration: none;
  color: inherit;
}

@media (max-width: 1100px) {
  .weigh-hero-grid,
  .weigh-flow-grid {
    grid-template-columns: 1fr;
  }

  .weigh-hero-stats {
    max-width: none;
  }

  .weigh-stations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .weigh-flow-grid {
    grid-template-columns: 1fr;
  }

  .weigh-hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .weighing-demo-frame {
    height: 72vh;
    min-height: 480px;
  }
}

@media (max-width: 576px) {
  .weighing-demo-frame {
    height: 65vh;
    min-height: 420px;
  }
}
