
/* Giao diện SA HÌNH – bản dùng chung (2026) */
/* Mục tiêu: đẹp – sạch – dễ đọc – tối ưu di động – không nền xanh đậm chói */

:root{
  /* Màu thương hiệu (dịu mắt) */
  --mau-chinh: #0B5BD3;
  --mau-chinh-2: #0847A6;
  --mau-vang: #FFC928;

  /* Nền / chữ */
  --nen: #F6F8FC;
  --nen-2:#FFFFFF;
  --chu: #0B1220;
  --chu-phu:#4B5567;
  --vien:#E6EAF2;

  /* Trạng thái */
  --xanh-la:#039855;
  --do:#D92D20;
  --cam:#C2410C;

  /* Bo góc / bóng */
  --r: 18px;
  --r2: 24px;
  --bong: 0 16px 38px rgba(11,18,32,.10);
  --bong-nhe: 0 10px 22px rgba(11,18,32,.08);

  /* Khoảng cách */
  --g: 16px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:"Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--chu);
  background:
    radial-gradient(1100px 520px at 18% -10%, rgba(11,91,211,.18), rgba(11,91,211,0) 62%),
    radial-gradient(900px 520px at 92% 0%, rgba(255,201,40,.14), rgba(255,201,40,0) 58%),
    linear-gradient(180deg, #FFFFFF 0%, var(--nen) 42%, #FFFFFF 100%);
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; height:auto; display:block; }

/* Khung chung */
.wrap, .container{ max-width: 1240px; margin: 0 auto; padding: 18px; }
@media (min-width: 900px){
  .wrap, .container{ padding: 22px; }
}

/* Thanh đầu trang */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--vien);
}
.nav, .topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.nav{ padding: 12px 18px; }
.topbar{
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.70);
  border: 1px solid var(--vien);
  box-shadow: var(--bong-nhe);
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}
.logo, .logo3d{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.92), rgba(255,255,255,0) 52%),
    linear-gradient(145deg, rgba(11,91,211,.22), rgba(255,201,40,.18));
  border: 1px solid var(--vien);
  box-shadow: 0 10px 22px rgba(11,18,32,.10);
  flex: 0 0 auto;
}
.brand b, .brand .title{
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.navlinks{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}
.navlinks a{
  font-weight: 700;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.70);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.navlinks a:hover{
  transform: translateY(-1px);
  box-shadow: var(--bong-nhe);
  border-color: rgba(11,91,211,.30);
}

/* Nút chung */
.btn, .nut, .nut-nho, .thanh-ho-tro__nut, .audioIconBtn{
  -webkit-tap-highlight-color: transparent;
  cursor:pointer;
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.82);
  color: var(--chu);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover, .nut:hover, .nut-nho:hover, .thanh-ho-tro__nut:hover, .audioIconBtn:hover{
  transform: translateY(-1px);
  box-shadow: var(--bong-nhe);
  border-color: rgba(11,91,211,.30);
}
.btn:active, .nut:active, .nut-nho:active, .thanh-ho-tro__nut:active, .audioIconBtn:active{
  transform: translateY(0);
  box-shadow: none;
}
.btn:focus-visible, .nut:focus-visible, .audioIconBtn:focus-visible{
  outline: 3px solid rgba(11,91,211,.22);
  outline-offset: 2px;
}

.nut-chinh, .btn.primary{
  background: linear-gradient(135deg, var(--mau-chinh), var(--mau-chinh-2));
  color: #fff;
  border-color: rgba(11,91,211,.35);
}
.nut-vang, .btn.yellow{
  background: linear-gradient(135deg, var(--mau-vang), #FFB800);
  border-color: rgba(255,201,40,.55);
}
.nut-vien, .btn.outline{
  background: rgba(255,255,255,.72);
  border-color: rgba(11,91,211,.28);
}
.nut-nho, .nut-nho-chinh, .nut-nho-vang, .nut-nho-vien{
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 12px;
}
.nut-nho-chinh{ background: linear-gradient(135deg, var(--mau-chinh), var(--mau-chinh-2)); color:#fff; border-color: rgba(11,91,211,.35); }
.nut-nho-vang{ background: linear-gradient(135deg, var(--mau-vang), #FFB800); border-color: rgba(255,201,40,.55); }
.nut-nho-vien{ background: rgba(255,255,255,.72); border-color: rgba(11,91,211,.28); }

/* Hero */
.hero{
  margin-top: 10px;
  border-radius: var(--r2);
  overflow:hidden;
  position: relative;
  border: 1px solid var(--vien);
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(11,91,211,.20), rgba(11,91,211,0) 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(255,201,40,.16), rgba(255,201,40,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  box-shadow: var(--bong);
}
.heroMain{
  padding: 22px 18px;
}
@media (min-width: 900px){
  .heroMain{ padding: 30px 26px; }
}

.h1, h1{
  font-size: clamp(24px, 3.6vw, 44px);
  line-height: 1.08;
  margin: 0 0 10px;
  letter-spacing: -.2px;
  font-weight: 900;
}
.sub, .muted{
  color: var(--chu-phu);
  font-size: 15px;
  line-height: 1.6;
}
.h2, h2{
  font-size: 20px;
  margin: 0 0 12px;
  font-weight: 900;
  letter-spacing: -.1px;
}
.h3, h3{
  font-size: 16px;
  margin: 0 0 10px;
  font-weight: 900;
}
p{ margin: 0 0 12px; line-height: 1.7; color: var(--chu); }
.small, .mini{ font-size: 13px; color: var(--chu-phu); }

/* Thẻ nhãn / chip */
.badges, .chips{ display:flex; flex-wrap:wrap; gap: 8px; }
.badge, .chip, .tag, .pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.78);
  font-weight: 800;
  font-size: 12.5px;
  color: var(--chu);
}
.dot{ width:8px;height:8px;border-radius:99px;background: var(--mau-chinh); }
.yellow{ color: var(--cam); }
.red{ color: var(--do); }
.good{ color: var(--xanh-la); }
.warn{ color: var(--cam); }

/* Lưới nội dung */
.grid, .twoCol, .cols{
  display:grid;
  gap: var(--g);
}
.grid{ grid-template-columns: 1fr; }

/* Mặc định 1 cột để tránh bị “dư cột” (trắng tràn bên phải) khi chỉ có 1 khối nội dung.
   Nếu trang có 2 cột (có aside), dùng :has (trình duyệt mới) hoặc gắn class .grid--2. */
@media (min-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .grid.grid--2{ grid-template-columns: 1.45fr .55fr; align-items: start; }
  @supports(selector(:has(*))){
    .grid:has(> :nth-child(2)){ grid-template-columns: 1.45fr .55fr; align-items: start; }
  }
}
.twoCol{ grid-template-columns: 1fr; }
@media (min-width: 900px){
  .twoCol{ grid-template-columns: 1fr 1fr; }
}
.cols{ grid-template-columns: 1fr; }
@media (min-width: 900px){
  .cols{ grid-template-columns: 1fr 1fr; }
}

/* Thẻ / khối */
.card, .panel, .khoi, .box, .aside{
  background: rgba(255,255,255,.86);
  border: 1px solid var(--vien);
  border-radius: var(--r);
  box-shadow: var(--bong-nhe);
}
.card, .panel, .khoi, .box{ padding: 16px; }
@media (min-width: 900px){
  .card, .panel, .khoi, .box{ padding: 18px; }
}
.aside{ padding: 14px; position: sticky; top: 96px; }
@media (max-width: 979px){
  .aside{ position: static; }
}

.section{ margin: 16px 0; }
.km, .kpi{ display:flex; gap: 10px; flex-wrap: wrap; align-items:center; }
.kpi .num{ font-size: 26px; font-weight: 900; }
.kpi .label{ color: var(--chu-phu); font-weight: 800; font-size: 12.5px; }

/* Khối cảnh báo / ghi chú */
.callout, .note{
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.74);
}
.callout{ border-left: 6px solid rgba(11,91,211,.35); }
.callout strong{ font-weight: 900; }
.b-green{ background: rgba(3,152,85,.08); border-color: rgba(3,152,85,.25); color: #064E3B; }
.b-amber{ background: rgba(255,201,40,.14); border-color: rgba(255,201,40,.35); color: #7C2D12; }
.b-red{ background: rgba(217,45,32,.10); border-color: rgba(217,45,32,.30); color: #7F1D1D; }

/* Mục lục nhanh (bài chi tiết) */
.muc-luc-nhanh{
  border-radius: var(--r);
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.86);
  box-shadow: var(--bong-nhe);
  padding: 14px;
}
.muc-luc-nhanh .list, .muc-luc-nhanh ul{ margin: 10px 0 0; padding-left: 18px; }
.muc-luc-nhanh a{
  color: var(--mau-chinh-2);
  font-weight: 800;
  text-decoration: none;
}
.muc-luc-nhanh a:hover{ text-decoration: underline; }

/* Danh sách bước */
.steps, .list{
  margin: 0;
  padding-left: 18px;
  color: var(--chu);
}
.step{
  display:grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.78);
  margin: 10px 0;
}
.stepnum, .stepNum{
  width: 42px;height:42px;
  display:flex;align-items:center;justify-content:center;
  border-radius: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(11,91,211,.16), rgba(255,201,40,.16));
  border: 1px solid rgba(11,91,211,.20);
}
.stephead, .stepHead{ font-weight: 900; margin-bottom: 6px; }
.stepbody, .stepBody{ color: var(--chu-phu); line-height: 1.65; }

/* Bảng */
.table, table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow:hidden;
  border-radius: 16px;
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.86);
}
.table th, .table td, table th, table td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--vien);
  vertical-align: top;
  line-height: 1.55;
}
.table th, table th{
  background: rgba(11,91,211,.08);
  font-weight: 900;
}
.table tr:last-child td, table tr:last-child td{ border-bottom: none; }

/* Ảnh / thư viện */
.figure{ margin: 0; }
.figure img, .img, .imgWrap img{
  border-radius: 16px;
  border: 1px solid var(--vien);
  box-shadow: var(--bong-nhe);
}
.imgWrap{ margin-top: 10px; }
.gallery{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px){
  .gallery{ grid-template-columns: repeat(3, 1fr); }
}
.gitem{
  border-radius: 16px;
  border: 1px solid var(--vien);
  overflow:hidden;
  background: rgba(255,255,255,.86);
  box-shadow: var(--bong-nhe);
}
.gcap{ padding: 10px 12px; font-size: 13px; color: var(--chu-phu); }

/* Âm thanh */
.audioBox{
  margin-top: 14px;
  border-radius: var(--r2);
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.88);
  box-shadow: var(--bong);
  padding: 16px;
}
.audioGrid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px){
  .audioGrid{ grid-template-columns: repeat(3, 1fr); }
}
.audioItem{
  border-radius: 16px;
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.86);
  box-shadow: var(--bong-nhe);
  padding: 14px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.audioIconBtn{
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 16px;
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(11,91,211,.12), rgba(255,201,40,.12));
  border-color: rgba(11,91,211,.20);
}
.audioIconBtn img{ width: 42px; height: 42px; object-fit: contain; margin: 0 auto; }
.aLabel{ font-size: 13px; color: var(--chu); line-height: 1.45; }
.aLabel b{ font-weight: 900; }
audio{ width:100%; }

/* Phóng to ảnh (bài chi tiết) */
.phong-to-nen{
  position: fixed;
  inset: 0;
  background: rgba(11,18,32,.60);
  backdrop-filter: blur(6px);
  display:none;
  z-index: 999;
}
.phong-to-hop{
  position: fixed;
  inset: 0;
  display:none;
  z-index: 1000;
  align-items:center;
  justify-content:center;
  padding: 16px;
}
.phong-to-khung{
  max-width: 1100px;
  width: 100%;
  border-radius: 18px;
  overflow:hidden;
  background: #0B1220;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 22px 60px rgba(0,0,0,.35);
}
.phong-to-dau{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  padding: 12px 12px;
  background: rgba(255,255,255,.06);
  color: #fff;
}
.phong-to-dong{
  border: 0;
  background: rgba(255,255,255,.14);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  cursor:pointer;
}
.phong-to-than{
  background:#0B1220;
  padding: 12px;
}
.phong-to-than img{
  width:100%;
  height:auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
}

/* Chân trang / thanh hỗ trợ */
.footer, .foot, .footnote{
  margin-top: 16px;
  color: var(--chu-phu);
  font-size: 13px;
  line-height: 1.6;
}
.thanh-ho-tro{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px 12px;
  background: rgba(255,255,255,.82);
  border-top: 1px solid var(--vien);
  backdrop-filter: blur(10px);
}
.thanh-ho-tro__trong{
  max-width: 1240px;
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.thanh-ho-tro__chu{ color: var(--chu); font-weight: 900; font-size: 13px; }
.thanh-ho-tro__nut{ padding: 10px 12px; border-radius: 12px; font-size: 13px; }
@media (min-width: 980px){
  .thanh-ho-tro{ display:none; }
}

/* Nhỏ gọn trên điện thoại */
@media (max-width: 480px){
  .wrap, .container{ padding: 14px; }
  .navlinks a{ padding: 9px 10px; }
  .btn, .nut{ width: 100%; }
  .navlinks{ width: 100%; }
  .topbar{ flex-wrap: wrap; }
}


/* Bổ sung chi tiết nhỏ */
.pad{ padding: 16px; }
@media (min-width: 900px){ .pad{ padding: 18px; } }

.kitem{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--vien);
  background: rgba(255,255,255,.78);
}
.kicon{
  width: 38px; height: 38px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(11,91,211,.14), rgba(255,201,40,.14));
  border: 1px solid rgba(11,91,211,.18);
  flex: 0 0 auto;
}
.ktext{ color: var(--chu-phu); line-height: 1.6; }

.legend{ display:flex; gap: 8px; flex-wrap:wrap; margin-top: 10px; }
.legend .tag-audio{
  position: relative;
  padding-right: 26px;
}
.legend .tag-audio::after{
  content:"🔊";
  position:absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: .85;
}
