/* RELOADER Warehouse WMS Demo */

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

body.store-body.page-warehouse-demo {
  --erp-sidebar: #145a42;
  --erp-sidebar-dark: #0c3d2e;
  --erp-accent: #2e7d5a;
  --erp-accent-light: #4caf88;
  --wms-green: #1a4d3e;
  --wms-teal: #2e7d5a;
}

/* Hero */
.wms-demo-hero {
  position: relative;
  padding-top: 2rem;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(232, 245, 233, 0.9) 0%, rgba(255, 255, 255, 0.95) 45%, rgba(227, 242, 253, 0.6) 100%);
  border-bottom: 1px solid rgba(46, 125, 90, 0.12);
}

.wms-hero-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.wms-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
}

.wms-hero-orb--1 {
  width: 320px;
  height: 320px;
  background: rgba(46, 125, 90, 0.35);
  top: -80px;
  right: 10%;
}

.wms-hero-orb--2 {
  width: 260px;
  height: 260px;
  background: rgba(21, 101, 192, 0.2);
  bottom: -60px;
  left: 5%;
}

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

.wms-demo-badge {
  background: rgba(46, 125, 90, 0.12);
  border-color: rgba(46, 125, 90, 0.25);
  color: var(--wms-green);
}

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

.wms-title-gradient {
  display: block;
  background: linear-gradient(135deg, #1a4d3e 0%, #2e7d5a 45%, #1565c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.wms-tech-tags span {
  background: rgba(46, 125, 90, 0.08);
  border-color: rgba(46, 125, 90, 0.18);
  color: #1b5e40;
}

.wms-btn-primary {
  background: linear-gradient(135deg, #1a4d3e, #2e7d5a) !important;
  border-color: transparent !important;
}

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

.wms-hero-stat {
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(46, 125, 90, 0.15);
  text-align: center;
  box-shadow: var(--shadow);
}

.wms-hero-stat strong {
  display: block;
  font-size: 1rem;
  color: var(--wms-green);
}

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

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

.wms-hero-shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(46, 125, 90, 0.2);
  box-shadow: var(--shadow-lg);
  background: #fff;
}

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

.wms-hero-shot-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #1a4d3e, #2e7d5a);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.wms-pda-mock {
  background: linear-gradient(160deg, #0c3d2e, #145a42);
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  border: 1px solid rgba(76, 175, 136, 0.35);
  box-shadow: var(--shadow-lg);
}

.wms-pda-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 12px;
  opacity: 0.9;
}

.wms-pda-scan {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(76, 175, 136, 0.5);
  margin-bottom: 12px;
}

.wms-pda-scan i {
  font-size: 1.6rem;
  color: #4caf88;
}

.wms-pda-scan code {
  font-size: 0.85rem;
  color: #e8f5e9;
}

.wms-pda-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.wms-pda-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wms-pda-ok {
  color: #81c784;
}

.wms-pda-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: #4caf88;
  color: #0c3d2e;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.wms-pda-btn:hover {
  background: #66bb6a;
}

.wms-pda-btn.is-scanning {
  animation: wmsScanPulse 0.6s ease;
}

@keyframes wmsScanPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.98); background: #81c784; }
}

.wms-module-list {
  list-style: none;
  margin: 0;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid rgba(46, 125, 90, 0.15);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
}

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

.wms-module-list i {
  color: var(--wms-teal);
}

/* Workflow */
.wms-flow-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(232, 245, 233, 0.35));
  border-bottom: 1px solid rgba(46, 125, 90, 0.08);
}

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

.wms-flow-card {
  position: relative;
  padding: 1.35rem 1.2rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fff 0%, #f1f8f4 100%);
  border: 1px solid rgba(46, 125, 90, 0.14);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.wms-flow-num {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(46, 125, 90, 0.35);
}

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

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

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

/* Demo app tweaks */
.wms-demo-note {
  background: linear-gradient(90deg, rgba(232, 245, 233, 0.9), rgba(227, 242, 253, 0.7));
  border-color: rgba(46, 125, 90, 0.2);
}

.page-warehouse-demo .erp-progress > div {
  background: linear-gradient(90deg, #2e7d5a, #4caf88);
}

.page-warehouse-demo .erp-chart-bar {
  background: linear-gradient(180deg, #4caf88, #2e7d5a);
}

.live-dot-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wms-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wms-activity {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 0.82rem;
}

.wms-activity time {
  color: var(--text-muted);
  font-weight: 600;
}

.wms-activity code {
  display: block;
  font-size: 0.78rem;
  color: var(--wms-teal);
  margin-bottom: 2px;
}

.wms-activity--alert {
  background: #fff8e1;
  border-color: #ffe082;
}

.wms-activity--outbound {
  border-left: 3px solid #1565c0;
}

.wms-activity--inbound {
  border-left: 3px solid #2e7d5a;
}

.wms-zone-grid,
.wms-rack-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.wms-zone-cell,
.wms-rack-cell {
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 0.8rem;
  cursor: default;
  font-family: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}

.wms-rack-cell {
  cursor: pointer;
}

.wms-rack-cell:hover,
.wms-rack-cell.is-selected {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.wms-rack-cell.is-selected {
  outline: 2px solid var(--wms-teal);
}

.wms-zone-cell strong,
.wms-rack-cell strong {
  display: block;
  font-size: 1.1rem;
  color: var(--navy);
}

.wms-zone-cell--high,
.wms-rack-cell.wms-zone-cell--high {
  background: #e8f5e9;
  border-color: #a5d6a7;
}

.wms-zone-cell--mid,
.wms-rack-cell.wms-zone-cell--mid {
  background: #fff8e1;
  border-color: #ffe082;
}

.wms-zone-cell--low,
.wms-rack-cell.wms-zone-cell--low {
  background: #ffebee;
  border-color: #ef9a9a;
}

.wms-rack-detail {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f1f8f4;
  border: 1px solid rgba(46, 125, 90, 0.15);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.wms-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wms-pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.wms-pick-item code {
  font-size: 0.78rem;
  color: var(--erp-accent);
}

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

.wms-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #145a42;
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  animation: wmsToastIn 0.35s ease;
}

@keyframes wmsToastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

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

@media (max-width: 768px) {
  .wms-flow-grid,
  .wms-zone-grid,
  .wms-rack-map {
    grid-template-columns: repeat(2, 1fr);
  }

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