﻿/* THIPHI Portal — tối thiểu, bổ sung Bootstrap (đen trắng) */
.portal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.portal-page > main {
  flex: 1 0 auto;
}
.portal-footer {
  flex-shrink: 0;
  margin-top: auto;
}
.portal-container {
  max-width: 1080px;
}
.portal-header-wrap {
  padding-top: 0.55rem !important;
  padding-bottom: 0.55rem !important;
}
.portal-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.portal-header-brand {
  flex: 0 0 auto;
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.portal-header-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.portal-header-logo {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}
.portal-header-brand .logo-mark {
  font-size: 1.55rem;
  letter-spacing: -0.045em;
}
.portal-header-tagline {
  white-space: nowrap;
  margin: -0.85rem 0 0.5rem 0 !important;
  font-size: 0.72rem !important;
  line-height: 1.2;
  position: relative;
  align-self: flex-end;
  text-align: right;
  width: 0;
  min-width: 100%;
}
.portal-header-meta {
  flex: 1 1 auto;
  justify-content: center;
  gap: 1rem;
  min-width: 0;
  white-space: nowrap;
}
.portal-header-clock {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.08rem;
  min-width: 7.25rem;
  line-height: 1.1;
  padding: 0;
}
.portal-header-clock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}
.portal-header-clock-label {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a3a3a3;
}
.portal-header-wx {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #555;
  transition: color 0.25s ease;
}
.portal-header-wx-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f6f6f6;
  color: #8c8c8c;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.portal-header-wx-icon svg {
  width: 9px;
  height: 9px;
  display: block;
}
.portal-header-wx-temp {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: #555;
}
.portal-header-wx.is-sun .portal-header-wx-icon {
  color: #d4a017;
  background: #fff6db;
  box-shadow: inset 0 0 0 1px rgba(212, 160, 23, 0.18);
}
.portal-header-wx.is-sun .portal-header-wx-temp {
  color: #b8860b;
}
.portal-header-wx.is-moon .portal-header-wx-icon {
  color: #6b7c99;
  background: #eef1f7;
  box-shadow: inset 0 0 0 1px rgba(107, 124, 153, 0.2);
}
.portal-header-wx.is-moon .portal-header-wx-temp {
  color: #5a6b86;
}
.portal-header-wx.is-suncloud .portal-header-wx-icon {
  color: #c9a227;
  background: #fff8e8;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.16);
}
.portal-header-wx.is-suncloud .portal-header-wx-temp {
  color: #9a7b1a;
}
.portal-header-wx.is-mooncloud .portal-header-wx-icon {
  color: #7a879c;
  background: #eef1f6;
  box-shadow: inset 0 0 0 1px rgba(122, 135, 156, 0.18);
}
.portal-header-wx.is-mooncloud .portal-header-wx-temp {
  color: #667388;
}
.portal-header-wx.is-cloud .portal-header-wx-icon {
  color: #7d8796;
  background: #f0f2f5;
}
.portal-header-wx.is-rain .portal-header-wx-icon {
  color: #4f7fd6;
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px rgba(79, 127, 214, 0.16);
}
.portal-header-wx.is-rain .portal-header-wx-temp {
  color: #3d6bb8;
}
.portal-header-wx.is-storm .portal-header-wx-icon {
  color: #6b5b95;
  background: #f3effa;
  box-shadow: inset 0 0 0 1px rgba(107, 91, 149, 0.16);
}
.portal-header-wx.is-storm .portal-header-wx-temp {
  color: #5a4a82;
}
.portal-header-wx.is-snow .portal-header-wx-icon {
  color: #5fa3c7;
  background: #eef7fb;
  box-shadow: inset 0 0 0 1px rgba(95, 163, 199, 0.16);
}
.portal-header-wx.is-fog .portal-header-wx-icon {
  color: #9aa0a6;
  background: #f2f2f2;
}
.portal-header-clock-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.portal-header-clock-date {
  font-size: 0.68rem;
  color: #9a9a9a;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.portal-header-clock-sep {
  font-size: 0.55rem;
  color: #c8c8c8;
  line-height: 1;
  font-weight: 400;
}
.portal-header-clock-time {
  font-size: 0.7rem;
  color: #444;
  font-weight: 400;
  letter-spacing: 0.03em;
}
.portal-header-divider {
  width: 1px;
  height: 1.55rem;
  background: linear-gradient(180deg, transparent, #e6e6e6 18%, #e6e6e6 82%, transparent);
  flex-shrink: 0;
  align-self: center;
}
.portal-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.portal-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  user-select: none;
  margin-right: 0.15rem;
}
.portal-lang-btn {
  border: 0;
  background: transparent;
  color: #9a9a9a;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.25rem;
  line-height: 1;
  cursor: pointer;
}
.portal-lang-btn:hover {
  color: #495057;
}
.portal-lang-btn.is-active {
  color: #111;
}
.portal-lang-sep {
  color: #ced4da;
  font-size: 0.75rem;
  line-height: 1;
}
.portal-header-nav {
  align-items: center;
  gap: 0.85rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.portal-nav-market {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.portal-nav-market-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}
.portal-nav-market:hover .portal-nav-market-icon {
  opacity: 1;
}
.portal-header-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.portal-header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f0f0f0;
  color: #9a9a9a;
  padding: 0;
  line-height: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.portal-header-search svg {
  width: 16px;
  height: 16px;
}
.portal-header-search:hover,
.portal-header-search:focus {
  background: #e8e8e8;
  color: #6c757d;
  outline: none;
}
.portal-header-search-wrap.is-open .portal-header-search {
  display: none;
}
.portal-header-search-panel {
  display: none;
  align-items: center;
  gap: 0.35rem;
  height: 32px;
  padding: 0 0.35rem 0 0.75rem;
  background: #f0f0f0;
  border-radius: 999px;
  animation: portal-search-in 0.16s ease;
}
.portal-header-search-wrap.is-open .portal-header-search-panel {
  display: inline-flex;
}
.portal-header-search-input {
  width: 11rem;
  max-width: 42vw;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 0.875rem;
  color: #212529;
  line-height: 1.2;
}
.portal-header-search-input::placeholder {
  color: #9a9a9a;
}
.portal-header-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9a9a9a;
  padding: 0;
  line-height: 0;
}
.portal-header-search-close:hover {
  background: #e4e4e4;
  color: #6c757d;
}
@keyframes portal-search-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (min-width: 576px) {
  .portal-header-search-input {
    width: 14rem;
  }
}
.portal-header-user {
  position: relative;
}
.portal-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 0;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  letter-spacing: 0.02em;
}
.portal-header-avatar.is-guest {
  background: #f0f0f0;
  color: #9a9a9a;
  font-weight: 400;
}
.portal-header-avatar.is-guest svg {
  width: 16px;
  height: 16px;
}
.portal-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 208px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(15, 23, 42, 0.1);
  z-index: 1060;
  padding: 0.4rem;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.portal-user-dropdown.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.portal-user-dropdown[hidden] {
  display: block !important;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
}
.portal-user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem 0.7rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid #f1f5f9;
}
.portal-user-dropdown-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}
.portal-user-dropdown-name {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  word-break: break-all;
}
.portal-user-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.portal-user-dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}
.portal-user-dropdown-sep {
  height: 1px;
  background: #f1f5f9;
  margin: 0.25rem 0.35rem;
}
.portal-user-dropdown-item.is-logout {
  color: #64748b;
}
.portal-user-dropdown-item.is-logout:hover {
  background: #fff5f5;
  color: #b91c1c;
}
.portal-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.portal-toast {
  position: fixed;
  top: 1.15rem;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 1100;
  max-width: min(92vw, 360px);
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  background: #1c4e86;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.portal-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.portal-toast.is-error {
  background: #b91c1c;
}
.portal-login-dialog {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  padding: 1.75rem 1.6rem 1.5rem;
  position: relative;
}
.portal-login-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}
.portal-login-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.portal-login-brand {
  margin: 0 1.5rem 1.25rem 0;
}
.portal-login-brand .logo-mark {
  color: #111;
}
.portal-login-dialog .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.35rem;
}
.portal-login-dialog .form-control {
  border-radius: 8px;
  border-color: #e2e8f0;
  background: #fff;
  padding: 0.65rem 0.8rem;
  font-size: 0.9375rem;
}
.portal-login-dialog .form-control:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}
.portal-login-pass-wrap {
  position: relative;
}
.portal-login-pass-wrap .form-control {
  padding-right: 2.5rem;
}
.portal-login-eye {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}
.portal-login-eye:hover {
  color: #475569;
}
.portal-login-link {
  font-size: 0.8125rem;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
}
.portal-login-link:hover {
  text-decoration: underline;
}
.portal-login-dialog .form-check-input {
  border-color: #cbd5e1;
}
.portal-login-dialog .form-check-input:checked {
  background-color: #0f172a;
  border-color: #0f172a;
}
.portal-login-submit {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.portal-login-submit:hover {
  background: #1e293b;
}
.portal-login-error {
  color: #b91c1c;
  font-size: 0.8125rem;
  margin: 0.65rem 0 0;
}
.portal-login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0.9rem;
  color: #94a3b8;
  font-size: 0.8125rem;
}
.portal-login-divider::before,
.portal-login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.portal-login-social {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
.portal-login-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
}
.portal-login-social-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.portal-login-social-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.portal-login-footer {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}
@media (max-width: 991.98px) {
  .portal-header-meta {
    display: none !important;
  }
}
@media (max-width: 575.98px) {
  .portal-header-tagline {
    display: none;
  }
  .portal-header-logo {
    width: 56px;
    height: 56px;
  }
  .portal-header-brand .logo-mark {
    font-size: 1.25rem;
  }
}
.nav-categories {
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
}
.nav-categories::-webkit-scrollbar {
  display: none;
}
.nav-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #9a9a9a;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-home-icon svg {
  width: 14px;
  height: 14px;
}
.nav-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
  pointer-events: none;
}
.nav-sticky.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-sticky-logo {
  letter-spacing: -0.04em;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  padding-right: 0.5rem;
  border-right: 1px solid #dee2e6;
}
.logo-mark {
  letter-spacing: -0.04em;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}
.source-media {
  position: relative;
  display: block;
  overflow: hidden;
}
.source-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  flex-shrink: 0;
  vertical-align: middle;
}
.source-icon-lg {
  width: 20px;
  height: 20px;
}
.source-icon-on-media {
  position: absolute;
  left: 0.45rem;
  bottom: 0.85rem;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(3px);
  box-shadow: none;
  opacity: 0.55;
}
.source-icon-img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  display: block;
}
.source-icon-on-media .source-icon-img {
  width: 13px;
  height: 13px;
}
.source-icon-fallback {
  font-size: 0.55rem;
  font-weight: 600;
  color: #666;
  line-height: 1;
  text-transform: uppercase;
}
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #6c757d;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
}
.source-chip-label {
  color: #6c757d;
}
.trend-chip {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #fff6d8;
  color: #7a5a00;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.article-thumb {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 3px;
}
.hero-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: 300px;
  border-radius: 3px;
}
#hero-section .hero-title {
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
#hero-section .hero-summary {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#hero-section .hero-meta {
  font-size: 0.8125rem;
}
.news-content {
  overflow-x: hidden;
  word-wrap: break-word;
  line-height: 1.75;
  color: #111;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: geometricPrecision;
}
.news-content p,
.news-content li,
.news-content td,
.news-content span,
.news-content div,
.news-content font {
  color: #111 !important;
  font-weight: 400;
}
.news-content p {
  margin-bottom: 1rem;
}
.news-content a,
.news-content a span {
  color: #1a4f9c !important;
}
.news-content figcaption,
.news-content figcaption *,
.news-content .desc_cation,
.news-content .caption,
.news-content .fig-caption {
  color: #444 !important;
}
.news-content img,
.news-content picture,
.news-content video {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0.85rem 0;
  position: static !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  float: none !important;
  border-radius: 3px;
  object-fit: cover;
}
.news-content video,
.news-content .news-lead-video video {
  object-fit: contain;
  background: #0f0f0f;
  aspect-ratio: 16 / 9;
  height: auto !important;
}
.news-content .news-lead-video {
  margin: 0 0 1.25rem;
  max-width: 100%;
}
.news-content .news-video-pending {
  display: none !important;
}
.news-content figure,
.news-content .item_slide_show,
.news-content .block_thumb_slide_show,
.news-content .block_thumb_picture,
.news-content .fig-picture,
.news-content .thumb-art,
.news-content .box_img_video {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 1rem 0;
  overflow: hidden;
  position: relative;
  float: none !important;
  clear: both;
}
.news-content table {
  width: 100% !important;
  max-width: 100% !important;
  display: block;
  overflow-x: auto;
}
.news-content .action_thumb,
.news-content .desc_cation[style*="display: none"],
.news-content .hidden {
  display: none !important;
}

.news-main {
  width: 100%;
}
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1080px);
  justify-content: center;
  gap: 1.25rem;
  padding: 0 1rem;
  max-width: 1080px;
  margin: 0 auto;
}
.news-detail {
  min-width: 0;
  max-width: 1080px;
  width: 100%;
}
.news-detail .news-sapo {
  color: #1c4e86 !important;
  font-weight: 400 !important;
  font-size: 1.14rem;
  line-height: 1.72;
  letter-spacing: 0.015em;
  margin-bottom: 1.15rem;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: geometricPrecision;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}
.news-figures-side {
  display: none;
}
.news-figures-mobile {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e5e5;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}
.news-figures-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.figure-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #f7f7f7 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.figure-card.is-company {
  border-color: #9eb7c4;
  background: linear-gradient(180deg, #f3f8fb 0%, #e7eef3 100%);
  box-shadow: 0 2px 10px rgba(30, 70, 90, 0.08);
}
.figure-card.is-company:hover {
  border-color: #6f93a6;
  box-shadow: 0 6px 16px rgba(30, 70, 90, 0.14);
}
.figure-card:hover {
  transform: translateY(-2px);
  border-color: #cfcfcf;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.figure-card:focus-visible {
  outline: 2px solid #222;
  outline-offset: 2px;
}
.figure-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #ececec;
  overflow: hidden;
}
.figure-card.is-company .figure-card-media {
  background: #d9e4eb;
}
.figure-card-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: #2f5d73;
  border-radius: 4px;
  padding: 0.12rem 0.35rem;
  line-height: 1;
}
.figure-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.figure-card-media-empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e9e9e9, #f5f5f5);
}
.figure-card-body {
  padding: 0.55rem 0.6rem 0.7rem;
}
.figure-card-name {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  color: #111;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.05em;
}
.figure-card-role {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #666;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.figure-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.4rem;
}
.figure-chip {
  font-size: 0.65rem;
  font-weight: 600;
  color: #333;
  background: #ececec;
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  line-height: 1.2;
}
.figure-card.is-company .figure-chip {
  background: #d5e3eb;
  color: #244556;
}
.figure-chip-type {
  background: #222 !important;
  color: #fff !important;
}
.figure-card.is-company .figure-chip-type {
  background: #2f5d73 !important;
}
.news-figures-side .figure-card + .figure-card {
  margin-top: 0.75rem;
}
.news-figure-modal-content {
  border: 0;
  border-radius: 14px;
  overflow: hidden;
}
.news-figure-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
  padding: 0.5rem;
  opacity: 1;
}
.news-figure-modal-hero {
  aspect-ratio: 16 / 10;
  background: #ececec;
}
.news-figure-modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-figure-modal-img-empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e5e5e5, #f3f3f3);
}
.news-figure-modal-meta {
  font-size: 0.875rem;
  color: #444;
  display: grid;
  gap: 0.25rem;
}
@media (min-width: 1400px) {
  .news-layout {
    grid-template-columns: minmax(160px, 200px) minmax(0, 1080px) minmax(160px, 200px);
    max-width: 1520px;
    align-items: start;
  }
  .news-figures-side {
    display: block;
    position: sticky;
    top: 1rem;
  }
  .news-figures-mobile {
    display: none !important;
  }
}

/* Middle row — 3 cột kiểu VnExpress */
.middle-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.middle-card-head {
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
.middle-card-title {
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 700;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.middle-card-comment {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #6c757d;
  margin-left: 0.15rem;
}
.middle-card-comment svg {
  flex-shrink: 0;
}
.middle-card-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-radius: 3px;
}
.middle-card-opinion .middle-card-title {
  margin-bottom: 0.5rem;
}
.middle-card-summary {
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category page */
.nav-cat-active {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.category-page-title {
  letter-spacing: 0.02em;
}
.category-item-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 3px;
}
.category-item-img-skel {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 3px;
}
.category-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.category-item-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.category-item:last-child {
  border-bottom: 0 !important;
}

/* Skeleton loading */
@keyframes skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel {
  background: linear-gradient(90deg, #ececec 0%, #f7f7f7 50%, #ececec 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
  border-radius: 2px;
}
.skel-line {
  height: 0.85rem;
  width: 100%;
}
.skel-line-lg { height: 1.35rem; }
.skel-line-md { height: 1.1rem; }
.skel-line-sm { width: 72%; }
.skel-line-xs { width: 42%; height: 0.7rem; }
.skel-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 300px;
  border-radius: 3px;
}
.skel-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 0.5rem;
  border-radius: 3px;
}
.skel-middle-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 3px;
}
.skel-badge {
  width: 4.5rem;
  height: 1.25rem;
  margin-bottom: 0.5rem;
}
.skel-nav-pill {
  width: 4.5rem;
  height: 0.85rem;
  flex-shrink: 0;
}
.skel-middle-head {
  margin-bottom: 0.5rem;
}
.skel-fade-in {
  animation: skel-fade-in 0.35s ease;
}
@keyframes skel-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Ý kiến — kiểu VnExpress */
.ykien {
  --ykien-accent: #b41f24;
  --ykien-muted: #757575;
  --ykien-line: #e5e5e5;
  margin-top: 2.5rem;
  padding-top: 0.25rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.ykien-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.ykien-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.01em;
}
.ykien-rules {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--ykien-muted);
  text-decoration: none;
  text-align: right;
}
.ykien-rules u {
  text-underline-offset: 2px;
}
.ykien-rules:hover {
  color: #333;
}
.ykien-compose {
  position: relative;
  border: 1px solid #d0d0d0;
  background: #fff;
  margin-bottom: 1.1rem;
}
.ykien-compose::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ykien-accent);
}
.ykien-compose textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  border: 0;
  outline: 0;
  resize: vertical;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #222;
  background: transparent;
}
.ykien-compose textarea::placeholder {
  color: #9a9a9a;
}
.ykien-emoji-btn {
  position: absolute;
  right: 0.55rem;
  top: 0.65rem;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #b0b0b0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ykien-emoji-btn:hover {
  color: #666;
}
.ykien-emoji-pop {
  position: absolute;
  right: 0.4rem;
  top: 2.35rem;
  z-index: 5;
  display: none;
  gap: 0.15rem;
  flex-wrap: wrap;
  width: 180px;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.ykien-emoji-pop.is-open {
  display: flex;
}
.ykien-emoji-pop button {
  border: 0;
  background: transparent;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.2rem;
  cursor: pointer;
  border-radius: 4px;
}
.ykien-emoji-pop button:hover {
  background: #f3f3f3;
}
.ykien-compose-actions {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0 0.75rem 0.65rem;
  border-top: 1px solid #eee;
}
.ykien-compose.is-active .ykien-compose-actions {
  display: flex;
}
.ykien-btn-submit {
  border: 0;
  background: var(--ykien-accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}
.ykien-btn-submit:disabled {
  opacity: 0.55;
  cursor: default;
}
.ykien-btn-cancel {
  border: 0;
  background: transparent;
  color: var(--ykien-muted);
  font-size: 0.8125rem;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
}
.ykien-tabs {
  display: flex;
  gap: 1.25rem;
  border-bottom: 1px solid var(--ykien-line);
  margin-bottom: 0;
}
.ykien-tab {
  border: 0;
  background: transparent;
  padding: 0.55rem 0 0.65rem;
  font-size: 0.9375rem;
  color: #8a8a8a;
  cursor: pointer;
  position: relative;
  line-height: 1.2;
}
.ykien-tab.is-active {
  color: var(--ykien-accent);
  font-weight: 700;
}
.ykien-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ykien-accent);
}
.ykien-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ykien-item {
  display: flex;
  gap: 0.75rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--ykien-line);
}
.ykien-avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #cfd6dc;
  color: #5a6570;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
}
.ykien-avatar.is-guest {
  background: #4a90d9;
  color: #fff;
}
.ykien-avatar svg {
  width: 22px;
  height: 22px;
}
.ykien-body {
  flex: 1 1 auto;
  min-width: 0;
}
.ykien-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #222;
  word-break: break-word;
}
.ykien-name {
  font-weight: 700;
  color: #111;
  margin-right: 0.35rem;
}
.ykien-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-top: 0.45rem;
  font-size: 0.8125rem;
  color: var(--ykien-muted);
}
.ykien-meta-left {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}
.ykien-meta-time {
  margin-left: auto;
  color: #9a9a9a;
  font-size: 0.75rem;
  white-space: nowrap;
}
.ykien-action {
  border: 0;
  background: transparent;
  color: var(--ykien-muted);
  padding: 0;
  font-size: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  cursor: pointer;
  line-height: 1;
}
.ykien-action:hover {
  color: #333;
}
.ykien-action.is-liked {
  color: var(--ykien-accent);
  font-weight: 600;
}
.ykien-action svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.ykien-likes {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--ykien-accent);
  font-weight: 600;
  font-size: 0.8125rem;
}
.ykien-likes svg {
  width: 14px;
  height: 14px;
}
.ykien-flag {
  color: #bdbdbd;
}
.ykien-flag:hover {
  color: #888;
}
.ykien-replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  border: 0;
  background: transparent;
  color: #4a4a4a;
  font-size: 0.8125rem;
  padding: 0;
  cursor: pointer;
}
.ykien-replies-toggle:hover {
  color: var(--ykien-accent);
}
.ykien-replies-toggle svg {
  width: 14px;
  height: 14px;
  color: #8a8a8a;
}
.ykien-replies {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0 0 0 0.25rem;
  border-left: 2px solid #f0f0f0;
}
.ykien-replies .ykien-item {
  padding: 0.75rem 0 0.75rem 0.85rem;
  border-bottom: 0;
}
.ykien-reply-box {
  margin-top: 0.65rem;
}
.ykien-reply-box .ykien-compose {
  margin-bottom: 0;
}
.ykien-empty,
.ykien-loading,
.ykien-error {
  padding: 1.25rem 0;
  color: var(--ykien-muted);
  font-size: 0.9rem;
}
.ykien-msg {
  margin: 0.4rem 0 0;
  font-size: 0.8125rem;
  color: var(--ykien-accent);
}
.ykien-rules-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(16, 18, 22, 0.46);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.ykien-rules-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.ykien-rules-lock {
  overflow: hidden;
}
.ykien-rules-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(16, 18, 22, 0.18);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}
.ykien-rules-modal.is-open .ykien-rules-card {
  transform: none;
}
.ykien-rules-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ykien-accent, #b41f24);
}
.ykien-rules-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8a8a8a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ykien-rules-close:hover {
  background: #f4f4f4;
  color: #222;
}
.ykien-rules-body {
  padding: 1.45rem 1.45rem 1.2rem 1.55rem;
}
.ykien-rules-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ykien-accent, #b41f24);
}
.ykien-rules-title {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.3;
  padding-right: 1.5rem;
}
.ykien-rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.ykien-rules-list li {
  display: grid;
  grid-template-columns: 1.45rem 1fr;
  gap: 0.55rem;
  align-items: start;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #1a2433;
  font-weight: 400;
}
.ykien-rules-list li::before {
  content: attr(data-n);
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: #f6f1f1;
  color: var(--ykien-accent, #b41f24);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.12rem;
}
.ykien-rules-foot {
  display: flex;
  justify-content: flex-end;
  padding: 0 1.3rem 1.15rem 1.55rem;
}
.ykien-rules-ok {
  border: 0;
  background: var(--ykien-accent, #b41f24);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1.05rem;
  border-radius: 6px;
  cursor: pointer;
}
.ykien-rules-ok:hover {
  filter: brightness(0.94);
}
@media (prefers-reduced-motion: reduce) {
  .ykien-rules-modal,
  .ykien-rules-card {
    transition: none;
  }
}
@media (max-width: 575.98px) {
  .ykien-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .ykien-rules {
    text-align: left;
  }
  .ykien-meta-time {
    margin-left: 0;
    width: 100%;
  }
}

/* Thị trường page */
.letter-space { letter-spacing: 0.06em; }
.market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.65rem;
}
.market-tab {
  color: #6c757d;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
}
.market-tab:hover { color: #212529; }
.market-tab.is-active {
  color: #111;
  border-bottom-color: #111;
}
.market-tab.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.market-table-wrap {
  border: 1px solid #e9ecef;
}
.market-table {
  font-size: 0.9rem;
  margin-bottom: 0;
}
.market-table thead th {
  background: #f8f9fa;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  color: #495057;
  border-bottom-width: 1px;
  white-space: nowrap;
  padding: 0.75rem 0.85rem;
}
.market-table tbody td {
  padding: 0.65rem 0.85rem;
  vertical-align: middle;
  border-color: #f1f3f5;
}
.market-table tbody tr:hover td {
  background: #fafafa;
}
.market-row-highlight td {
  background: #f3f3f3;
  font-weight: 500;
}

/* FX card — thitruong */
.market-page-banner {
  --market-ink: #14171c;
  --market-line: #d5dae3;
  --market-accent: #c41230;
  position: relative;
  overflow: hidden;
  margin: 0 auto 1.1rem;
  padding: 1.1rem 1.1rem 1rem;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.35) 100%),
    linear-gradient(120deg, #f3f6fa 0%, #eef2f7 42%, #f7f4f1 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.market-page-banner::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, transparent, var(--market-accent) 18%, var(--market-accent) 82%, transparent);
}
.market-page-banner::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  pointer-events: none;
  opacity: 0.45;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28' fill='none'%3E%3Cpath d='M1 20 L14 14 L28 17 L42 8 L56 12 L70 5 L84 10 L98 4 L119 9' stroke='%23c41230' stroke-opacity='0.22' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M1 22 L14 18 L28 19 L42 14 L56 16 L70 12 L84 14 L98 11 L119 13' stroke='%239aa3b2' stroke-opacity='0.35' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center bottom / min(520px, 88%) auto no-repeat;
}
.market-page-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  min-width: 0;
}
.market-page-banner-rule {
  flex: 1 1 auto;
  max-width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--market-line));
}
.market-page-banner-rule:last-child {
  background: linear-gradient(90deg, var(--market-line), transparent);
}
.market-page-banner-copy {
  flex: 0 0 auto;
  text-align: center;
}
.market-page-banner-kicker {
  display: block;
  margin-bottom: 0.2rem;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a93a3;
}
.market-page-banner-title {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--market-ink);
}
.market-page-banner-title .langspan {
  background: linear-gradient(180deg, #1a1f27 0%, #2a3140 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 575.98px) {
  .market-page-banner {
    padding: 1.1rem 0.9rem 1.05rem;
  }
  .market-page-banner-rule {
    max-width: 48px;
  }
  .market-page-banner-kicker {
    letter-spacing: 0.16em;
  }
}
.market-boards > [class*="col-"] {
  display: flex;
}
.market-boards .fx-card {
  width: 100%;
}
/* Crypto + Chỉ số: card hẹp hơn trong cột nửa trang */
.market-section-narrow {
  display: flex;
  justify-content: flex-start;
}
.market-section-narrow .fx-card {
  max-width: 420px;
}
.fx-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(16, 24, 40, 0.04);
  padding: 0.6rem 0.7rem 0.45rem;
}
.fx-card-bottom {
  margin-top: 0;
}
.fx-card-compact .fx-card-head {
  gap: 0.3rem;
  margin-bottom: 0.3rem;
}
.fx-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.fx-card-title {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: #14171c;
  letter-spacing: -0.015em;
}
.fx-card-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.fx-date-label {
  font-size: 0.72rem;
  color: #6c757d;
  margin: 0;
  white-space: nowrap;
}
.fx-date-input {
  border: 1px solid #ced4da;
  border-radius: 5px;
  padding: 0.18rem 0.35rem;
  font-size: 0.75rem;
  color: #212529;
  background: #fff;
  min-width: 7.5rem;
  max-width: 9rem;
}
.fx-date-input:focus {
  outline: none;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.12rem rgba(13, 110, 253, 0.15);
}
.fx-excel-btn,
.fx-reload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  background: #fff;
  padding: 0;
  cursor: pointer;
  color: #495057;
  line-height: 1;
}
.fx-excel-btn {
  color: #1D6F42;
  border-color: #cfe3d6;
}
.fx-excel-btn:hover,
.fx-reload-btn:hover {
  background: #f8f9fa;
}
.fx-excel-btn:hover {
  background: #eef7f1;
  color: #155a34;
}
.fx-reload-btn {
  font-size: 0.95rem;
}
.fx-status {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.35rem;
}
.fx-status.is-error { color: #c41230; }
.fx-status[hidden] { display: none !important; }
.fx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin: 0;
  line-height: 1.25;
}
.fx-table thead th {
  background: #f3f5f7;
  color: #3a4a6b;
  font-weight: 700;
  font-size: 0.68rem;
  padding: 0.3rem 0.4rem;
  border-bottom: 2px solid #1f3b70;
  white-space: nowrap;
  vertical-align: middle;
}
.fx-table tbody td {
  padding: 0.26rem 0.4rem;
  border-bottom: 1px solid #eceff3;
  vertical-align: middle;
  color: #212529;
}
.fx-table tbody tr:nth-child(even) td {
  background: #f7f8fa;
}
.fx-table tbody tr:hover td {
  background: #eef3fb;
}
.fx-code,
.fx-name {
  color: #1a4f9c;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
}
.fx-code {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.fx-name { font-weight: 500; }
.fx-code:hover,
.fx-name:hover {
  color: #0d3a7a;
  text-decoration: underline;
}
.fx-flag {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  flex-shrink: 0;
  background: #eee;
}
.fx-flag-empty {
  display: inline-block;
  background: #dde3ea;
}
.fx-num {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}
.fx-dot {
  display: none;
}
.fx-dash {
  color: #98a2b3;
}
.fx-empty {
  text-align: center;
  color: #98a2b3;
  padding: 1rem 0.5rem !important;
}
.fx-empty.is-error { color: #c41230; }
.fx-card-foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.25rem 0.4rem;
  margin-top: 0.35rem;
  padding-top: 0.3rem;
  border-top: 1px solid #eef0f3;
  font-size: 0.66rem;
  color: #8a93a3;
  min-height: 1.35rem;
}
.fx-card-foot > span:first-child {
  justify-self: start;
}
.fx-card-foot > .fx-updated {
  justify-self: end;
  text-align: right;
}
.fx-updated { color: #5c6778; }
.fx-legend { white-space: nowrap; }
.fx-up { color: #1f9d55; margin-right: 0.15rem; font-size: 0.65rem; }
.fx-down { color: #d64545; margin-right: 0.25rem; font-size: 0.65rem; }
.fx-group-row td {
  background: #f3f5f7 !important;
  padding: 0.28rem 0.45rem !important;
  border-bottom: 1px solid #e4e8ee;
}
.fx-group-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3a4a6b;
}
.fx-metal-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
/* 1 icon: vùng (cờ/địa cầu) + viền kim loại vàng/bạc */
.fx-metal-stack {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 3px;
  box-sizing: border-box;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.55) inset,
    0 1px 2px rgba(0, 0, 0, 0.14);
}
.fx-metal-stack.is-gold {
  background: linear-gradient(145deg, #ffe7a0 0%, #e0b23a 42%, #b8860b 100%);
}
.fx-metal-stack.is-silver {
  background: linear-gradient(145deg, #f7fafc 0%, #c5d0dc 45%, #8e9aab 100%);
}
.fx-region-icon {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
#metal-table .fx-metal-label .fx-code {
  margin: 0;
}
.fx-chg-up { color: #1f9d55; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 0.72rem; }
.fx-chg-down { color: #d64545; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 0.72rem; }
.fx-chg-flat { color: #98a2b3; font-variant-numeric: tabular-nums; font-size: 0.72rem; }
.fx-unit { color: #8a93a3; font-size: 0.68rem; white-space: nowrap; }
#metal-table .fx-code { color: #1a4f9c; font-weight: 600; }
.fx-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 28px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8a93a3;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.fx-expand-btn:hover {
  color: #1a4f9c;
  background: #eef3fb;
}
.fx-expand-chevron {
  transition: transform 0.18s ease;
}
.fx-expand-btn.is-expanded .fx-expand-chevron {
  transform: rotate(180deg);
}
.fx-expand-btn[hidden] {
  display: none !important;
}
/* Khi không có Show more: 2 cột trái-phải như cũ */
#index-box .fx-card-foot,
#housing-box .fx-card-foot {
  grid-template-columns: auto auto;
}
#index-box .fx-card-foot > .fx-updated,
#housing-box .fx-card-foot > .fx-updated {
  justify-self: end;
}
#vcb-exchange-rate .fx-card-foot:has(#fx-expand[hidden]),
#gold-price-box .fx-card-foot:has(#metal-expand[hidden]),
#crypto-box .fx-card-foot:has(#crypto-expand[hidden]) {
  grid-template-columns: auto auto;
}
#vcb-exchange-rate .fx-card-foot:has(#fx-expand[hidden]) > .fx-updated,
#gold-price-box .fx-card-foot:has(#metal-expand[hidden]) > .fx-updated,
#crypto-box .fx-card-foot:has(#crypto-expand[hidden]) > .fx-updated {
  justify-self: end;
}
/* Tỷ giá + Vàng: dòng denser */
#fx-table thead th,
#metal-table thead th {
  padding: 0.22rem 0.35rem;
  font-size: 0.64rem;
}
#fx-table tbody td,
#metal-table tbody td {
  padding: 0.16rem 0.35rem;
}
#metal-table .fx-group-row td {
  padding: 0.12rem 0.35rem !important;
}
#vcb-exchange-rate.fx-card,
#gold-price-box.fx-card {
  padding: 0.5rem 0.65rem 0.35rem;
}
.fx-coin-icon {
  border-radius: 50%;
  background: #f0f2f5;
}
@media (max-width: 1199.98px) {
  .market-boards > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .market-section-narrow .fx-card {
    max-width: 100%;
  }
}
@media (max-width: 575.98px) {
  .fx-card { padding: 0.65rem; }
  .fx-card-title { font-size: 1rem; }
  .fx-card-foot { flex-direction: column; align-items: flex-start; }
}
