:root {
  --bg: #fff7f0;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #132238;
  --muted: #667085;
  --primary: #ff5722;
  --primary-dark: #e54817;
  --accent: #0f62fe;
  --border: rgba(19, 34, 56, 0.12);
  --shadow: 0 22px 55px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 87, 34, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(15, 98, 254, 0.10), transparent 28%),
    linear-gradient(180deg, #fffaf5 0%, #fff7f0 100%);
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
.navbar-brand,
.hero-title,
.detail-name,
.voucher-copy h2 {
  font-family: 'Space Grotesk', sans-serif;
}

a {
  text-decoration: none;
}

.shopee-nav {
  background: linear-gradient(135deg, #ff6a00 0%, #ff3d5a 100%);
}

.page-shell {
  min-height: calc(100vh - 72px);
}

.golden-hour-banner {
  background: linear-gradient(135deg, #ff2d55 0%, #ff7a18 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(255, 45, 85, 0.25);
  animation: goldenPulse 1.7s ease-in-out infinite;
}

.golden-hour-banner strong {
  position: relative;
  padding-left: 1.4rem;
}

.golden-hour-banner strong::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.75);
  animation: beacon 1.4s ease-out infinite;
}

.hero-section {
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 106, 0, 0.96), rgba(255, 61, 90, 0.92)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  pointer-events: none;
}

.hero-kicker,
.section-tag,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.02;
  font-weight: 800;
  max-width: 12ch;
  margin-top: 0.85rem;
}

.hero-text {
  color: rgba(255, 255, 255, 0.88);
  max-width: 58ch;
  font-size: 1.04rem;
}

.hero-card,
.detail-panel,
.cart-panel,
.summary-card,
.chart-card,
.scorecard,
.checkout-panel,
.info-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.hero-card {
  padding: 1.25rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero-stat {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-stat:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hero-stat span,
.scorecard-detail,
.product-desc,
.detail-desc,
.cart-meta,
.checkout-panel p,
.info-card,
.category-row span {
  color: var(--muted);
}

.hero-stat strong {
  display: block;
  font-size: 1.08rem;
  margin-top: 0.3rem;
}

.section-header,
.chart-header,
.admin-hero,
.detail-stats,
.summary-line,
.summary-total,
.checkout-summary > div,
.category-row,
.insight-box,
.feature-strip,
.cart-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.section-header,
.chart-header,
.admin-hero {
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2,
.chart-header h2,
.admin-hero h1 {
  margin: 0;
  font-weight: 800;
}

.category-pills,
.feature-strip,
.top-seller-grid,
.insight-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pill,
.admin-pill,
.chart-chip {
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
}

.btn-shopee {
  border-radius: 999px;
  padding: 0.82rem 1.3rem;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-shopee:hover {
  transform: translateY(-1px);
}

.btn-shopee-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(255, 87, 34, 0.22);
}

.btn-shopee-primary:hover {
  color: #fff;
  box-shadow: 0 18px 35px rgba(255, 87, 34, 0.28);
}

.btn-shopee-outline {
  background: transparent;
  border-color: rgba(255, 87, 34, 0.42);
  color: var(--primary-dark);
}

.btn-shopee-outline:hover {
  background: rgba(255, 87, 34, 0.08);
  color: var(--primary-dark);
  border-color: rgba(255, 87, 34, 0.65);
}

.btn-shopee-dark {
  background: var(--text);
  color: #fff;
}

.btn-shopee-dark:hover {
  color: #fff;
  background: #0b1727;
}

.btn-shopee-light {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}

.btn-shopee-light:hover {
  color: var(--text);
  background: #fff;
}

.btn-shopee-danger {
  background: #fff;
  border-color: rgba(225, 29, 72, 0.22);
  color: #e11d48;
}

.btn-shopee-danger:hover {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.34);
  color: #be123c;
}

.btn-shopee-wide {
  min-width: 150px;
}

.btn-shopee-block {
  width: 100%;
}

.btn-shopee-sm {
  padding: 0.55rem 0.92rem;
  font-size: 0.92rem;
}

.pill.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

.product-card,
.top-seller-card,
.recommendation-card {
  background: var(--surface-strong);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.product-card:hover,
.top-seller-card:hover,
.recommendation-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(31, 41, 55, 0.16);
}

.product-media,
.detail-media,
.top-seller-card {
  position: relative;
  color: #fff;
  display: block;
}

.product-media {
  min-height: 208px;
  padding: 1rem;
}

.product-badge,
.detail-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.product-id,
.detail-id,
.product-media-copy {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  font-weight: 800;
}

.product-media-copy {
  bottom: 1rem;
  left: auto;
  right: 1rem;
  text-align: right;
  opacity: 0.95;
}

.product-body {
  padding: 1rem 1rem 1.15rem;
}

.product-meta {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.product-title,
.detail-name,
.cart-info h3,
.checkout-panel h1 {
  margin: 0.4rem 0 0.7rem;
  font-weight: 800;
}

.product-title a,
.cart-info h3 a {
  color: var(--text);
}

.product-desc {
  min-height: 48px;
  margin: 0;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-top: 1rem;
}

.price,
.scorecard-value,
.info-value,
.summary-total strong,
.checkout-summary strong,
.detail-stats strong {
  font-size: 1.25rem;
  font-weight: 800;
}

.rating,
.sold {
  color: var(--muted);
  font-size: 0.92rem;
}

.top-seller-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.top-seller-card {
  min-height: 145px;
  padding: 1rem;
}

.top-seller-card strong {
  margin-top: auto;
  font-size: 0.98rem;
}

.top-seller-card small {
  opacity: 0.9;
}

.rank {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.info-card,
.scorecard,
.chart-card,
.checkout-panel,
.summary-card,
.cart-panel,
.detail-panel,
.recommendation-shell {
  padding: 1.2rem;
}

.info-card {
  min-height: 100%;
}

.metric-card {
  background: linear-gradient(180deg, rgba(255, 87, 34, 0.08), rgba(255, 255, 255, 0.88));
}

.info-label,
.scorecard-label,
.category-row strong {
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.detail-media {
  min-height: 520px;
  border-radius: 28px;
  padding: 1.25rem;
}

.detail-title {
  position: absolute;
  left: 1.25rem;
  bottom: 3.2rem;
  font-size: 2rem;
  max-width: 8ch;
  font-weight: 900;
  line-height: 1.05;
}

.detail-id {
  bottom: 1.15rem;
}

.detail-panel {
  padding: 1.5rem;
}

.detail-stats {
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.detail-stats > div,
.summary-line,
.summary-total,
.checkout-summary > div,
.category-row {
  align-items: center;
}

.feature-strip div,
.cart-meta,
.insight-box p,
.summary-line span,
.summary-total span,
.checkout-summary span,
.category-row span {
  color: var(--muted);
}

.feature-strip div {
  padding: 0.8rem 1rem;
  border-radius: 18px;
  background: rgba(255, 87, 34, 0.07);
  font-weight: 600;
}

.cart-panel,
.summary-card,
.checkout-panel,
.chart-card,
.recommendation-shell {
  background: rgba(255, 255, 255, 0.84);
}

.cart-row {
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(19, 34, 56, 0.08);
}

.cart-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.cart-thumb {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  color: #fff;
  display: flex;
  align-items: end;
  justify-content: center;
  padding-bottom: 0.7rem;
  font-weight: 800;
}

.cart-info {
  flex: 1;
}

.summary-card {
  position: sticky;
  top: 92px;
}

.summary-line,
.summary-total,
.checkout-summary > div {
  padding: 0.55rem 0;
  border-bottom: 1px dashed rgba(19, 34, 56, 0.12);
}

.summary-total,
.checkout-summary .total {
  border-bottom: 0;
  padding-bottom: 0;
  margin-top: 0.3rem;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.recommendation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.recommendation-skeleton-list {
  min-height: 260px;
}

.recommendation-skeleton {
  height: 260px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(102, 112, 133, 0.08) 25%, rgba(102, 112, 133, 0.14) 37%, rgba(102, 112, 133, 0.08) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
  border: 1px solid rgba(19, 34, 56, 0.08);
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes goldenPulse {
  0%, 100% {
    filter: saturate(1);
    transform: translateY(0);
  }
  50% {
    filter: saturate(1.2);
    transform: translateY(-1px);
  }
}

@keyframes beacon {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.75);
    opacity: 1;
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
    opacity: 1;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    opacity: 0.96;
  }
}

.recommendation-card {
  overflow: hidden;
}

.recommendation-card .card-body {
  padding: 1rem;
}

.recommendation-image {
  height: 140px;
}

.recommendation-loading {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(19, 34, 56, 0.15);
  border-radius: 18px;
}

.live-stream-card {
  margin-top: 1rem;
}

.live-stream-ticker {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.08), rgba(37, 99, 235, 0.08));
  font-weight: 700;
}

.live-clickstream-table thead th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 0;
}

.live-clickstream-table tbody tr:first-child td {
  border-top: 0;
}

.event-pill,
.risk-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.event-pill--view { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.event-pill--cart { background: rgba(255, 122, 57, 0.16); color: #c2410c; }
.event-pill--purchase { background: rgba(20, 184, 166, 0.16); color: #0f766e; }
.event-pill--login { background: rgba(139, 92, 246, 0.16); color: #7c3aed; }
.event-pill--logout { background: rgba(107, 114, 128, 0.16); color: #4b5563; }

.fraud-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.fraud-item {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 87, 34, 0.06);
  border: 1px solid rgba(255, 87, 34, 0.14);
}

.fraud-item__top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.fraud-item__meta {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.fraud-item p {
  margin: 0.6rem 0 0;
}

.risk-badge--high {
  background: rgba(255, 45, 85, 0.15);
  color: #e11d48;
}

.scorecard--metric {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.84));
}

.chart-wrap--funnel {
  min-height: 240px;
}

.toast-container .toast {
  backdrop-filter: blur(10px);
}

.scorecard {
  min-height: 100%;
}

.scorecard-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.scorecard-value {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  margin: 0.5rem 0;
}

.chart-wrap {
  position: relative;
  height: 340px;
}

.funnel-visual {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-top: 0.4rem;
}

.funnel-step {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  color: white;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff7b00, #ff3d5a);
  box-shadow: 0 16px 30px rgba(255, 87, 34, 0.15);
}

.funnel-step:nth-child(2) {
  background: linear-gradient(135deg, #ff9248, #ff6b7b);
}

.funnel-step:nth-child(3) {
  background: linear-gradient(135deg, #fca311, #ea580c);
}

.funnel-step strong {
  display: block;
}

.funnel-step span {
  opacity: 0.92;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.category-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(19, 34, 56, 0.08);
}

.category-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insight-box {
  flex-direction: column;
  padding: 1.1rem;
  background: rgba(255, 87, 34, 0.06);
  border-radius: 18px;
}

.insight-box h3 {
  margin-bottom: 0.35rem;
  font-weight: 800;
}

.checkout-panel {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.checkout-panel > .btn-shopee {
  margin-top: 0.5rem;
}

.login-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(19, 34, 56, 0.10);
  border-radius: 22px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.login-card--admin {
  background: linear-gradient(180deg, rgba(19, 34, 56, 0.96), rgba(19, 34, 56, 0.90));
  color: white;
}

.login-card--admin p,
.login-card--admin .small,
.login-card--admin label {
  color: rgba(255, 255, 255, 0.84) !important;
}

.login-card--admin .form-control {
  background: rgba(255, 255, 255, 0.95);
}

.checkout-summary {
  margin-top: 1.5rem;
  text-align: left;
}

.voucher-modal {
  border: 0;
  border-radius: 30px;
  overflow: hidden;
}

.voucher-banner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  min-height: 340px;
  background: linear-gradient(135deg, #ff6a00, #ff3d5a);
  color: white;
}

.voucher-copy,
.voucher-graphic {
  padding: 2rem;
}

.voucher-copy h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  max-width: 12ch;
  margin: 0.8rem 0 1rem;
}

.voucher-copy p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 46ch;
  margin-bottom: 1.4rem;
}

.voucher-graphic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.10);
}

.voucher-percentage {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  line-height: 1;
}

.voucher-note {
  margin-top: 0.8rem;
  font-weight: 700;
  opacity: 0.9;
}

@media (max-width: 1200px) {
  .top-seller-grid,
  .recommendation-list,
  .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .summary-card {
    position: static;
  }

  .voucher-banner,
  .detail-media {
    min-height: 360px;
  }

  .voucher-banner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .top-seller-grid,
  .recommendation-list,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    max-width: 100%;
  }

  .hero-card,
  .detail-panel,
  .summary-card,
  .cart-panel,
  .chart-card,
  .checkout-panel {
    border-radius: 20px;
  }

  .detail-title {
    max-width: 11ch;
  }
}
