:root {
  --scale: 0.85;
  --navy: #17334f;
  --red: #9e1b2f;
  --price-buy: #DB3E42;
  --price-sell: #1CB11C;
  --gold: #e8c15a;
  --row-line: #d9e0e8;
  --row-border: #cdd6e0;
  --bg: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  background: #eef1f4;
  color: #1f2d3d;
  display: flex;
  justify-content: center;
  padding: 24px 12px;
}

.banggia-wrap {
  width: calc(1440px * var(--scale));
  height: calc(1100px * var(--scale));
  max-width: 100%;
  margin: 0 auto;
}

.banggia {
  width: 1440px;
  background: var(--bg);
  box-shadow: 0 12px 40px rgba(18, 38, 63, 0.15);
  overflow: hidden;
  padding-bottom: 42px;
  transform: scale(var(--scale));
  transform-origin: top left;
}

.bg-inner {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
}

.banggia-header {
  background: var(--navy);
  height: 121px;
  position: relative;
}

.banggia-header .bg-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
}

.brand__logo {
  height: 82px;
  width: auto;
  display: block;
  margin-left: 14px;
}

.header-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: "Phudu", "Be Vietnam Pro", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 44px;
  line-height: 140%;
  letter-spacing: 0%;
  white-space: nowrap;
}

.header-time {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 20px;
  margin-right: 14px;
}
.header-time .clock {
  font-family: "Inter", "Be Vietnam Pro", sans-serif;
  font-weight: 700;
  font-size: 44px;
  line-height: 130%;
  letter-spacing: 0%;
  color: #DB3E42;
}
.header-time .updated {
  font-family: "Inter", "Be Vietnam Pro", sans-serif;
  font-weight: 600;
  font-style: italic;
  font-size: 18px;
  line-height: 130%;
  letter-spacing: 0%;
  text-align: left;
  color: #f2c2c9;
  padding-bottom: 3px;
}
.header-time .updated b {
  display: block;
  font-family: "Inter", "Be Vietnam Pro", sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 130%;
  letter-spacing: 0%;
  color: #DB3E42;
  font-style: normal;
}

.banggia-body {
  padding-top: 33px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.price-group {
  display: flex;
  flex-direction: column;
}

.pg-row.is-body {
  margin-top: 0px;
}

.pg-row.is-body + .is-body {
  margin-top: 6px;
}

.pg-row {
  width: 1200px;
  max-width: 100%;
  display: grid;
  grid-template-columns: 520px 180px 260px 240px;
  align-items: center;
  height: 60px;
}

.pg-row.is-head {
  height: 64px;
  color: #fff;
  font-family: "Inter", "Be Vietnam Pro", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 130%;
  letter-spacing: 0%;
  text-transform: uppercase;
  white-space: nowrap;
}
.table-silver .pg-row.is-head { background: var(--navy); }
.table-gold .pg-row.is-head { background: var(--red); }

.pg-row.is-body {
  background: #fff;
}
.table-silver .pg-row.is-body {
  border: 1px solid var(--navy);
}
.table-gold .pg-row.is-body {
  border: 1px solid var(--red);
}

.pg-cell { padding: 0 24px; font-size: 22px; }
.pg-cell:nth-child(2) { text-align: center; padding: 0 4px; }
.pg-cell:nth-child(3) { text-align: right; padding-right: 56px; }
.pg-cell:nth-child(4) { text-align: right; padding-right: 52px; }

.is-head .pg-cell { padding: 0 24px; white-space: nowrap; }
.is-head .pg-cell:nth-child(2) { text-align: center; padding: 0 4px; }
.is-head .pg-cell:nth-child(3) { text-align: right; padding-right: 56px; }
.is-head .pg-cell:nth-child(4) { text-align: right; padding-right: 52px; }

.sort-arrow { font-size: 12px; margin-left: 6px; }

.trend { font-size: 16px; margin-left: 8px; vertical-align: middle; color: #fff; }

.pg-cell.product { font-weight: 500; }
.pg-cell.unit { font-weight: 600; color: var(--navy); font-size: 20px; }
.pg-cell.buy {
  font-family: "Inter", "Be Vietnam Pro", sans-serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 130%;
  color: var(--price-buy);
}
.pg-cell.sell {
  font-family: "Inter", "Be Vietnam Pro", sans-serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 130%;
  color: var(--price-sell);
}

.ldots { display: inline-flex; gap: 6px; align-items: center; }
.ldots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: currentColor; opacity: 0.3;
  animation: ldot 1s infinite ease-in-out;
}
.ldots i:nth-child(2) { animation-delay: 0.15s; }
.ldots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ldot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

.banggia-footer {
  margin-top: 24px;
  background: var(--navy);
  height: 270px;
  padding: 33px 46px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 40px;
}

.phuquy-logo img {
  height: 72px;
  width: auto;
  display: block;
}

.qr-info .lead {
  font-family: "Inter", "Be Vietnam Pro", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 130%;
  color: #fff;
  text-align: center;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.18), transparent);
  padding: 18px 22px;
}

.qr {
  width: 200px;
  height: 200px;
  background: #fff;
  padding: 0;
}
.qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 1300px) {
  .banggia-header { height: auto; }
  .banggia-header .bg-inner { flex-direction: column; gap: 10px; padding: 14px; }
  .header-title { position: static; transform: none; text-align: center; }
  .header-time { text-align: center; }
  .banggia-body { padding: 14px 12px 0; }
  .pg-row { width: 100%; grid-template-columns: 1.6fr 0.6fr 0.8fr 0.8fr; font-size: 12px; height: auto; }
  .pg-cell { padding: 8px 6px; }
  .banggia-footer { height: auto; grid-template-columns: 1fr; justify-items: center; row-gap: 16px; }
}