/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  background: #f1f5f9;
  line-height: 1.7;
  font-size: 15px;
  overflow-x: hidden;
  max-width: 100%;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { color: #2563eb; text-decoration: none; word-break: break-word; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 12px; }
p { margin: 0 0 12px; }

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 28px 20px; gap: 20px; flex-wrap: wrap;
}
.header-title { flex: 1; min-width: 280px; }
.header-title h1 { font-size: 1.5rem; margin: 0 0 10px; font-weight: 700; }
.header-title h1 i { margin-right: 10px; color: #fbbf24; }
.candidate-info { margin: 0 0 6px; font-size: 1.05rem; opacity: 0.98; }
.candidate-info-2 { margin: 0 0 6px; font-size: 0.95rem; opacity: 0.92; }
.verify-flag {
  background: #fbbf24; color: #78350f; padding: 2px 8px;
  border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  margin-left: 4px; cursor: help; white-space: nowrap;
  vertical-align: middle;
}
.report-date { margin: 6px 0 0; font-size: 0.85rem; opacity: 0.8; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; border: none;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-primary { background: #fbbf24; color: #1e293b; }
.btn-primary:hover { background: #f59e0b; transform: translateY(-1px); }

/* ===== COUNTDOWN ===== */
.countdown-bar {
  background: rgba(0,0,0,0.28); backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.countdown-inner {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 20px; gap: 16px; flex-wrap: wrap;
}
.countdown-label { font-weight: 500; font-size: 0.95rem; max-width: 600px; }
.countdown-label i { color: #fbbf24; margin-right: 6px; }
.countdown-timer { display: flex; gap: 8px; }
.cd-box {
  background: #fbbf24; color: #1e293b; border-radius: 6px;
  padding: 8px 12px; min-width: 60px; text-align: center;
  font-weight: 700; font-size: 1.15rem;
}
.cd-box em { display: block; font-size: 0.7rem; font-weight: 500; font-style: normal; opacity: 0.8; }

/* ===== NAV ===== */
.site-nav {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 0;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.03);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.site-nav ul::-webkit-scrollbar {
  display: none;
}
.site-nav a {
  display: inline-block;
  padding: 8px 16px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.site-nav a:hover {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
  text-decoration: none;
}
.site-nav a.active {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}


/* ===== MAIN ===== */
.main-content { padding: 32px 20px; }
.section { margin-bottom: 44px; scroll-margin-top: 70px; }
.section > h2 {
  font-size: 1.55rem; color: #1e3a8a; padding-bottom: 12px;
  border-bottom: 3px solid #2563eb; display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.sec-num {
  display: inline-flex; align-items: center; justify-content: center;
  background: #2563eb; color: #fff; border-radius: 10px;
  min-width: 44px; height: 44px; padding: 0 8px;
  font-weight: 700; font-size: 1.05rem;
}

/* ===== CARDS ===== */
.card {
  background: #fff; border-radius: 12px; padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 18px;
}
.highlight-card { border-left: 5px solid #fbbf24; }
.card .warn {
  background: #fef3c7; padding: 14px; border-radius: 8px;
  color: #92400e; font-weight: 600; margin: 12px 0;
}
.card .note {
  background: #eff6ff; padding: 14px; border-radius: 8px;
  color: #1e40af; font-size: 0.92rem; margin: 12px 0;
}
.card .note.note-green {
  background: #ecfdf5; color: #065f46;
}
.card .src { font-size: 0.87rem; color: #64748b; }
.card h4 { color: #1e3a8a; margin-top: 20px; font-size: 1.05rem; }
.card h4:first-child { margin-top: 0; }

.note-block { margin: 16px 0; }

.warn-format {
  background: #fff7ed; border-left: 4px solid #f97316;
  padding: 16px 20px; border-radius: 8px; margin-top: 16px;
}
.warn-format h4 { color: #9a3412; margin-top: 0; }
.warn-format h4 i { color: #f97316; margin-right: 6px; }
.warn-format p { color: #7c2d12; margin-bottom: 8px; }
.warn-format p:last-child { margin-bottom: 0; }

.warn-verify {
  background: #fef2f2; border-left: 4px solid #dc2626;
  padding: 12px 16px; border-radius: 8px; margin: 12px 0;
  color: #7f1d1d; font-size: 0.92rem;
}
.warn-verify strong { color: #991b1b; }
.warn-verify i { color: #dc2626; margin-right: 6px; }

.success-verify {
  background: #ecfdf5; border-left: 4px solid #10b981;
  padding: 12px 16px; border-radius: 8px; margin: 12px 0;
  color: #065f46; font-size: 0.92rem;
}
.success-verify strong { color: #047857; }
.success-verify i { color: #10b981; margin-right: 6px; }

.verify-flag-done {
  background: #10b981; color: #fff; padding: 2px 8px;
  border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  margin-left: 4px; cursor: help; white-space: nowrap;
  vertical-align: middle;
}

.highlight-box {
  background: #f8fafc; border-left: 4px solid #2563eb;
  padding: 16px 20px; border-radius: 8px; margin-top: 16px;
}
.highlight-box h4 { color: #1e3a8a; margin-top: 0; }

/* ===== LISTS ===== */
.big-list { padding-left: 22px; }
.big-list li { margin-bottom: 12px; }
.sub-list { padding-left: 20px; margin: 10px 0; }
.sub-list li { margin-bottom: 8px; }
.rule-list, .principle-list, .link-list { padding-left: 22px; }
.rule-list li, .principle-list li { margin-bottom: 14px; }
.link-list li { margin-bottom: 8px; }
ul, ol { line-height: 1.7; }

/* ===== TABLES ===== */
.info-table, .data-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.info-table th { width: 42%; background: #f8fafc; color: #475569; font-weight: 500; }

.table-wrap { overflow-x: auto; margin: 12px 0; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.data-table th { background: #1e3a8a; color: #fff; cursor: pointer; user-select: none; white-space: nowrap; font-size: 0.9rem; }
.data-table th:hover { background: #2563eb; }
.data-table th i { margin-left: 6px; opacity: 0.6; font-size: 0.75rem; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table td { font-size: 0.9rem; }

/* ===== GLOSSARY ===== */
.glossary-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px; margin: 16px 0;
}
.gloss {
  background: #f8fafc; padding: 12px 14px; border-radius: 8px;
  border-left: 3px solid #2563eb;
}
.gloss strong { display: block; color: #1e3a8a; font-size: 0.95rem; margin-bottom: 4px; }
.gloss span { font-size: 0.88rem; color: #475569; line-height: 1.55; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; margin: 2px;
  white-space: nowrap;
}
.badge i { font-size: 0.75rem; }
.badge-mo { background: #fecaca; color: #991b1b; }
.badge-phu { background: #fef3c7; color: #92400e; }
.badge-an { background: #bbf7d0; color: #166534; }

/* ===== SCHEMA BOX ===== */
.schema-box {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-top: 20px; flex-wrap: wrap;
}
.schema-item {
  padding: 18px 22px; border-radius: 12px; text-align: center;
  font-weight: 700; min-width: 120px; font-size: 1rem;
}
.schema-item small { display: block; font-weight: 500; font-size: 0.78rem; opacity: 0.85; margin-top: 4px; }
.schema-mo { background: #fecaca; color: #991b1b; }
.schema-phu { background: #fef3c7; color: #92400e; }
.schema-an { background: #bbf7d0; color: #166534; }
.schema-arrow { font-size: 1.7rem; color: #94a3b8; font-weight: 700; }

/* ===== NV LIST ===== */
.filter-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
  flex-wrap: wrap; background: #fff; padding: 14px; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.filter-label { font-weight: 600; color: #475569; margin-right: 4px; }
.filter-btn {
  padding: 8px 16px; border: 2px solid #cbd5e1; background: #fff;
  border-radius: 999px; font-family: inherit; font-weight: 500;
  cursor: pointer; transition: all 0.2s; font-size: 0.88rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-btn:hover { border-color: #2563eb; color: #2563eb; }
.filter-btn.active { background: #2563eb; border-color: #2563eb; color: #fff; }

.nv-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px; margin-bottom: 20px;
}
.nv-card {
  background: #fff; border-radius: 12px; padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 5px solid #cbd5e1;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.nv-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.nv-card.group-mo { border-left-color: #dc2626; }
.nv-card.group-phu { border-left-color: #f59e0b; }
.nv-card.group-an { border-left-color: #16a34a; }

.nv-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; gap: 8px; flex-wrap: wrap;
}
.nv-stt {
  background: #1e3a8a; color: #fff; padding: 5px 12px;
  border-radius: 6px; font-weight: 700; font-size: 0.85rem;
}
.nv-school {
  font-weight: 700; font-size: 1.05rem; color: #1e3a8a;
  margin: 6px 0 6px; line-height: 1.35;
}
.nv-school em { font-style: normal; font-weight: 500; color: #64748b; font-size: 0.9rem; }
.nv-major {
  color: #334155; margin: 0 0 12px; font-size: 0.95rem;
}
.nv-major i { color: #2563eb; margin-right: 6px; }

.nv-meta {
  background: #f8fafc; padding: 10px 12px; border-radius: 8px;
  margin: 0 0 12px; font-size: 0.87rem;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 12px;
}
.nv-meta dt { font-weight: 600; color: #475569; }
.nv-meta dd { margin: 0; color: #1e293b; }

.nv-diemchuan {
  background: #fff7ed; border: 1px solid #fed7aa;
  padding: 10px 12px; border-radius: 8px; margin: 0 0 12px;
}
.dc-label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: #9a3412; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.03em;
}
.dc-years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dc-year {
  background: #fff; border-radius: 6px; padding: 6px 4px;
  text-align: center; border: 1px solid #fed7aa;
}
.dc-year .dc-y {
  display: block; font-size: 0.72rem; color: #64748b; font-weight: 500;
}
.dc-year .dc-v {
  display: block; font-size: 0.95rem; font-weight: 700; color: #1e293b;
  margin-top: 2px;
}
.dc-year.dc-latest { background: #fed7aa; border-color: #f97316; }
.dc-year.dc-latest .dc-v { color: #9a3412; }

.nv-note {
  font-size: 0.87rem; color: #475569; font-style: italic;
  padding: 0 0 12px; line-height: 1.55; flex: 1;
}
.nv-prob {
  background: #eff6ff; padding: 10px 14px; border-radius: 8px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.9rem; margin-top: auto;
}
.prob-label { color: #475569; }
.prob-value { font-weight: 700; color: #1e3a8a; font-size: 1.05rem; }
.empty-state { padding: 20px; text-align: center; color: #64748b; }

/* ===== SCENARIO ===== */
.scenario-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}
.scenario-card { position: relative; padding-top: 28px; }
.scenario-card.recommended { border: 2px solid #16a34a; }
.scenario-card h3 { color: #1e3a8a; font-size: 1.1rem; }
.scenario-card h3 i { color: #2563eb; margin-right: 8px; }
.ribbon {
  position: absolute; top: -12px; right: 16px;
  background: #16a34a; color: #fff; padding: 5px 14px;
  border-radius: 6px; font-size: 0.78rem; font-weight: 700;
  box-shadow: 0 2px 6px rgba(22,163,74,0.3);
}

/* ===== ACCORDION ===== */
.accordion { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.acc-item { border-bottom: 1px solid #e2e8f0; }
.acc-item:last-child { border-bottom: none; }
.acc-header {
  width: 100%; padding: 18px 22px; background: #fff; border: none;
  text-align: left; font-family: inherit; font-size: 1.02rem; font-weight: 600;
  color: #1e3a8a; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; transition: background 0.2s;
}
.acc-header:hover { background: #f8fafc; }
.acc-header i { transition: transform 0.3s; color: #64748b; flex-shrink: 0; }
.acc-item.open .acc-header i { transform: rotate(180deg); }
.acc-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 22px; background: #f8fafc;
}
.acc-item.open .acc-body { max-height: 1500px; padding: 18px 22px; }
.acc-body ul { padding-left: 22px; }
.acc-body li { margin-bottom: 6px; }

/* ===== TIMELINE ===== */
.timeline { list-style: none; padding: 0; margin: 16px 0 0; }
.timeline li {
  display: flex; gap: 20px; padding: 14px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.timeline li:last-child { border-bottom: none; }
.tl-date {
  min-width: 180px; font-weight: 700; color: #2563eb; font-size: 0.92rem;
  flex-shrink: 0;
}
.timeline .tl-critical .tl-date { color: #dc2626; }
.timeline .tl-critical {
  background: #fef2f2; padding: 16px; border-radius: 8px;
  border-left: 4px solid #dc2626;
}
.tl-desc { flex: 1; }

/* ===== Q&A ===== */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.qa-card h4 { font-size: 1rem; line-height: 1.4; }
.qa-card h4 i { color: #2563eb; margin-right: 8px; }
.qa-card ul { padding-left: 22px; margin: 0; }
.qa-card li { margin-bottom: 10px; }

.src-card { background: #f8fafc; }

/* ===== FOOTER ===== */
.site-footer { background: #1e293b; color: #cbd5e1; padding: 24px 20px; text-align: center; font-size: 0.88rem; margin-top: 40px; }
.site-footer p { margin: 4px 0; }

/* ===== NV GRID LAYOUT ===== */
.nv-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 1024px) {
  .nv-layout-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.nv-table-side {
  position: sticky;
  top: 80px;
  z-index: 10;
}
.nv-summary-table th {
  background: #1e3a8a;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}
.nv-summary-table td {
  font-size: 0.82rem;
  padding: 8px 10px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.nv-summary-table tbody tr {
  transition: transform 0.15s;
}
.nv-summary-table tbody tr:hover {
  background: #eff6ff;
}
.nv-summary-table tbody tr.active-row {
  background: #dbeafe !important;
  font-weight: 600;
}
.nv-summary-table .badge {
  padding: 2px 6px;
  font-size: 0.72rem;
}

/* Highlight card effect */
.nv-card.highlighted-card {
  animation: cardHighlightAnim 1.5s ease-out;
}
@keyframes cardHighlightAnim {
  0% {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.4);
    transform: scale(1.02);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2);
    transform: scale(1.01);
  }
  100% {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transform: scale(1);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .header-title h1 { font-size: 1.15rem; }
  .candidate-info { font-size: 0.9rem; }
  .candidate-info-2 { font-size: 0.85rem; }
  .header-inner { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; justify-content: center; }
  .section > h2 { font-size: 1.2rem; }
  .sec-num { min-width: 36px; height: 36px; font-size: 0.9rem; }
  .card { padding: 16px; }
  .nv-list { grid-template-columns: 1fr; }
  .nv-meta { grid-template-columns: 1fr; gap: 2px; }
  .nv-meta dt { margin-top: 4px; }
  .cd-box { min-width: 50px; font-size: 1rem; padding: 6px 8px; }
  .countdown-label { font-size: 0.85rem; text-align: center; }
  .tl-date { min-width: 100px; font-size: 0.82rem; }
  .timeline li { flex-direction: column; gap: 4px; }
  .info-table, .info-table tbody, .info-table tr, .info-table th, .info-table td {
    display: block;
    width: 100% !important;
    text-align: left;
  }
  .info-table th {
    background: #f8fafc;
    color: #1e3a8a;
    font-weight: 700;
    padding: 8px 12px;
    border-bottom: none;
    font-size: 0.88rem;
  }
  .info-table td {
    padding: 8px 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.88rem;
  }
  .info-table tr:last-child td {
    border-bottom: none;
  }
  .schema-box { flex-direction: column; }
  .schema-arrow { transform: rotate(90deg); }
  .glossary-grid { grid-template-columns: 1fr; }
  .filter-bar { justify-content: center; }
  .acc-header { font-size: 0.95rem; padding: 14px 16px; }
  .acc-item.open .acc-body { padding: 14px 16px; }
  
  /* Responsive Table & Nav optimizations */
  .site-nav a { padding: 6px 12px; font-size: 0.75rem; }
  .data-table th, .data-table td { padding: 8px 10px; font-size: 0.8rem; }
  .nv-summary-table th, .nv-summary-table td { padding: 6px 8px; font-size: 0.75rem; }
}

/* ===== PRINT ===== */
@media print {
  .no-print { display: none !important; }
  body {
    background: #fff !important; color: #000 !important;
    font-size: 10.5pt; line-height: 1.5;
  }
  .container { max-width: 100%; padding: 0; }
  .site-header {
    background: #fff !important; color: #000 !important;
    box-shadow: none; border-bottom: 2px solid #000;
  }
  .header-title h1, .candidate-info, .candidate-info-2, .report-date { color: #000 !important; }
  .header-title h1 i { color: #000 !important; }
  .main-content { padding: 12px 0; }
  .section { page-break-inside: avoid; margin-bottom: 20px; }
  .section > h2 { color: #000 !important; border-bottom-color: #000 !important; font-size: 14pt; }
  .sec-num { background: #000 !important; color: #fff !important; }
  .card {
    box-shadow: none !important; border: 1px solid #999;
    page-break-inside: avoid; padding: 12px;
  }
  .nv-list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .nv-card {
    box-shadow: none !important; border: 1px solid #999;
    page-break-inside: avoid; padding: 12px;
  }
  .acc-body { max-height: none !important; padding: 12px 20px !important; display: block !important; }
  .acc-item .acc-body { display: block !important; }
  a { color: #000 !important; text-decoration: underline; }
  .badge { border: 1px solid #000; }
  .site-footer { display: none; }
  .highlight-box, .note-block, .note { background: #f5f5f5 !important; color: #000 !important; }
}
