/* ═══════════════════════════════════════════════════
   TU VI — Shared Stylesheet
   Dùng cho: /tu-vi/ + tất cả sub-pages /tu-vi/[slug]/
   ═══════════════════════════════════════════════════ */

/* ── LAYOUT ── */
.tv-page { padding: 20px 0 56px; }
.tv-layout {
  display: grid;
  grid-template-columns: 1fr 296px;
  gap: 24px;
  align-items: start;
}
.tv-main  { display: flex; flex-direction: column; gap: 18px; }
.tv-main article { display: flex; flex-direction: column; gap: 20px; }
.tv-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }

/* ── WIDGET NHẬP LIỆU ── */
.tv-widget {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(10,140,92,.10);
}
.tv-widget-head {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: linear-gradient(135deg, var(--c-primary-dk) 0%, #13a870 100%);
  padding: 20px 22px;
}
.tv-widget-h1 {
  margin: 0; font-size: 22px; font-weight: 800; color: #fff;
  line-height: 1.25; letter-spacing: -.3px;
}
.tv-widget-head > p {
  margin: 0; font-size: 13px; color: rgba(255,255,255,.82); line-height: 1.6;
}
.tv-widget-head-ico {
  width: 42px; height: 42px;
  background: rgba(255,255,255,.15);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.tv-widget-head-text strong { display: block; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.2; }
.tv-widget-head-text span   { color: rgba(255,255,255,.7); font-size: 12px; }
.tv-widget-body { padding: 20px 22px; }

/* Tabs */
.tv-tabs {
  display: flex; gap: 4px;
  background: var(--c-bg);
  border-radius: var(--r-md);
  padding: 4px; margin-bottom: 22px;
}
.tv-tab {
  flex: 1; padding: 8px 6px;
  font-size: 12px; font-weight: 600;
  border: none; background: transparent;
  color: var(--c-text2); cursor: pointer;
  border-radius: 7px; transition: all .18s; white-space: nowrap;
}
.tv-tab:hover { color: var(--c-primary); }
.tv-tab.active {
  background: var(--c-surface);
  color: var(--c-primary-dk);
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}
.tv-panel { display: none; }
.tv-panel.active { display: block; }

/* Form fields */
.tv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tv-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tv-field { display: flex; flex-direction: column; gap: 5px; }
.tv-label {
  font-size: 11px; font-weight: 700;
  color: var(--c-muted); text-transform: uppercase; letter-spacing: .4px;
}
.tv-select, .tv-input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--c-border); border-radius: var(--r-sm);
  font-size: 14px; color: var(--c-text); background: var(--c-bg);
  outline: none; transition: border-color .15s, background .15s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238898a8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.tv-input { background-image: none; padding-right: 12px; }
.tv-select:focus, .tv-input:focus { border-color: var(--c-primary); background: #fff; }
.tv-radio-row { display: flex; gap: 18px; margin: 4px 0 14px; }
.tv-radio-row label { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--c-text2); cursor: pointer; }

.tv-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 20px;
  background: linear-gradient(135deg, var(--c-primary-dk) 0%, #13a870 100%);
  color: #fff; border: none; border-radius: var(--r-full);
  font-size: 14px; font-weight: 700; cursor: pointer;
  text-decoration: none; letter-spacing: .2px;
  transition: opacity .15s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(10,140,92,.30);
}
.tv-btn:hover { opacity: .92; color: #fff; box-shadow: 0 5px 16px rgba(10,140,92,.35); }
.tv-btn.gold {
  background: linear-gradient(135deg, #8a5c08 0%, var(--c-gold) 100%);
  box-shadow: 0 3px 10px rgba(201,146,42,.30);
}
.tv-btn.gold:hover { box-shadow: 0 5px 16px rgba(201,146,42,.40); }

/* ── CONTENT CARD ── */
.tv-card-group {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm);
}
.tv-card-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
}
.tv-card-group-head-ico {
  width: 36px; height: 36px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  background: var(--c-primary-lt); color: var(--c-primary-dk);
}
.tv-card-group-head-ico.gold { background: var(--c-gold-lt); color: var(--c-gold); }
.tv-card-group-head-ico.blue { background: var(--c-blue-lt); color: var(--c-blue); }
.tv-card-group-head h2 { font-size: 15px; font-weight: 700; color: var(--c-text); margin: 0; }
.tv-card-group-head p  { font-size: 12px; color: var(--c-muted); margin: 2px 0 0; }
.tv-card-group-body { padding: 20px; }

/* ── ANCHOR NAV (chi-tiet-ngay style) ── */
.tv-anchor-nav {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: 10px 16px;
  box-shadow: var(--sh-sm);
}
.tv-anchor-nav-label {
  font-size: 11px; font-weight: 700; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: .5px; margin-right: 4px;
}
.tv-anchor-nav a {
  font-size: 12px; color: var(--c-text2); text-decoration: none;
  padding: 4px 10px; border-radius: var(--r-full);
  border: 1px solid var(--c-border);
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
}
.tv-anchor-nav a:hover { background: var(--c-primary-lt); color: var(--c-primary-dk); border-color: var(--c-primary); }

/* ── FEATURE CARDS (index) ── */
.tv-section-label {
  font-size: 11px; font-weight: 700; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 12px;
}
.tv-feat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tv-feat-card {
  display: flex; flex-direction: column;
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r-md); padding: 18px 16px;
  text-decoration: none; color: var(--c-text);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.tv-feat-card:hover { border-color: var(--c-primary); box-shadow: 0 6px 20px rgba(10,140,92,.12); transform: translateY(-2px); }
.tv-feat-card-ico  { font-size: 30px; margin-bottom: 10px; line-height: 1; }
.tv-feat-card-name { font-size: 14px; font-weight: 700; color: var(--c-text); margin-bottom: 5px; }
.tv-feat-card-desc { font-size: 13px; color: var(--c-text2); line-height: 1.55; flex: 1; }
.tv-feat-card-cta  { font-size: 12px; color: var(--c-primary); font-weight: 700; margin-top: 12px; }
.tv-feat-card.is-primary { border-color: var(--c-primary); background: var(--c-primary-lt); }
.tv-feat-card.is-gold    { border-color: #e6b85a; background: var(--c-gold-lt); }
.tv-feat-card.is-gold:hover { border-color: var(--c-gold); box-shadow: 0 6px 20px rgba(201,146,42,.14); }
.tv-feat-card.is-blue    { border-color: #7a9fe0; background: var(--c-blue-lt); }
.tv-feat-card.is-blue:hover { border-color: var(--c-blue); box-shadow: 0 6px 20px rgba(34,85,212,.12); }

/* ── ZODIAC GRID — 12 Con Giáp ── */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.zodiac-card {
  display: flex; flex-direction: column; align-items: center;
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r-md); padding: 14px 10px;
  text-decoration: none; color: var(--c-text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  text-align: center; cursor: pointer;
}
.zodiac-card:hover { border-color: var(--c-primary); box-shadow: 0 4px 14px rgba(10,140,92,.12); transform: translateY(-2px); }
.zodiac-card.is-active { border-color: var(--c-primary); background: var(--c-primary-lt); }
.zodiac-ico  { font-size: 28px; margin-bottom: 6px; line-height: 1; }
.zodiac-name { font-size: 13px; font-weight: 700; color: var(--c-text); margin-bottom: 2px; }
.zodiac-year { font-size: 11px; color: var(--c-muted); }
.zodiac-tag  {
  display: inline-block; margin-top: 6px; padding: 2px 8px;
  border-radius: var(--r-full); font-size: 10px; font-weight: 700;
  letter-spacing: .3px;
}
.zodiac-tag.good { background: var(--c-primary-lt); color: var(--c-primary-dk); }
.zodiac-tag.bad  { background: #fee2e2; color: #b91c1c; }
.zodiac-tag.mid  { background: var(--c-gold-lt); color: #92400e; }

/* Result card for selected zodiac */
.zodiac-result {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); overflow: hidden;
}
.zodiac-result-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--c-primary-dk) 0%, #13a870 100%);
  color: #fff;
}
.zodiac-result-ico  { font-size: 36px; }
.zodiac-result-name { font-size: 18px; font-weight: 800; }
.zodiac-result-sub  { font-size: 12px; opacity: .75; margin-top: 2px; }
.zodiac-result-body { padding: 20px; }

/* Zodiac–year relationship info block */
.tv-zodiac-nam-info { margin-top:14px; padding:14px; border-radius:8px; border:2px solid #e5e7eb; }
.tv-zodiac-nam-good { border-color:#bbf7d0; background:#f0fdf4; }
.tv-zodiac-nam-bad  { border-color:#fca5a5; background:#fef2f2; }
.tv-zodiac-nam-mid  { border-color:#e5e7eb; background:#f9fafb; }

/* Fortune 4-aspect grid */
.fortune-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fortune-item {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: 14px;
}
.fortune-item-head {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 8px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
}
.fortune-item p { font-size: 13px; color: var(--c-text2); line-height: 1.7; margin: 0; }
.fortune-item.career .fortune-item-head { color: var(--c-blue); }
.fortune-item.money  .fortune-item-head { color: var(--c-gold); }
.fortune-item.love   .fortune-item-head { color: #c0392b; }
.fortune-item.health .fortune-item-head { color: var(--c-primary); }

/* ── 12 CUNG MỆNH GRID ── */
.cung-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cung-card {
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r-md); padding: 16px 14px;
  text-decoration: none; color: var(--c-text);
  transition: border-color .15s, box-shadow .15s;
}
.cung-card:hover { border-color: var(--c-primary); box-shadow: 0 4px 14px rgba(10,140,92,.10); }
.cung-num  {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  font-size: 11px; font-weight: 800; margin-bottom: 8px;
}
.cung-name { font-size: 14px; font-weight: 700; color: var(--c-text); margin-bottom: 5px; }
.cung-key  { font-size: 11px; font-weight: 600; color: var(--c-primary-dk); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 5px; }
.cung-desc { font-size: 12px; color: var(--c-text2); line-height: 1.6; }

/* ── SAO CHIẾU MỆNH GRID ── */
.sao-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sao-item {
  border-radius: var(--r-md); padding: 16px 14px;
  border: 1.5px solid var(--c-border); background: var(--c-surface);
}
.sao-item.good { border-color: var(--c-primary); background: var(--c-primary-lt); }
.sao-item.bad  { border-color: #fca5a5; background: #fff5f5; }
.sao-ico  { font-size: 24px; margin-bottom: 8px; }
.sao-name { font-size: 14px; font-weight: 700; color: var(--c-text); margin-bottom: 4px; }
.sao-type {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-full);
  font-size: 10px; font-weight: 700; margin-bottom: 8px;
  letter-spacing: .3px;
}
.sao-type.good { background: var(--c-primary); color: #fff; }
.sao-type.bad  { background: #ef4444; color: #fff; }
.sao-type.mid  { background: var(--c-gold); color: #fff; }
.sao-desc { font-size: 12px; color: var(--c-text2); line-height: 1.65; }

/* ── STEPS (How-to guide) ── */
.steps-row { display: flex; gap: 0; margin-bottom: 20px; }
.step-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 0 12px; position: relative;
}
.step-item + .step-item::before {
  content: '';
  position: absolute; left: 0; top: 20px;
  width: 1px; height: 40px;
  background: var(--c-border);
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; margin-bottom: 10px;
  box-shadow: 0 3px 10px rgba(10,140,92,.25);
}
.step-title { font-size: 13px; font-weight: 700; color: var(--c-text); margin-bottom: 5px; }
.step-desc  { font-size: 12px; color: var(--c-text2); line-height: 1.5; }

/* ── INTRO CARD ── */
.tv-intro {
  background: var(--c-primary-lt);
  border-left: 4px solid var(--c-primary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 14px 18px; margin-bottom: 0;
  font-size: 14px; color: var(--c-text2); line-height: 1.75;
}

/* ── FAQ ── */
.tv-faq { border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; }
.tv-faq-item { border-bottom: 1px solid var(--c-border); }
.tv-faq-item:last-child { border-bottom: none; }
.tv-faq-q {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--c-text);
  transition: background .12s; user-select: none;
}
.tv-faq-q:hover { background: var(--c-bg); }
.tv-faq-q .faq-arrow { color: var(--c-muted); font-size: 12px; margin-top: 2px; flex-shrink: 0; transition: transform .2s; }
.tv-faq-item.open .faq-arrow { transform: rotate(180deg); }
.tv-faq-a {
  display: none; padding: 0 16px 14px;
  font-size: 13px; color: var(--c-text2); line-height: 1.8;
}
.tv-faq-item.open .tv-faq-a { display: block; }

/* ── SAO PROMO ── */
.sao-promo {
  background: linear-gradient(140deg, #0d1b2a 0%, #0a2540 50%, #12355a 100%);
  border-radius: var(--r-lg); padding: 26px 24px;
  position: relative; overflow: hidden;
}
.sao-promo::before {
  content: '✨'; font-size: 140px;
  position: absolute; right: -16px; top: -28px;
  opacity: .06; pointer-events: none; line-height: 1;
}
.sao-promo-star  { font-size: 36px; margin-bottom: 12px; }
.sao-promo-title { font-size: 17px; font-weight: 800; color: #f0d090; margin-bottom: 6px; }
.sao-promo-year  { font-size: 12px; color: rgba(255,255,255,.5); margin-bottom: 12px; }
.sao-promo-desc  { font-size: 13px; color: rgba(255,255,255,.78); line-height: 1.75; margin-bottom: 18px; }
.sao-promo-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--c-gold); color: #fff;
  padding: 10px 22px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: opacity .15s; box-shadow: 0 3px 10px rgba(201,146,42,.4);
}
.sao-promo-link:hover { opacity: .9; color: #fff; }

/* ── SEO CONTENT ── */
.tv-seo {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 24px 26px; box-shadow: var(--sh-sm);
}
.tv-seo h2 {
  font-size: 18px; font-weight: 700; color: var(--c-text);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--c-primary-lt);
}
.tv-seo h3 { font-size: 15px; font-weight: 700; color: var(--c-text); margin: 18px 0 10px; }
.tv-seo p  { font-size: 14px; line-height: 1.85; color: var(--c-text2); margin-bottom: 12px; }
.tv-seo ul { padding-left: 18px; font-size: 14px; line-height: 1.85; color: var(--c-text2); }
.tv-seo ul li { margin-bottom: 8px; }
.tv-seo ul li strong { color: var(--c-text); }

/* ── SIDEBAR — từ ux_mockup_sub_pages.html ── */
.sb-block {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm);
}
.sb-title {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--c-primary-dk) 0%, var(--c-primary) 100%);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 10px 14px; text-transform: uppercase; letter-spacing: .5px;
}
.sb-title.gold   { background: linear-gradient(135deg, #8a5c08 0%, var(--c-gold) 100%); }
.sb-title.blue   { background: linear-gradient(135deg, #1a3d9e 0%, var(--c-blue) 100%); }
.sb-title.orange { background: linear-gradient(135deg, #994d08 0%, var(--c-orange) 100%); }
.sb-ico { font-size: 14px; }

.sb-nav { list-style: none; padding: 6px 0; }
.sb-nav li { border-bottom: 1px solid var(--c-border); }
.sb-nav li:last-child { border-bottom: none; }
.sb-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; font-size: 13px; color: var(--c-text2);
  text-decoration: none; transition: background .12s, color .12s;
}
.sb-nav a:hover { background: var(--c-primary-lt); color: var(--c-primary-dk); }
.sb-nav a.active {
  background: var(--c-primary-lt); color: var(--c-primary);
  font-weight: 700; border-right: 3px solid var(--c-primary);
}
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-border); flex-shrink: 0; }
.sb-nav a.active .nav-dot { background: var(--c-primary); }

.sb-links { list-style: none; padding: 8px 0; }
.sb-links li { border-bottom: 1px solid var(--c-border); }
.sb-links li:last-child { border-bottom: none; }
.sb-links a {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 14px; font-size: 13px; color: var(--c-text2);
  text-decoration: none; transition: background .12s, color .12s; line-height: 1.4;
}
.sb-links a:hover { background: var(--c-blue-lt); color: var(--c-blue); }
.sb-links .ar { color: var(--c-primary); font-size: 12px; margin-top: 1px; flex-shrink: 0; }

.sb-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 10px 14px 14px; padding: 9px 16px;
  background: var(--c-primary-lt); color: var(--c-primary-dk);
  border-radius: var(--r-full); font-size: 13px; font-weight: 700;
  text-decoration: none; transition: background .15s, color .15s;
}
.sb-cta:hover { background: var(--c-primary); color: #fff; }

/* ── RESULT EMPTY STATE ── */
.tv-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 20px; text-align: center;
  background: var(--c-bg); border-radius: var(--r-md);
}
.tv-empty-ico  { font-size: 48px; margin-bottom: 12px; opacity: .6; }
.tv-empty-text { font-size: 14px; color: var(--c-text2); line-height: 1.6; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .tv-layout { grid-template-columns: 1fr; }
  .tv-aside  { position: static; }
  .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
  .cung-grid   { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .tv-feat-cards { grid-template-columns: 1fr; }
  .tv-row, .tv-row-3 { grid-template-columns: 1fr; }
  .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
  .fortune-grid { grid-template-columns: 1fr; }
  .sao-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-row { flex-direction: column; }
  .step-item + .step-item::before { display: none; }
}
@media (max-width: 400px) {
  .zodiac-grid { grid-template-columns: repeat(2, 1fr); }
  .cung-grid   { grid-template-columns: 1fr; }
}

/* ── Cross-hub internal links (partial: cluster/internal-links-cross-hub) ── */
.cross-hub {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 18px;
}
.cross-hub-title {
  font-size: 11.5px; font-weight: 800;
  color: var(--c-muted); text-transform: uppercase; letter-spacing: .5px;
  margin: 0 0 10px; display: flex; align-items: center; gap: 6px;
}
.cross-hub-links {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; padding: 0; margin: 0;
}
.cross-hub-links a {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600;
  color: var(--c-primary-dk); text-decoration: none;
  padding: 5px 13px; border-radius: var(--r-full);
  background: var(--c-primary-lt); border: 1px solid rgba(7,102,68,.18);
  transition: background .14s, color .14s;
}
.cross-hub-links a:hover { background: var(--c-primary); color: #fff; }

/* ── Stretched-link pattern ──────────────────────────────
   Dùng cho feature cards và zodiac cards.
   Parent card cần position:relative; <a class="stretched-link">
   bao tiêu đề, ::after overlay phủ toàn bộ card.
   ──────────────────────────────────────────────────────── */
.tv-feat-card,
.zodiac-card  { position: relative; cursor: pointer; }
.stretched-link {
  color: inherit;
  text-decoration: none;
}
.stretched-link::after {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1;
  content: "";
}

/* ═══════════════════════════════════════════════════
   NTAPI — Xem Ngày Tốt API Result Styles
   Dùng cho: /ngay-tot/{activity}/ sau khi kết nối API
   ═══════════════════════════════════════════════════ */

/* ── Form cá nhân hóa ── */
.ntapi-personal-form {
  background: var(--c-bg);
  border: 1.5px dashed var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-top: 12px;
}
.ntapi-personal-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--c-text2);
  cursor: pointer; user-select: none;
}
.ntapi-personal-toggle input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--c-primary); }
.ntapi-personal-fields { display: none; margin-top: 12px; }
.ntapi-personal-fields.active { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ntapi-personal-fields label { font-size: 11px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .4px; display: block; margin-bottom: 4px; }
.ntapi-personal-fields input {
  width: 100%; padding: 8px 12px;
  border: 1.5px solid var(--c-border); border-radius: var(--r-sm);
  font-size: 13px; color: var(--c-text); background: var(--c-surface);
  outline: none; transition: border-color .15s;
}
.ntapi-personal-fields input:focus { border-color: var(--c-primary); }

/* ── Result header ── */
.ntapi-result-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 8px;
  font-size: 13px; color: var(--c-text2);
  border-bottom: 1px solid var(--c-border); margin-bottom: 12px;
}
.ntapi-result-count strong { color: var(--c-primary-dk); }

/* ── Result grid ── */
.ntapi-result-grid { display: flex; flex-direction: column; gap: 10px; }

/* ── Day card ── */
.ntapi-day-card {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  transition: border-color .15s, box-shadow .15s;
}
.ntapi-day-card:hover { border-color: var(--c-primary); box-shadow: 0 4px 16px rgba(10,140,92,.10); }
.ntapi-day-card--ineligible { background: #fafafa; border-color: #f0f0f0; opacity: .75; }

/* ── Card header ── */
.ntapi-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ntapi-date-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ntapi-day-num {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--c-primary-lt); color: var(--c-primary-dk);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
}
.ntapi-date-info { min-width: 0; }
.ntapi-date-info strong { display: block; font-size: 14px; color: var(--c-text); margin-bottom: 2px; }
.ntapi-lunar { font-size: 12px; color: var(--c-text2); }
.ntapi-lunar em { font-style: normal; color: var(--c-primary-dk); font-weight: 600; }
.ntapi-level-badge { padding: 4px 12px; border-radius: var(--r-full); font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* ── Trực 12 badge ── */
.ntapi-truc { display: inline-block; padding: 1px 7px; border-radius: var(--r-full); font-size: 11px; font-weight: 600; margin-left: 4px; }
.ntapi-truc-good    { background: #dcfce7; color: #166534; }
.ntapi-truc-bad     { background: #fee2e2; color: #991b1b; }
.ntapi-truc-neutral { background: #fef3c7; color: #92400e; }

/* ── Score bar ── */
.ntapi-score-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ntapi-score-bar { flex: 1; height: 6px; background: var(--c-border); border-radius: var(--r-full); overflow: hidden; }
.ntapi-score-fill { height: 100%; border-radius: var(--r-full); transition: width .6s ease; }
.ntapi-score-num { font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* ── Info rows ── */
.ntapi-gio-hd, .ntapi-notes, .ntapi-warn, .ntapi-disqual, .ntapi-summary {
  font-size: 12.5px; color: var(--c-text2); line-height: 1.6; margin-top: 5px;
}
.ntapi-gio-hd span { color: var(--c-text); font-weight: 600; }
.ntapi-warn    { color: #92400e; }
.ntapi-disqual { color: #991b1b; }
.ntapi-summary { color: var(--c-muted); font-style: italic; }

/* ── Loading ── */
.ntapi-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 14px; color: var(--c-text2); font-size: 14px; }
.ntapi-loading-spinner { width: 36px; height: 36px; border: 3px solid var(--c-border); border-top-color: var(--c-primary); border-radius: 50%; animation: ntapi-spin .8s linear infinite; }
@keyframes ntapi-spin { to { transform: rotate(360deg); } }

/* ── Error ── */
.ntapi-error { text-align: center; padding: 32px 20px; background: #fef2f2; border: 1.5px solid #fca5a5; border-radius: var(--r-md); }
.ntapi-error-ico { font-size: 36px; margin-bottom: 10px; }
.ntapi-error p   { font-size: 14px; color: #991b1b; margin-bottom: 14px; }
.ntapi-retry-btn { padding: 8px 20px; border-radius: var(--r-full); background: var(--c-primary); color: #fff; border: none; font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity .15s; }
.ntapi-retry-btn:hover { opacity: .88; }

/* ── Empty ── */
.ntapi-empty { text-align: center; padding: 40px 20px; color: var(--c-text2); }
.ntapi-empty-ico { font-size: 44px; margin-bottom: 12px; }
.ntapi-empty p   { font-size: 14px; line-height: 1.7; }

/* ── Container wrapper ── */
.ntapi-container { margin-top: 8px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-sm); min-height: 60px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .ntapi-personal-fields.active { grid-template-columns: 1fr; }
  .ntapi-card-head { flex-wrap: wrap; }
  .ntapi-level-badge { align-self: flex-start; }
}

/* ══════════════════════════════════════════════════════════════
   PHONG THỦY API RESULT — pt-api-*
   Design: light · minimal · elegant
   ══════════════════════════════════════════════════════════════ */

/* Loading */
.pt-api-loading {
  text-align: center; padding: 32px 20px; color: #9ca3af;
}
.pt-api-spinner {
  display: inline-block; width: 28px; height: 28px;
  border: 2.5px solid #e5e7eb; border-top-color: #6b7280;
  border-radius: 50%; animation: pt-spin .8s linear infinite;
  margin-bottom: 10px;
}
.pt-api-loading p { font-size: 12.5px; color: #9ca3af; margin: 0; }
@keyframes pt-spin { to { transform: rotate(360deg); } }

/* Error */
.pt-api-error {
  background: #fafafa; border: 1px solid #f3f4f6;
  border-radius: 8px; padding: 12px 14px;
  color: #6b7280; font-size: 12.5px; margin-top: 10px;
}

/* Result container */
.pt-api-result-box { margin-top: 14px; }

/* ── Hero profile card ── */
.pt-api-hero {
  border-radius: 10px;
  border: 1px solid;
  padding: 16px 16px 12px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.pt-api-hero::after {
  content: ''; position: absolute;
  inset: 0; border-radius: 10px;
  background: rgba(255,255,255,.42);
  pointer-events: none;
}
.pt-api-hero-row {
  display: flex; align-items: center; gap: 12px;
}
.pt-api-menh-badge {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.pt-api-menh-lbl {
  font-size: 9px; font-weight: 700; letter-spacing: .5px;
  color: rgba(255,255,255,.75); text-transform: uppercase;
}
.pt-api-menh-val {
  font-size: 18px; font-weight: 800; color: #fff; line-height: 1;
}
.pt-api-hero-info { flex: 1; min-width: 0; }
.pt-api-cung {
  font-size: 13.5px; font-weight: 700; color: #111827;
  margin-bottom: 3px; line-height: 1.4;
}
.pt-api-trach {
  font-size: 11.5px; font-weight: 600;
  margin-bottom: 2px; opacity: .85;
}
.pt-api-cuchi { font-size: 11px; color: #9ca3af; }

/* Main hướng highlight */
.pt-api-main-huong {
  margin-top: 12px;
  border-radius: 7px; border: 1px solid;
  padding: 9px 13px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(4px);
}
.pt-api-mh-lbl {
  font-size: 11px; font-weight: 600; color: #6b7280; letter-spacing: .2px;
}
.pt-api-mh-val {
  font-size: 17px; font-weight: 800; letter-spacing: -.2px;
  display: flex; align-items: center; gap: 6px;
}
.pt-api-mh-arrow {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.7);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
}

/* ── Sections ── */
.pt-api-section {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 13px 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.pt-api-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: #9ca3af;
  margin-bottom: 10px;
}

/* ── Direction grid ── */
.pt-api-dir-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
@media (max-width: 520px) {
  .pt-api-dir-grid { grid-template-columns: repeat(2, 1fr); }
}
.pt-api-dir-card {
  border-radius: 7px; padding: 9px 4px; text-align: center;
  border: 1px solid; transition: box-shadow .15s;
}
.pt-api-dir-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* Cát — xanh lá nhẹ */
.pt-api-cat  { background: #f6fef9; border-color: #d1fae5; }
/* Hung — đỏ rất nhạt */
.pt-api-hung { background: #fef9f9; border-color: #fde8e8; }

.pt-api-dir-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  margin: 0 auto 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.pt-api-cat  .pt-api-dir-arrow { background: #d1fae5; color: #065f46; }
.pt-api-hung .pt-api-dir-arrow { background: #fde8e8; color: #991b1b; }

.pt-api-dir-name {
  font-size: 12px; font-weight: 700; color: #1f2937; line-height: 1.2;
}
.pt-api-dir-lbl {
  font-size: 9.5px; color: #9ca3af; margin-top: 2px; line-height: 1.3;
}
.pt-api-cat  .pt-api-dir-lbl { color: #6ee7b7; }
.pt-api-hung .pt-api-dir-lbl { color: #fca5a5; }

/* ── Info row (màu, văn xương, tài vị) ── */
.pt-api-info-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
@media (max-width: 480px) { .pt-api-info-row { grid-template-columns: 1fr; } }
.pt-api-info-box {
  border: 1px solid #f3f4f6; border-radius: 7px;
  padding: 9px 10px; background: #fafafa;
}
.pt-api-info-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: #9ca3af; margin-bottom: 5px;
}
.pt-api-info-val {
  font-size: 13px; font-weight: 700; color: #374151;
}

/* Tags */
.pt-api-tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.pt-api-tag {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 10.5px; font-weight: 600;
  background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0;
}

/* Luận giải */
.pt-api-luan-giai p {
  font-size: 12.5px; color: #6b7280; line-height: 1.75; margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   CCAPI — Công Cụ AJAX Result Styles
   Dùng cho: /cong-cu/{tool}/ sau khi chuyển sang AJAX
   cc-result-box, ccapi-loading, ccapi-error, ccapi-info-grid...
   ══════════════════════════════════════════════════════════════ */

/* ── Loading ── */
.ccapi-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 36px 20px; gap: 12px;
  color: var(--c-text2); font-size: 14px;
}
.ccapi-spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: ccapi-spin .75s linear infinite;
}
@keyframes ccapi-spin { to { transform: rotate(360deg); } }
.ccapi-loading p { margin: 0; color: var(--c-muted); font-size: 13px; }

/* ── Error ── */
.ccapi-error {
  text-align: center; padding: 28px 20px;
  background: #fef2f2; border: 1.5px solid #fca5a5;
  border-radius: var(--r-md);
}
.ccapi-error-ico { font-size: 34px; margin-bottom: 8px; }
.ccapi-error p   { font-size: 13.5px; color: #991b1b; margin: 0 0 12px; }

/* ── Result container (hidden → visible khi có kết quả) ── */
#cc-result-box { display: none; }

/* ── Result head (gradient bar) ── */
.ccapi-result-head {
  background: linear-gradient(135deg, var(--c-primary-dk) 0%, #13a870 100%);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 16px 20px;
}
.ccapi-result-label {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.65);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px;
}
.ccapi-result-val {
  font-size: 18px; font-weight: 900; color: #fff; line-height: 1.3;
}
.ccapi-result-body {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

/* ── Info grid (2 cột) ── */
.ccapi-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.ccapi-info-item {
  padding: 13px 18px;
  border-right: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.ccapi-info-item:nth-child(even) { border-right: none; }
.ccapi-info-item:nth-last-child(-n+2) { border-bottom: none; }
.ccapi-info-label {
  font-size: 10.5px; font-weight: 700; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px;
}
.ccapi-info-val { font-size: 14px; font-weight: 700; color: var(--c-text); }
.ccapi-info-sub { font-size: 11px; color: var(--c-muted); margin-top: 1px; }

/* ── Notice box ── */
.ccapi-notice {
  background: var(--c-primary-lt);
  border: 1px solid var(--c-primary);
  border-left: 4px solid var(--c-primary-dk);
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: 13px; color: var(--c-text2); line-height: 1.8;
}
.ccapi-notice strong { color: var(--c-primary-dk); }

/* ── Tag chips ── */
.ccapi-tag-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; }
.ccapi-tag {
  font-size: 12px; font-weight: 600; padding: 5px 13px;
  border-radius: var(--r-full); border: 1.5px solid;
}
.ccapi-tag.good { background: var(--c-primary-lt); color: var(--c-primary-dk); border-color: var(--c-primary); }
.ccapi-tag.bad  { background: #fff4f4; color: #c0392b; border-color: #fca5a5; }
.ccapi-tag.neutral { background: var(--c-bg); color: var(--c-text2); border-color: var(--c-border); }

/* ── Số card (số may mắn) ── */
.ccapi-num-row {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 20px; flex-wrap: wrap;
}
.ccapi-num-wrap { text-align: center; }
.ccapi-num-card {
  width: 72px; height: 72px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--c-primary-dk) 0%, #13a870 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900;
  box-shadow: 0 4px 16px rgba(10,140,92,.22);
}
.ccapi-num-label { font-size: 11px; color: var(--c-muted); margin-top: 5px; }

/* ── Giờ hoàng đạo grid ── */
.ccapi-gio-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 14px 18px;
}
.ccapi-gio-item {
  border-radius: var(--r-md); padding: 9px 10px; text-align: center;
  background: var(--c-primary-lt); border: 1px solid var(--c-primary);
}
.ccapi-gio-name { font-size: 13px; font-weight: 800; color: var(--c-primary-dk); }
.ccapi-gio-time { font-size: 11px; color: var(--c-muted); margin-top: 2px; }

/* ── Reset button ── */
.ccapi-reset-wrap { padding: 14px 18px; border-top: 1px solid var(--c-border); }
.ccapi-reset-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 20px; border-radius: var(--r-full);
  background: var(--c-bg); color: var(--c-text2);
  border: 1.5px solid var(--c-border);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
}
.ccapi-reset-btn:hover { background: var(--c-primary-lt); color: var(--c-primary-dk); border-color: var(--c-primary); }

/* ── Responsive ── */
/* ── NGŨ HÀNH — section headings shared across all /ngu-hanh/* pages ── */
.nh-h2 {
  font-size: 15px; font-weight: 700; color: var(--c-text);
  margin: 0 0 14px; padding: 2px 0 10px 12px;
  border-left: 3px solid #4338ca;
  border-bottom: 1px solid var(--c-border);
  line-height: 1.45;
}
.nh-h3 {
  font-size: 11px; font-weight: 700; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: .6px;
  margin: 16px 0 8px;
}

@media (max-width: 520px) {
  .ccapi-info-grid { grid-template-columns: 1fr; }
  .ccapi-info-item { border-right: none; }
  .ccapi-gio-grid  { grid-template-columns: repeat(2, 1fr); }
  .ccapi-num-card  { width: 60px; height: 60px; font-size: 26px; }
}