:root > * {
  --md-primary-fg-color:        #f53423;  /* màu chính */
  --md-primary-fg-color--light: #f75a4d;  /* hover / active */
  --md-primary-fg-color--dark:  #c5281b;  /* đậm hơn */
}
[data-md-color-scheme="slate"] {
  --md-primary-fg-color:        #f75a4d;
  --md-primary-fg-color--light: #f98a80;
  --md-primary-fg-color--dark:  #f53423;
}

.md-nav__link[href*="wiki.minvoice.com.vn"] .md-ellipsis,
.md-nav__link[href*="tong-quan"] .md-ellipsis,
.md-nav__link[href*="lich-su-chinh-sua"] .md-ellipsis {
    color: #000000;
    font-weight: 700;
}

.md-nav__link--active[href*="wiki.minvoice.com.vn"] .md-ellipsis,
.md-nav__link[href*="tong-quan"] .md-ellipsis,
.md-nav__link--active[href*="lich-su-chinh-sua"] .md-ellipsis {
    color: unset;
}

[data-md-color-scheme="slate"] .md-nav__link[href*="wiki.minvoice.com.vn"] .md-ellipsis,
[data-md-color-scheme="slate"] .md-nav__link[href*="lich-su-chinh-sua"] .md-ellipsis {
    color: #e8e8f2 !important;
}

[data-md-color-scheme="slate"] .md-nav__link--active[href*="wiki.minvoice.com.vn"] .md-ellipsis,
[data-md-color-scheme="slate"] .md-nav__link--active[href*="lich-su-chinh-sua"] .md-ellipsis {
    color: #f53423 !important;
}

/* Desktop / Tablet */
.md-header__button.md-logo img {
  height: 55px;
  width: auto;
}

/* Desktop & tablet */
@media (min-width: 1024px) {
  .md-grid {
    max-width: 1580px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

}

@media screen and (min-width: 76.25em) {

  /* Sidebar container */
  .md-sidebar--primary {
    width: 18rem;       /* ~256px – vừa mắt */
    left: -18rem;
  }

  /* Danh sách menu (text nằm ở đây) */
  .md-nav--primary .md-nav__list {
    width: 17.5rem;     /* chừa padding */
  }
}


.last-updated {
  text-align: right;
  font-size: 0.75em;
  color: #777;
  margin-top: 2em;
  font-style: italic;
}

.md-status.md-status--nhat {
  background: #fdeaea;          /* đỏ rất nhạt */
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.md-status.md-status--nhat::before {
  content: "New";
  color: #d32f2f;               /* đỏ trầm, không chói */
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.md-status.md-status--nhat::after {
  display: none !important;
}

.md-footer {
  background-color: #363793 !important;
  color: #ffffff !important;
}

.md-header {
  background-color: #363793 !important;
  color: #ffffff !important;
}

.md-tabs {
  background-color: #363793 !important;
  color: #ffffff !important;
}

/* Nếu là link trong header / tabs */
.md-header a,
.md-tabs a,
.md-footer a {
  color: #ffffff !important;
} 


/* Chữ "Tìm kiếm" */
.md-search__button {
  color: #ffffff !important;
} 

/* Icon kính lúp */
 .md-search__icon {
  color: #ffffff !important;
  fill: #ffffff !important;
} 

/* Nếu icon là svg */
 .md-search__icon svg {
  fill: #ffffff !important;
  color: #ffffff !important;
} 

 .md-search__button::before {
    background-color: #ffffff !important;
}  


/* Ẩn riêng dòng “Made with Zensical” */
.md-copyright > a {
    display: none !important;
}

.md-copyright > a::before {
    display: none !important;
}

.md-copyright {
    font-size: 0;
}

.md-copyright__highlight {
    font-size: initial;
        color: #ffffff !important;
}


/* ===== TABBED LABELS rõ ràng hơn ===== */

/* Xóa style mặc định của MkDocs */
.tabbed-set .tabbed-labels {
  border-bottom: none !important;
  gap: 8px !important;
  padding: 6px !important;
  background: #f0f0f0 !important;
  border-radius: 12px !important;
  border: 1px solid #ddd !important;
  width: fit-content !important;
}

/* Mỗi tab */
.tabbed-set .tabbed-labels > label {
  border: 1.5px solid #d0d0d0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #555 !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  padding: 1px 12px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
  /* Xóa underline mặc định */
  border-bottom: 1.5px solid #d0d0d0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

/* Hover */
.tabbed-set .tabbed-labels > label:hover {
  border-color: #363793 !important;
  color: #363793 !important;
  background: #f0f0ff !important;
}

/* Tab đang active */
.tabbed-set input:nth-child(1):checked ~ .tabbed-labels label:nth-child(1),
.tabbed-set input:nth-child(2):checked ~ .tabbed-labels label:nth-child(2),
.tabbed-set input:nth-child(3):checked ~ .tabbed-labels label:nth-child(3),
.tabbed-set input:nth-child(4):checked ~ .tabbed-labels label:nth-child(4),
.tabbed-set input:nth-child(5):checked ~ .tabbed-labels label:nth-child(5) {
  background: #363793 !important;
  color: #ffffff !important;
  border-color: #363793 !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 6px rgba(54,55,147,0.25) !important;
}

/* Dark mode */
[data-md-color-scheme="slate"] .tabbed-set .tabbed-labels {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.15) !important;
}

[data-md-color-scheme="slate"] .tabbed-set .tabbed-labels > label {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: #ccc !important;
}

[data-md-color-scheme="slate"] .tabbed-set .tabbed-labels > label:hover {
  background: rgba(54,55,147,0.3) !important;
  border-color: #7a7bdd !important;
  color: #fff !important;
}

[data-md-color-scheme="slate"] .tabbed-set input:nth-child(1):checked ~ .tabbed-labels label:nth-child(1),
[data-md-color-scheme="slate"] .tabbed-set input:nth-child(2):checked ~ .tabbed-labels label:nth-child(2),
[data-md-color-scheme="slate"] .tabbed-set input:nth-child(3):checked ~ .tabbed-labels label:nth-child(3) {
  background: #363793 !important;
  color: #fff !important;
  border-color: #7a7bdd !important;
}

/* ===== MOBILE RESPONSIVE cho tabbed labels ===== */

@media (max-width: 600px) {
  .tabbed-set .tabbed-labels {
    width: 100% !important;        /* full width trên mobile */
    border-radius: 10px !important;
    gap: 5px !important;
    padding: 4px !important;
    flex-wrap: wrap !important;    /* xuống dòng nếu nhiều tab */
  }

  .tabbed-set .tabbed-labels > label {
    flex: 1 1 auto !important;     /* co giãn đều nhau */
    text-align: center !important;
    font-size: 12px !important;    /* nhỏ hơn chút cho vừa màn hình */
    padding: 6px 10px !important;
    white-space: normal !important; /* cho phép xuống dòng nếu cần */
    line-height: 1.3 !important;
  }
}

@media (max-width: 400px) {
  .tabbed-set .tabbed-labels > label {
    font-size: 11.5px !important;
    padding: 5px 8px !important;
  }
}