:root {
  --primary: #b45309;
  --primary-hover: #92400e;
  --gold: #f59e0b;
  --gold-light: #fef3c7;
  --gold-border: #fcd34d;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header (Fintech Royal Navy & 24K Bullion Gold) */
.site-header {
  background: linear-gradient(180deg, #0b1120 0%, #0f172a 100%);
  color: #fff;
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}
.header-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}
.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.28));
  transition: transform 0.2s ease;
}
.site-brand:hover .brand-logo-wrap {
  transform: scale(1.05);
}
.brand-text-col {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.3px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  animation: pulse 1.4s infinite;
}
.brand-title {
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.brand-tagline {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 2px;
}
.gold-text {
  background: linear-gradient(90deg, #fde047, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.main-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}
.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.main-nav a.active {
  color: #0f172a;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-color: #fbbf24;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

/* Sub-nav bar */
.sub-nav-bar {
  background: #131c31;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.42rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.sub-nav-bar::-webkit-scrollbar { display: none; }
.sub-nav-container {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  white-space: nowrap;
}
.sub-nav-label {
  font-size: 0.74rem;
  color: #fbbf24;
  font-weight: 800;
  text-transform: uppercase;
  margin-right: 0.2rem;
}
.sub-pill {
  display: inline-block;
  font-size: 0.77rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255,255,255,0.07);
  padding: 3px 10px;
  border-radius: 99px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.15s;
}
.sub-pill:hover {
  background: var(--gold);
  color: #0f172a;
  border-color: var(--gold);
}
.sub-pill.brand-pill {
  background: rgba(245, 158, 11, 0.15);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.28);
}
.sub-divider {
  color: #475569;
  font-size: 0.8rem;
}

/* Body */
.page-body {
  max-width: 1220px;
  margin: 1.25rem auto;
  padding: 0 1rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  display: flex;
  gap: 0.4rem;
}
.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Hero */
.hero-section {
  margin-bottom: 1.25rem;
}
.hero-banner {
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 45%),
              linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-left: 6px solid var(--gold);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.hero-kicker-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.hero-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
  padding: 2px 9px;
  border-radius: 99px;
}
.hero-time-pill {
  font-size: 0.76rem;
  color: #cbd5e1;
  font-weight: 600;
}
.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.hero-title {
  font-size: 1.48rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
  letter-spacing: -0.3px;
}
.hero-subtitle {
  color: #cbd5e1;
  font-size: 0.87rem;
}
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.btn-hero-compare {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  color: #0f172a;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 0.62rem 1.05rem;
  border-radius: 9px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
  transition: transform 0.15s;
}
.btn-hero-compare:hover {
  transform: translateY(-1px);
}
.btn-secondary-light {
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.22);
  padding: 0.58rem 0.95rem;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-secondary-light:hover {
  background: rgba(255,255,255,0.2);
}

/* Ticker Grid (Fintech 2-Column Split Cards) */
.ticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 0.9rem;
}
.ticker-card {
  background: var(--bg-card);
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ticker-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ticker-card.gold-primary {
  background: linear-gradient(145deg, #fffbeb 0%, #ffffff 70%);
  border: 1.5px solid var(--gold-border);
}
.ticker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.ticker-label {
  font-size: 0.77rem;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}
.ticker-mini-link {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.ticker-mini-link:hover { text-decoration: underline; }
.ticker-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.55rem;
}
.ticker-col {
  display: flex;
  flex-direction: column;
}
.ticker-col:last-child {
  border-left: 1px dashed #cbd5e1;
  padding-left: 0.55rem;
}
.ticker-col-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}
.ticker-val {
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  margin-top: 1px;
}
.ticker-val.buy { color: #15803d; }
.ticker-val.sell { color: #b45309; }
.ticker-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.ticker-spread-pill {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 99px;
}
.ticker-price {
  font-size: 1.38rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.4px;
}
.ticker-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.alert-diff { color: var(--danger); }

/* Smart Insight Strip */
.insight-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}
.insight-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 0.85rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.insight-card.best-buy { border-left-color: #f59e0b; }
.insight-card.best-sell { border-left-color: #16a34a; }
.insight-card.best-spread { border-left-color: #0284c7; }
.insight-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.insight-badge {
  font-size: 0.76rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
}
.insight-brand-pill {
  background: #0f172a;
  color: #fde047;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 99px;
}
.insight-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.insight-price {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--primary);
}
.insight-price.green { color: #15803d; }
.insight-price small {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  margin-left: 2px;
}
.insight-sub {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
}

/* Layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
}
@media (max-width: 920px) {
  .content-layout { grid-template-columns: 1fr; }
}

/* Cards */
.box-card {
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 1.35rem;
}
.box-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.95rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.box-title {
  font-size: 1.14rem;
  font-weight: 800;
  color: #0f172a;
}
.box-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.18rem;
}
.table-controls-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.unit-toggle-group {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
}
.unit-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.unit-btn.active {
  background: #0f172a;
  color: #fde047;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 700;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 99px;
}
.live-indicator .dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* Table Toolbar, Search & Multi-tier Filter Tabs */
.table-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
  background: #f8fafc;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.9rem;
  pointer-events: none;
}
.table-search-input {
  width: 100%;
  padding: 0.58rem 0.85rem 0.58rem 2.2rem;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 0.88rem;
  background: #fff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.table-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}
.tab-btn {
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: #334155;
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover, .tab-btn.active {
  background: #0f172a;
  color: #fde047;
  border-color: #0f172a;
}
.brand-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-top: 0.25rem;
  border-top: 1px dashed #e2e8f0;
}
.brand-chip {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s;
}
.brand-chip:hover, .brand-chip.active {
  background: var(--gold);
  color: #0f172a;
  border-color: #d97706;
}

/* Tables */
.table-responsive { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th, .data-table td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: #fffbeb;
}
.data-table th {
  background: #f1f5f9;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  text-align: left;
  color: #334155;
}
.row-brand-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.text-right { text-align: right; }
.text-center { text-align: center; }
.num-highlight { font-weight: 800; color: #0f172a; }
.num-buy { font-weight: 800; color: #15803d; font-variant-numeric: tabular-nums; }
.num-sell { font-weight: 800; color: #b45309; font-variant-numeric: tabular-nums; }
.text-muted-sm { color: var(--text-muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.type-link { color: var(--text-main); text-decoration: none; }
.type-link:hover { color: var(--primary); text-decoration: underline; }

.brand-tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.73rem;
  font-weight: 800;
  border-radius: 6px;
  background: #e2e8f0;
  color: #1e293b;
  text-decoration: none;
  min-width: 68px;
  text-align: center;
}
.brand-tag.sjc { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.brand-tag.doji { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.brand-tag.pnj { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }
.brand-tag.mi-hong { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.brand-tag.btmc, .brand-tag.btmh { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.brand-tag.phu-quy { background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe; }
.brand-tag.ngoc-tham { background: #fce7f3; color: #9d174d; border: 1px solid #f9a8d4; }

.diff-tag {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.diff-tag.low-spread {
  color: #15803d;
  font-weight: 800;
  background: #f0fdf4;
  border-radius: 6px;
}

.tag-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}
.tag-pill.green { background: #dcfce7; color: #166534; }
.tag-pill.gold { background: #fef3c7; color: #92400e; }
.tag-pill.blue { background: #e0f2fe; color: #075985; }

/* SVG Chart */
.svg-chart-wrapper {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.9rem;
}
.chart-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}
.chart-caption {
  color: var(--text-muted);
  font-weight: 600;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dot-sell { width: 10px; height: 10px; border-radius: 50%; background: #d97706; display: inline-block; }
.dot-buy { width: 10px; height: 10px; border-radius: 50%; background: #16a34a; display: inline-block; }
.legend-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
}
.legend-badge.up { background: #dcfce7; color: #166534; }
.legend-badge.down { background: #fee2e2; color: #991b1b; }
.price-svg-chart {
  width: 100%;
  height: auto;
  display: block;
}

/* Calculator Form */
.highlight-box {
  border-left: 4px solid var(--gold);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.form-group {
  margin-bottom: 0.75rem;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #334155;
}
.form-group input, .form-group select, .admin-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.92rem;
  background: #fff;
  font-family: inherit;
}
.calc-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.res-box {
  background: var(--gold-light);
  border: 1px dashed var(--gold-border);
  padding: 0.9rem 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.res-box.sellback-box {
  background: #f0fdf4;
  border-color: #86efac;
}
.res-box span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}
.res-box .gold-amount {
  font-size: 1.45rem;
  font-weight: 900;
  color: #b45309;
}
.res-box .sellback-amount {
  font-size: 1.45rem;
  font-weight: 900;
  color: #15803d;
}
.res-box small {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: #f8fafc;
}
.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  color: #0f172a;
}
.faq-item p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #334155;
}

/* Archive & B2B Shops */
.archive-date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.archive-pill {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  text-decoration: none;
  font-weight: 600;
}
.archive-pill:hover, .archive-pill.active {
  background: var(--primary);
  color: #fff;
}
.archive-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
}
.btn-archive-nav {
  background: #fff;
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}
.archive-current-badge {
  font-weight: 800;
  color: #0f172a;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.shop-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  background: #f8fafc;
}
.shop-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  background: #dcfce7;
  color: #166534;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 0.4rem;
}
.shop-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.shop-card p {
  font-size: 0.84rem;
  color: #475569;
  margin-bottom: 0.25rem;
}

/* Admin & OG Previews */
.og-preview-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .og-preview-grid { grid-template-columns: 1fr; }
}
.og-img-16x9 {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
}
.og-img-9x16 {
  max-height: 340px;
  width: auto;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
}
.video-script-box {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.scene-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #1e293b;
  font-size: 0.86rem;
}
.scene-time {
  color: var(--gold);
  font-weight: 800;
}
.scene-visual { color: #94a3b8; margin-bottom: 0.2rem; }
.scene-voice { color: #fff; }
.admin-toast {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 700;
}

/* Sidebar */
.side-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.side-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}
.side-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.btn-action {
  display: block;
  text-align: center;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  transition: background 0.2s;
}
.btn-action:hover { background: var(--primary-hover); }
.btn-telegram {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #0284c7;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.btn-text-danger {
  background: none;
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.mini-table {
  width: 100%;
  font-size: 0.84rem;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
}
.mini-table th, .mini-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.side-more-link {
  font-size: 0.84rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: 3rem;
  padding: 2.5rem 1rem 1.5rem;
  border-top: 2px solid var(--gold);
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 768px) {
  .footer-container { grid-template-columns: 1fr; }
}
.footer-col h3, .footer-col h4 {
  color: #fff;
  margin-bottom: 0.75rem;
}
.footer-links-row a {
  color: #fcd34d;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.footer-tags a {
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
}
.footer-tags a:hover {
  background: var(--gold);
  color: #000;
}
.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.8rem;
}

/* Cẩm Nang Kiến Thức Vàng (Guides) */
.guide-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.guide-mini-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.guide-mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}
.guide-cat-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 0.45rem;
}
.guide-mini-card h3 {
  font-size: 0.98rem;
  color: #0f172a;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}
.guide-mini-card p {
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.45;
}
.guide-article-body {
  padding: 1.6rem;
}
.guide-lead {
  font-size: 1rem;
  color: #334155;
  background: #f8fafc;
  border-left: 4px solid var(--gold);
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.25rem;
}
.guide-rich-text h2 {
  font-size: 1.2rem;
  color: #0f172a;
  margin: 1.35rem 0 0.6rem;
}
.guide-rich-text p, .guide-rich-text li {
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.65;
  margin-bottom: 0.65rem;
}
.guide-rich-text ul, .guide-rich-text ol {
  padding-left: 1.35rem;
  margin-bottom: 1rem;
}
.guide-rich-text code {
  background: #fef3c7;
  color: #92400e;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.88rem;
}
.guide-related-tools {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color);
}

/* Affiliate CPA Hub & Native Promo Slots */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.partner-card {
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.partner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.partner-badge {
  font-size: 0.72rem;
  font-weight: 800;
  background: #fef3c7;
  color: #b45309;
  padding: 2px 8px;
  border-radius: 99px;
}
.partner-yield {
  font-size: 0.75rem;
  font-weight: 800;
  color: #15803d;
}
.partner-name {
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}
.partner-cat {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.partner-desc {
  font-size: 0.83rem;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 0.85rem;
}
.btn-partner-cta {
  display: block;
  text-align: center;
  background: #0f172a;
  color: #fcd34d;
  text-decoration: none;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.84rem;
}
.btn-partner-cta:hover {
  background: #1e293b;
}

.native-promo-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 1.1rem 1.35rem;
  border-radius: 12px;
  margin-bottom: 1.35rem;
  border: 1px solid #334155;
}
@media (max-width: 640px) {
  .native-promo-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}
.promo-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 0.3rem;
}
.promo-left strong {
  display: block;
  font-size: 0.98rem;
  color: #fff;
  margin-bottom: 0.2rem;
}
.promo-left p {
  font-size: 0.82rem;
  color: #cbd5e1;
}
.btn-promo-cta {
  white-space: nowrap;
  background: var(--gold);
  color: #0f172a;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.84rem;
}
.ad-slot-container {
  min-height: 96px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.5rem;
  margin-bottom: 1.35rem;
  text-align: center;
}
.ad-slot-label {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

/* Mobile Sticky Bottom Navigation (App-like Fintech UX) */
.mobile-bottom-nav {
  display: none;
}
@media (max-width: 768px) {
  body {
    padding-bottom: 66px;
  }
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(251, 191, 36, 0.35);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 0.38rem 0.25rem calc(0.38rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  }
  .m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 0;
    border-radius: 8px;
  }
  .m-nav-icon {
    font-size: 1.05rem;
    line-height: 1;
  }
  .m-nav-item.active {
    color: #fde047;
  }
}
