/* ===== NHMedia — đồng bộ thương hiệu NH Branding (nền trắng, xanh teal + cam) ===== */
:root {
  --bg: #ffffff;
  --bg2: #f5f8f7;
  --card: #ffffff;
  --card-h: #f3f7f6;
  --line: #e6efec;
  --fg: #12201d;
  --mut: #4a5a56;
  --mut2: #8aa39d;
  --teal: #0f5a56;
  --teal-d: #0c403e;
  --teal-l: #e9f2f1;
  --red: #ef4444;      /* chỉ dùng cho nhãn TRỰC TIẾP */
  --gold: #f7941d;     /* cam thương hiệu (accent/CTA) */
  --gold-d: #e07d08;
  --green: #16a34a;
  --radius: 18px;
  --shadow: 0 6px 22px -10px rgba(15, 90, 86, 0.22);
  --shadow-h: 0 16px 40px -14px rgba(15, 90, 86, 0.32);
  --sp-1: 8px; --sp-2: 14px; --sp-3: 22px; --sp-4: 34px; --sp-5: 52px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 440px at 50% -8%, rgba(15, 90, 86, 0.06), transparent 60%),
    radial-gradient(760px 420px at 100% 0%, rgba(247, 148, 29, 0.07), transparent 58%),
    var(--bg);
  color: var(--fg);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 64px; }
.display { font-family: "Be Vietnam Pro", sans-serif; font-weight: 800; letter-spacing: -0.4px; }

/* ---- Header ---- */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
header.top::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--teal), var(--gold) 70%, transparent); }
.top-in { max-width: 900px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--teal), var(--teal-d));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 90, 86, 0.3);
}
.brand .logo svg { width: 19px; height: 19px; color: #fff; }
.brand .name { font-family: "Be Vietnam Pro", sans-serif; font-weight: 800; font-size: 20px; line-height: 1; letter-spacing: -0.5px; }
.brand .name b { color: var(--teal); font-weight: 800; }
.brand .name i { color: var(--gold); font-style: normal; font-weight: 800; }
.brand .sub { color: var(--mut); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; margin-left: 2px; }
.admin-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; background: var(--gold); color: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 4px 14px -4px rgba(247, 148, 29, 0.6); transition: transform 0.15s, box-shadow 0.15s; }
.admin-link:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(247, 148, 29, 0.7); }
@media (max-width: 480px) { .admin-link span { display: none; } .admin-link { padding: 9px; } }

/* ---- Section ---- */
.section-title { display: flex; align-items: center; gap: 10px; margin: var(--sp-4) 0 var(--sp-2); }
.section-title .bar { width: 5px; height: 22px; border-radius: 3px; background: linear-gradient(var(--teal), var(--gold)); }
.section-title h2 { font-size: 22px; line-height: 1; font-weight: 800; letter-spacing: -0.4px; }
.section-title.live .bar { background: var(--red); box-shadow: 0 0 10px rgba(239,68,68,0.5); }

.muted { color: var(--mut); }

/* ---- Tournament grid ---- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 15px; }
.tcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; align-items: center; gap: 14px; cursor: pointer;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.22s cubic-bezier(.2,.7,.3,1), box-shadow 0.22s, border-color 0.22s;
}
.tcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--teal), var(--gold)); }
.tcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); border-color: rgba(15, 90, 86, 0.35); }
.tcard .logo { width: 52px; height: 52px; border-radius: 13px; }
.tcard .meta { min-width: 0; }
.tcard .meta b { font-weight: 800; font-size: 16px; letter-spacing: -0.3px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg); }
.tcard .meta span { color: var(--mut); font-size: 12.5px; display: flex; align-items: center; gap: 5px; }
.chev { margin-left: auto; color: var(--mut2); flex: 0 0 auto; transition: transform 0.2s, color 0.2s; }
.tcard:hover .chev { color: var(--gold); transform: translateX(3px); }

img.logo, .ph { object-fit: cover; background: var(--teal-l); flex: 0 0 auto; }
.ph { display: inline-flex; align-items: center; justify-content: center; color: var(--teal); font-weight: 800; letter-spacing: 0.5px; border: 1px solid var(--line); }
.logo, .ph { border-radius: 11px; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 8px; margin: var(--sp-3) 0 var(--sp-2); flex-wrap: wrap; }
.tab {
  padding: 9px 18px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line);
  color: var(--mut); font-weight: 700; font-size: 13px; cursor: pointer; transition: all 0.18s;
}
.tab:hover { color: var(--teal); border-color: var(--teal); }
.tab.on { background: linear-gradient(135deg, var(--teal), var(--teal-d)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px rgba(15, 90, 86, 0.5); }

/* ---- Match card ---- */
.mlist { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.grouphdr { padding: 11px 16px; font-weight: 800; font-size: 14px; letter-spacing: 0.2px; color: var(--teal); background: var(--bg2); border-bottom: 1px solid var(--line); text-transform: uppercase; }
.match { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; transition: background 0.15s; }
.match:last-child { border-bottom: 0; }
.match:hover { background: var(--bg2); }
.match.islive { background: linear-gradient(90deg, rgba(239, 68, 68, 0.07), transparent 60%); }
.side { display: flex; align-items: center; min-width: 0; gap: 10px; }
.side.away { flex-direction: row-reverse; text-align: right; }
.side .lg { width: 38px; height: 38px; }
.side .nm { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { text-align: center; min-width: 78px; }
.score .ss { font-weight: 800; font-size: 26px; line-height: 0.9; letter-spacing: 0; display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }
.score .ss b { background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 3px 11px; min-width: 36px; display: inline-block; }
.score .vs { font-weight: 800; font-size: 15px; color: var(--mut2); }
.st { font-size: 11px; color: var(--mut); margin-top: 6px; font-weight: 600; }
.badge-live { display: inline-flex; align-items: center; gap: 5px; color: #fff; background: var(--red); padding: 3px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.3px; box-shadow: 0 2px 10px rgba(239,68,68,0.4); }
.badge-live .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.1s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---- Standings ---- */
.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
thead th { color: var(--mut); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; padding: 12px 8px; border-bottom: 1px solid var(--line); font-weight: 800; background: var(--bg2); }
tbody td { padding: 11px 8px; font-size: 14px; border-bottom: 1px solid var(--line); text-align: center; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--bg2); }
th.tn, td.tn { text-align: left; }
td.tn { display: flex; align-items: center; gap: 9px; font-weight: 700; }
td.tn .lg { width: 26px; height: 26px; border-radius: 7px; }
td.rk { font-weight: 800; font-size: 15px; color: var(--mut); width: 34px; }
td.pts { font-weight: 800; font-size: 17px; color: var(--teal); }
tbody tr.top td.rk { color: var(--green); }
tbody tr.top td:first-child { box-shadow: inset 3px 0 0 var(--green); }

/* ---- Misc ---- */
.hero-t { display: flex; align-items: center; gap: 16px; margin: var(--sp-3) 0 var(--sp-1); }
.hero-t .lg { width: 62px; height: 62px; border-radius: 15px; }
.hero-t h1 { font-size: 28px; line-height: 1.05; font-weight: 800; letter-spacing: -0.6px; }
.back { display: inline-flex; align-items: center; gap: 7px; color: var(--mut); font-weight: 700; font-size: 13px; margin: 18px 0 6px; cursor: pointer; transition: color 0.15s; }
.back:hover { color: var(--teal); }
.empty { padding: 64px 20px; text-align: center; color: var(--mut); }
.empty svg { width: 46px; height: 46px; color: var(--mut2); margin-bottom: 14px; }
.empty .big { font-weight: 800; font-size: 20px; color: var(--fg); letter-spacing: -0.3px; }
.spin { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: sp 0.7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.foot { text-align: center; color: var(--mut2); font-size: 12px; padding: 34px 0 14px; letter-spacing: 0.3px; }

/* ---- Stagger reveal ---- */
.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.5s cubic-bezier(.2,.7,.3,1) forwards; }
.reveal:nth-child(1){animation-delay:.03s}.reveal:nth-child(2){animation-delay:.09s}.reveal:nth-child(3){animation-delay:.15s}
.reveal:nth-child(4){animation-delay:.21s}.reveal:nth-child(5){animation-delay:.27s}.reveal:nth-child(6){animation-delay:.33s}
.reveal:nth-child(n+7){animation-delay:.38s}
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .brand .sub { display: none; }
  .hero-t h1 { font-size: 23px; }
  .score .ss { font-size: 23px; }
  .side .nm { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .badge-live .dot { animation: none; }
  .tcard, .tab, .chev { transition: none; }
}
