:root {
  --brand-red: #cf1f27;
  --brand-dark: #a5161b;
  --ink: #1f2328;
  --muted: #6b7280;
  --line: #cf1f27;
  --soft: #fafbfc;
  --cyan: #345689;
}

html,
body {
  position: relative;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
}

main {
  flex: 1;
}

/* ===== Header ===== */
.site-top {
  border-bottom: 2px solid var(--brand-dark)
}

.site-top img {
  width: 100%;
}

.site-title {
  color: #c40000;
  font-weight: 800
}

.logo-badge {
  width: 72px;
  height: 72px
}

.flag-ribbon {
  height: 80px;
  background: linear-gradient(135deg, #e0282f, #b11418);
  border-left: 2px solid #a25700;
  border-radius: .25rem;
  position: relative
}

.flag-ribbon:after {
  content: "QUYẾT THẮNG";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-weight: 800;
  letter-spacing: .3px
}

/* ===== Navbars ===== */
.navbar-mini {
  background: #f6f6f6;
  border-block: 1px solid var(--line)
}

.navbar-mini .nav-link {
  color: #1f2328
}

.navbar-main {
  background: var(--brand-red)
}

.navbar-main .navbar-brand, .navbar-main .nav-link {
  color: #fff
}

/* ===== Breadcrumb ===== */
.breadcrumb-wrap {
  margin-bottom: 35px;
  font-size: 15px;
  font-weight: bold;
  text-transform: uppercase;
  background: #fafafa;
  border: 1px solid var(--ink)
}

.breadcrumb-wrap a {
  color: var(--brand-red);
}

/* ===== Cards grid (no images) ===== */
.post-grid {
  --gap: 1rem
}

.row.post-grid {
  row-gap: var(--gap)
}

.post-card {
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow .18s ease, transform .06s ease;
  overflow: hidden
}

.post-card.is-unseen {
  border: 4px solid var(--line);
}

.post-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
  transform: translateY(-1px)
}

.post-card .meta-bar {
  display: flex;
  gap: .5rem;
  align-items: start;
  flex-direction: column;
  padding: .75rem .5rem;
  border-bottom: 1px solid var(--line);
  background: var(--soft)
}

.chip {
  --c: #133a91;
  --t: #243b72;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  /*background: var(--c);*/
  color: var(--c);
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 700
}

.chip.notice-red {
  --c: #cf1f27;
  --t: #fff
}

.chip .dot {
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: var(--c);
  opacity: .75
}

.meta-date {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: bold;
  color: var(--muted)
}

.post-card .card-body {
  padding: 1rem
}

.post-title {
  font-weight: bold;
  font-size: 18px;
  margin: 0 0 .3rem 0;
  line-height: 1.35;
  text-transform: uppercase;
}

.line-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.line-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.excerpt {
  font-size: 16px;
  color: #333;
}

.post-card .card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  border-top: 1px solid var(--line);
  background: #fff
}

.btn-ghost {
  --b: var(--brand-red);
  color: var(--b);
  border: 1px solid var(--b);
  padding: .4rem .65rem;
  font-weight: 700
}

.btn-ghost:hover {
  background: var(--b);
  color: #fff
}

/* ===== Sidebar blocks (danh mục) ===== */
.side-section {
  border: 1px solid var(--ink);
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden
}

.side-section .head {
  background: var(--ink);
  color: #fff;
  padding: .7rem 1rem;
  font-weight: 800
}

.side-section ul {
  margin: 0;
  padding: 0;
  list-style: none
}

.side-section li + li a.item {
  border-top: 1px solid var(--ink)
}

.side-section .active a {
  background-color: var(--cyan) !important;
  color: #fff !important;
}

.side-section a.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: .7rem 1rem;
  color: inherit;
  column-gap: 15px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  text-transform: uppercase;
}

.side-section a.item:hover {
  background: var(--cyan) !important;
  color: #fff !important;
}

.side-section .badge {
  font-size: 16px;
}

/* ===== Gmail-like list (pill) ===== */
.left-nav {
  background: transparent;
}

.left-nav a.item {
  border: none;
  background: rgba(255, 255, 255, .9);
  padding: .55rem .9rem;
  column-gap: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.left-nav a.item.add-doc {
  color: #fff;
  background-color: #0d6efd;
}

.left-nav a.item.add-doc:hover {
  color: #0d6efd !important;
  background-color: #fff !important;
  border-color: #0d6efd !important;
}

.left-nav a.item.list-doc {
  color: #fff;
  background-color: #198754;
}

.left-nav a.item.list-doc:hover {
  color: #198754 !important;
  background-color: #fff !important;
  border-color: #0d6efd !important;
}

.left-nav a.item:hover {
  background: #fff
}

.left-nav .badge {
  width: auto;
  height: auto;
  font-size: 14px;
  color: var(--brand-red);
  background-color: #fff;
  border-radius: 50%;
}

.left-nav .icon {
  width: 1.2rem;
  display: inline-flex;
  justify-content: center
}

/* Search box */
.search-box {
  border: 1px solid var(--line);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 14px
}

.nav-account li {
  margin-left: 12px;
}

@media (min-width: 768px) {
  .nav-account {
    margin-left: auto;
    margin-right: 0;
  }
}

@media (max-width: 767px) {
  .nav-account {
    display: flex;
    flex-direction: column;
    row-gap: 15px;
  }

  .sidebar-search {
    margin-top: 25px;
  }

  .nav-account li {
    margin-left: 0;
  }

  .search-form-sidebar {
    justify-content: start !important;
  }

  .navbar-mini {
    padding-bottom: 20px;
  }
}

/* ===== Sticky sidebars ===== */
.sidebar-sticky.sticky-top {
  top: 1rem;
}

/* khoảng cách đỉnh khi dính */

footer {
  margin-top: auto;
  background: #111;
  color: #bbb
}

/* others */
.badge-red {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 16px;
  border: 2px solid var(--brand-red);
  background: #fff;
  color: var(--brand-red);
  border-radius: 50%;
}

.badge-text-red {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-red);
  text-transform: uppercase;
}

.badge-text-dark {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-muted);
  text-transform: uppercase;
}

.container-main {
  max-width: 1400px;
}

.red-notice a {
  background: var(--brand-red);
  color: #fff !important;
}

.red-notice a .badge-red {
  background: #fff;
  color: var(--brand-red);
}

.side-section .red-notice a:hover,
.red-notice a:hover {
  background: var(--ink) !important;
  color: #fff !important;
}

.red-notice a:hover .badge-red {
  color: #fff;
  background: var(--brand-red) !important;
}

.screen-reader-text {
  display: none;
}

/* Wrap & layout */
.navigation.pagination {
  margin: 50px 0 0; /* bỏ margin thừa nếu có */
}

.navigation.pagination .nav-links {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

/* Base button look */
.navigation.pagination .page-numbers {
  display: inline-flex;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .75rem;
  border: 1px solid #e6e7ea;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #1f2328;
  background: #fff;
  line-height: 1;
  font-weight: 600;
  transition: all .15s ease;
}

/* Hover/active states */
.navigation.pagination .page-numbers:hover {
  border-color: #cf1f27;
  color: #cf1f27;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers.current:hover {
  background: #cf1f27;
  border-color: #cf1f27;
  color: #fff;
  box-shadow: 0 3px 16px rgba(207, 31, 39, .25);
  cursor: default;
  transform: none;
}

/* Prev/Next arrows (», «) */
.navigation.pagination .page-numbers.next,
.navigation.pagination .page-numbers.prev {
  font-weight: 800;
  padding: 0 .9rem;
}

/* Ellipsis */
.navigation.pagination .page-numbers.dots {
  border: 1px dashed #e6e7ea;
  background: #fafbfc;
  color: #6b7280;
  cursor: default;
}

/* Accessibility */
.navigation.pagination .page-numbers:focus-visible {
  outline: 3px solid rgba(207, 31, 39, .35);
  outline-offset: 2px;
}

/* Mobile tweak: lớn click-area, đỡ chạm nhầm */
@media (max-width: 575.98px) {
  .navigation.pagination .page-numbers {
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 .9rem;
  }
}

.section-article {
  margin-inline: auto;
}

.article-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: .75rem;
  margin-bottom: 1.25rem;
}

.article-title {
  line-height: 1.25;
  letter-spacing: .2px;
}

.article-meta {
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .25rem;
}

.article-date {
  font-weight: bold;
  color: var(--muted);
}

.article-author a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.article-author a:hover {
  color: var(--brand-red);
}

/* Nội dung bài viết */
.article-content {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.75;
}

.article-content p {
  margin-bottom: 1.2em;
}

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: .6rem;
  margin: 1.25rem auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.article-content h2,
.article-content h3 {
  margin: 1.6em 0 .6em;
  font-weight: 700;
  line-height: 1.35;
}

.article-content blockquote {
  border-left: 4px solid var(--brand-red);
  background: var(--soft);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: .5rem;
  font-style: italic;
  color: var(--ink);
}

.article-content a {
  color: var(--brand-red);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease;
}

.article-content a:hover {
  border-color: var(--brand-red);
}

.article-content a.wp-block-file__button {
  color: #fff !important;
  border: 0;
}

/* Responsive */
@media (max-width: 575.98px) {
  .section-article {
    padding-inline: 1rem;
  }

  .article-title {
    font-size: 1.5rem;
  }
}

/* ===== Filter "Lọc bài theo lượt xem" — polish UI ===== */

/* Khung filter */
.upv-filter {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: 40px;
}

/* Layout form */
#upv-filter-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1rem;
}

/* Tiêu đề */
#upv-filter-form .title {
  font-size: 20px;
  color: var(--ink);
  font-weight: 800;
  margin-right: .25rem;
}

/* Ẩn radio mặc định nhưng vẫn click được vì nằm trong label */
#upv-filter-form input[type="radio"] {
  position: absolute;
  inset: 0;
  width: 0;
  height: 0;
  opacity: 0;
}

/* Nút pill */
#upv-filter-form label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem .75rem;
  background: #fff;
  color: var(--ink);
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .06s ease;
  user-select: none;
}

#upv-filter-form label:hover {
  border-color: var(--brand-red);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

#upv-filter-form label span {
  font-size: 18px;
  font-weight: bold;
}

/* Trạng thái checked: tô màu pill qua sibling span */
#upv-filter-form input[type="radio"]:checked + span {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
  box-shadow: 0 6px 18px rgba(207, 31, 39, .25);
  padding: .4rem .75rem;
  border-radius: 999px;
}

/* Focus rõ ràng cho accessibility */
#upv-filter-form input[type="radio"]:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--brand-red) 35%, transparent);
  outline-offset: 2px;
}

/* Nút noscript trông đồng bộ */
#upv-filter-form noscript button {
  border: 1px solid var(--brand-red);
  background: var(--brand-red);
  color: #fff;
  border-radius: 999px;
  padding: .45rem .85rem;
  font-weight: 700;
  cursor: pointer;
}

#upv-filter-form noscript button:hover {
  filter: brightness(0.95);
}

/* Mobile: xếp xuống thành 2 hàng gọn gàng */
@media (max-width: 575.98px) {
  #upv-filter-form {
    gap: .6rem .6rem;
  }

  #upv-filter-form .title {
    width: 100%;
    margin-bottom: .25rem;
  }
}


/* Wrapper */
.post-viewers-shortcode {
  background: var(--soft);
  border: 1px solid var(--ink);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  max-width: 500px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
}

/* Tiêu đề */
.post-viewers-shortcode .title-seen-account {
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 .75rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* List */
.post-viewers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* Item */
.post-viewer {
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: all .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.title-page {
  margin-top: 40px;
  padding-bottom: 40px;
  font-size: 40px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .5rem .75rem;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease;

}

.input-checkbox {
  accent-color: var(--brand-red); /* đổi màu dấu ✓ và viền */
  width: 18px;
  height: 18px;
}

.input-checkbox:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-red) 35%, transparent);
  outline-offset: 2px;
}

.fieldset-remember {
  font-size: 18px;
  font-weight: bold;
}

.wpum-field-group .label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
  text-transform: uppercase;
}

/* ===== Base button ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: var(--brand-red);
  border: 1px solid var(--brand-red);
  border-radius: .45rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease, transform .06s ease;
}

.button.green {
  background: #28a745;
  border-color: #28a745;
}

.button.blue {
  background: #007bff;
  border-color: #007bff;
}

/* Hover & active */
.button:hover {
  background: color-mix(in srgb, var(--brand-red) 85%, black 15%);
  border-color: color-mix(in srgb, var(--brand-red) 85%, black 15%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}

.button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12) inset;
}

/* Focus visible (keyboard) */
.button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-red) 35%, transparent);
  outline-offset: 2px;
}

/* Disabled */
.button:disabled,
.button[disabled] {
  opacity: .65;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===== Variants ===== */
.button.-outline {
  background: #fff;
  color: var(--brand-red);
  border: 1px solid var(--brand-red);
}

.button.-outline:hover {
  background: var(--brand-red);
  color: #fff;
}

.button.-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.-ghost:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

/* ===== Sizes ===== */
.button.-sm {
  padding: .35rem .8rem;
  font-size: .85rem;
}

.button.-lg {
  padding: .75rem 1.4rem;
  font-size: 1.05rem;
}

/* ===== Icon only ===== */
.button.-icon {
  padding: .5rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
}


.wpum-action-links a {
  color: var(--brand-red);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
}

.wpum-form fieldset small.description {
  display: none;
}


/* ===== Account Tabs (WPUM) ===== */
.wpum-account-navigation {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .4rem;
  margin: 1rem 0 1.25rem;
}

.wpum-account-navigation ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  row-gap: 10px;
}

.wpum-account-navigation ul li {
  padding: 0 !important;
}

.wpum-account-navigation ul li.active {
  background-color: transparent !important;
}

.wpum-account-navigation a {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease, transform .06s ease;
}

/* Hover */
.wpum-account-navigation a:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

/* Active/current */
.wpum-account-navigation li.active a,
.wpum-account-navigation a.current-tab {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(207, 31, 39, .25);
  cursor: default;
}

/* Focus (keyboard) */
.wpum-account-navigation a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-red) 35%, transparent);
  outline-offset: 2px;
}

/* Logout tab biến thể cảnh báo nhẹ */
.wpum-account-navigation .tab-logout a {
  border-style: dashed;
}

.wpum-account-navigation .tab-logout a:hover {
  border-color: color-mix(in srgb, var(--brand-red) 75%, black 10%);
  color: color-mix(in srgb, var(--brand-red) 85%, black 10%);
}

#wpum-directory-users-list .wpum-name {
  font-size: 18px;
  font-weight: 700;
}

#wpum-directory-users-list .wpum-name a {
  color: var(--brand-red);
  font-weight: 700;
  fsont-size: 18px;
  text-decoration: none;
}

#wpum-directory-top-bar {
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
}

#wpum_sortby option[value="first_name"],
#wpum_sortby option[value="last_name"] {
  display: none;
}

.password-change {
  border: 1px solid var(--ink) !important;
  padding: 12px !important;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  row-gap: 15px;
}

.title-fixed-account {
  margin-bottom: 40px;
}

/* ===== Base Notice ===== */
.notice {
  position: relative;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  padding: .85rem 1rem;
  margin: 1rem 0;
  font-size: 18px;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

.notice::before {
  flex: 0 0 auto;
  font-size: 1.2rem;
  line-height: 1;
}

/* ===== Variants ===== */
.notice-success {
  border-color: #16a34a;
  background: color-mix(in srgb, #16a34a 8%, #fff);
  color: #166534;
}

.notice-success::before {
  content: "✔";
  color: #16a34a;
}

.notice-error {
  border-color: #dc2626;
  background: color-mix(in srgb, #dc2626 8%, #fff);
  color: #991b1b;
}

.notice-error::before {
  content: "✖";
  color: #dc2626;
}

.notice-warning {
  border-color: #d97706;
  background: color-mix(in srgb, #d97706 8%, #fff);
}

/* ===== Comment form wrapper ===== */
#respond.comment-respond {
  background: var(--soft);
  border: 1px solid var(--ink);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .05);
  margin: 1.5rem 0;
}

/* Title */
#respond .comment-reply-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 .5rem;
  color: var(--ink);
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: .5rem;
}

#respond .comment-reply-title small a {
  font-weight: 600;
  font-size: .9rem;
  color: var(--muted);
  text-decoration: none;
}

#respond .comment-reply-title small a:hover {
  color: var(--brand-red);
}

/* Meta line (đang đăng nhập, required…) */
#respond .logged-in-as,
#respond .required-field-message {
  color: var(--muted);
  font-size: .92rem;
}

#respond .logged-in-as a {
  color: var(--brand-red);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

#respond .logged-in-as a:hover {
  border-color: var(--brand-red);
}

/* Label + textarea */
.comment-form-comment label {
  display: inline-block;
  font-weight: 700;
  margin-bottom: .35rem;
  color: var(--ink);
}

.comment-form-comment .required {
  color: #dc2626;
}

.comment-form-comment textarea {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: .8rem 1rem;
  min-height: 160px;
  resize: vertical;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.comment-form-comment textarea:hover {
  border-color: color-mix(in srgb, var(--brand-red) 40%, var(--line));
}

.comment-form-comment textarea:focus {
  outline: 0;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-red) 20%, transparent);
}

/* ===== Attachment block ===== */
.comment-form-attachment {
  margin-top: .9rem;
  padding: .85rem 1rem;
  border: 1px dashed var(--ink);
  border-radius: 12px;
  background: #fff;
}

.comment-form-attachment__label {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .4rem;
}

/* File input (giữ native, polish nhẹ) */
.comment-form-attachment__input {
  display: inline-block;
  padding: .45rem .7rem;
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
  accent-color: var(--brand-red);
}

.comment-form-attachment__input:hover {
  border-color: var(--brand-red);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.comment-form-attachment__input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-red) 30%, transparent);
  outline-offset: 2px;
}

/* Notices (dung lượng, loại file…) */
.comment-form-attachment__file-size-notice,
.comment-form-attachment__file-types-notice,
.comment-form-attachment__autoembed-links-notice {
  display: block;
  color: var(--muted);
  font-size: .9rem;
  margin-top: .35rem;
}

/* Khu vực kéo thả */
.comment-form-attachment__drop-area {
  display: block;
  margin-top: .75rem;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--soft);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.comment-form-attachment__drop-area-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  color: var(--muted);
  font-weight: 700;
}

.comment-form-attachment__drop-area:hover {
  border-color: var(--brand-red);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
}

/* ===== Submit button ===== */
.comment-form .form-submit {
  margin-top: 1rem;
}

.comment-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.1rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand-red);
  border: 1px solid var(--brand-red);
  border-radius: .6rem;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .06s ease;
}

.comment-form .submit:hover {
  background: color-mix(in srgb, var(--brand-red) 88%, black 12%);
  border-color: color-mix(in srgb, var(--brand-red) 88%, black 12%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
  transform: translateY(-1px);
}

.comment-form .submit:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-red) 35%, transparent);
  outline-offset: 2px;
}

/* ===== Accessibility, spacing, small tweaks ===== */
#respond abbr[title] {
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
}

#respond .required {
  margin-left: .2rem;
}

#cancel-comment-reply-link {
  margin-left: .5rem;
}

/* Mobile */
@media (max-width: 575.98px) {
  #respond.comment-respond {
    padding: .9rem;
  }

  .comment-form-attachment {
    padding: .75rem .8rem;
  }

  .comment-form-attachment__drop-area-inner {
    min-height: 80px;
  }
}


/* ===== Comment List ===== */
.commentlist {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

/* Mỗi comment = card nhẹ */
.commentlist .comment-body {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .04);
}

.fcm-seen-wrap {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .2rem .5rem;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 600;
}

.fcm-seen-wrap label {
  display: flex;
  column-gap: 10px;
  align-items: center;
  justify-content: center;
}

/* Khoảng cách giữa các comment cấp 1 */
.commentlist > li {
  margin: 0 0 1rem;
}

/* Children (threaded) */
.commentlist .children {
  list-style: none;
  margin: .75rem 0 0 1.25rem; /* thụt vào */
  padding: 0 0 0 .85rem; /* chừa chỗ cho đường kẻ */
  border-left: 2px dashed var(--line);
}

/* Đầu mối thread line nối giữa các comment con */
.commentlist .children > li {
  position: relative;
  margin-bottom: .85rem;
}

.commentlist .children > li:last-child {
  margin-bottom: 0;
}

/* Tác giả & meta */
.comment-author {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin-bottom: .25rem;
}

.comment-author .fn {
  font-style: normal;
  font-weight: 800;
  color: var(--ink);
}

.comment-author .fn a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.comment-author .fn a:hover {
  border-color: var(--brand-red);
}

.comment-author .says {
  color: var(--muted);
  font-size: .92rem;
}

/* Thời gian + link sửa */
.comment-meta {
  margin: 0 0 .5rem;
  font-size: .9rem;
}

.comment-meta a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .15s ease, border-color .15s ease;
}

.comment-meta a:hover {
  color: var(--brand-red);
  border-color: var(--brand-red);
}

/* Nội dung comment */
.comment-body p {
  margin: 0 0 .9rem;
  color: var(--ink);
  line-height: 1.6;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

/* Nút reply */
.comment-body .reply {
  margin-top: .6rem;
}

.comment-body .reply .comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  height: 36px;
  padding: 0 .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .06s ease;
}

.comment-body .reply .comment-reply-link:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

/* Comment của tác giả bài viết (bypostauthor) – highlight nhẹ */
.comment.bypostauthor .comment-body {
  border-color: color-mix(in srgb, var(--brand-red) 35%, var(--line));
  box-shadow: 0 8px 22px rgba(207, 31, 39, .12);
}

.comment.bypostauthor .comment-author .fn::after {
  content: " • Tác giả";
  color: var(--brand-red);
  font-weight: 800;
  margin-left: .25rem;
  font-size: .92rem;
}

/* Đính kèm file trong comment (plugin DCO, v.v.) */
.dco-attachment,
.dco-misc-attachment {
  margin: .6rem 0 0;
}

.dco-attachment a,
.dco-misc-attachment a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease, transform .06s ease;
}

.dco-attachment a:hover,
.dco-misc-attachment a:hover {
  border-color: var(--brand-red);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

/* Link trong nội dung comment */
.comment-body a {
  color: var(--brand-red);
  text-decoration: none;
}

.comment-body a:hover {
  border-color: var(--brand-red);
}

/* Responsive: giảm indent cho thread sâu trên mobile */
@media (max-width: 575.98px) {
  .commentlist .children {
    margin-left: .85rem;
    padding-left: .65rem;
  }
}

#comments {
  display: none;
  margin-top: 60px;
}

.comment-form-attachment__file-size-notice,
.comment-form-attachment__file-types-notice,
.comment-form-attachment__autoembed-links-notice {
  display: none !important;
}

#header-cover-image {
  display: none;
}

#profile-navigation .profile-navbar {
  display: none;
}

#header-profile-details {
  border: 1px solid var(--brand-red);
}

#header-name-container h2 {
  display: flex;
  align-items: center;
  column-gap: 25px;
  font-size: 30px;
  font-weight: bold;
}

#header-name-container h2 a {
  display: inline-flex;
}


/* ===== Stripe Table ===== */
.profile-fields-table {
  width: 100%;
  margin-bottom: 40px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 18px;
  text-transform: uppercase;
  background: #fff;
}

/* hàng kẻ sọc */
.profile-fields-table tbody tr:nth-child(odd) {
  background: #fff;
}

.profile-fields-table tbody tr:nth-child(even) {
  background: var(--soft);
}

.profile-fields-table tbody tr:hover {
  background: color-mix(in srgb, var(--brand-red) 8%, #fff);
}

/* ô */
.profile-fields-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.profile-fields-table tbody tr:last-child td {
  border-bottom: 0;
}

/* label và data */
.profile-fields-table td.label {
  font-weight: 700;
  color: var(--ink);
  width: 30%;
}

.profile-fields-table td.data {
  color: #30363d;
}

.profile-fields-table td.data a {
  color: var(--brand-red);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}

.profile-fields-table td.data a:hover {
  border-color: var(--brand-red);
}

/* responsive: mobile stack */
@media (max-width: 575.98px) {
  .profile-fields-table,
  .profile-fields-table tbody,
  .profile-fields-table tr,
  .profile-fields-table td {
    display: block;
    width: 100%;
  }

  .profile-fields-table td {
    border: 0;
    padding: .5rem .8rem;
  }

  .profile-fields-table td.label {
    font-weight: 700;
    color: var(--muted);
    margin-top: .5rem;
  }

  .profile-fields-table td.data {
    border-bottom: 1px dashed var(--line);
    padding-bottom: .75rem;
  }

  .profile-fields-table tbody tr:last-child td.data {
    border-bottom: 0;
  }
}


/* ===== 404 Page ===== */
.container-404 {
  text-align: center;
  padding: 4rem 1rem;
  position: relative;
}

.container-404 .title-page {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 800;
  color: var(--brand-red);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.container-404 .content-page {
  max-width: 640px;
  margin-inline: auto;
  font-size: 18px;
  color: var(--ink);
}

.container-404 .content-page p {
  margin-bottom: 1rem;
}

.container-404 .content-page a {
  color: var(--brand-red);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}

.container-404 .content-page a:hover {
  border-color: var(--brand-red);
}

/* Search form trong trang 404 */
.container-404 .search-form {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: .5rem;
}

.container-404 .search-form label {
  flex: 1;
}

.container-404 .search-form .search-field {
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.container-404 .search-form .search-field:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-red) 25%, transparent);
  outline: none;
}

.container-404 .search-form .search-submit {
  padding: .65rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .06s ease;
}

.container-404 .search-form .search-submit:hover {
  background: color-mix(in srgb, var(--brand-red) 90%, black 10%);
  transform: translateY(-1px);
}

/* Watermark số 404 */
.container-404::before {
  content: "404";
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 900;
  color: rgba(0, 0, 0, .05);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

/* ===== Search form in 404 ===== */
.container-404 .searchform {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: .5rem;
  max-width: 480px;
  margin-inline: auto;
}

.container-404 .searchform div {
  display: flex;
  flex: 1;
  gap: .5rem;
}

.container-404 .searchform label {
  display: none; /* ẩn label, vẫn accessible cho screen reader */
}

.container-404 .searchform input[type="text"] {
  flex: 1;
  padding: .65rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.container-404 .searchform input[type="text"]:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-red) 25%, transparent);
  outline: none;
}

.container-404 .searchform input[type="submit"] {
  padding: .65rem 1.1rem;
  border: none;
  border-radius: 8px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .06s ease;
}

.container-404 .searchform input[type="submit"]:hover {
  background: color-mix(in srgb, var(--brand-red) 90%, black 10%);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 575.98px) {
  .container-404 .searchform div {
    flex-direction: column;
  }

  .container-404 .searchform input[type="submit"] {
    width: 100%;
  }
}

/* ===== Sidebar Search ===== */
.sidebar-search {
  border-radius: 10px;
}

.sidebar-search .searchform {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.sidebar-search .searchform div {
  display: flex;
  gap: .4rem;
}

.sidebar-search .searchform label {
  display: none; /* ẩn label nhưng vẫn có screen-reader-text */
}

/* Input text */
.sidebar-search .searchform input[type="text"] {
  flex: 1;
  padding: .6rem .9rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-size: .95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.sidebar-search .searchform input[type="text"]:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-red) 25%, transparent);
  outline: none;
}

/* Submit button */
.sidebar-search .searchform input[type="submit"] {
  padding: .6rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .06s ease;
}

.sidebar-search .searchform input[type="submit"]:hover {
  background: color-mix(in srgb, var(--brand-red) 90%, black 10%);
  transform: translateY(-1px);
}

/* Mobile: stack full width */
@media (max-width: 575.98px) {
  .sidebar-search .searchform div {
    flex-direction: column;
  }

  .sidebar-search .searchform input[type="submit"] {
    width: 100%;
  }
}

.container-narrow {
  max-width: 900px;
}

.search-form-sidebar {
  display: flex;
  column-gap: 10px;
  align-items: center;
  justify-content: center;
}

/* File core đã bị xóa/mất */
.wp-block-file.file-missing .wp-block-file__textlink.file-missing {
  text-decoration: line-through;
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none; /* chặn click */
}

/* Ẩn hoàn toàn nút tải về nếu có sót */
.wp-block-file.file-missing .wp-block-file__button {
  display: none !important;
}

.toggle-password {
  cursor: pointer;
  margin-left: 6px;
  font-size: 25px;
  font-weight: bold;
  user-select: none;
}

#profile-header-container {
  display: flex;
  flex-direction: column-reverse;
}

.wpum-edit-account-link {
  margin-bottom: 30px;
  margin-top: -30px !important;
  text-align: center;
}

.wpum-edit-account-link a {
  font-size: 25px;
  font-weight: bold;
}

.tab-view,
.tab-logout {
  display: none !important;
}

.view-profile-link-account {
  color: var(--brand-red);
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
}

.ca-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.ca-chip.ca-chip-missing {
  background: #fafafa;
}

.ca-chip .ca-chip-label {
  font-weight: 600;
}

.ca-chip .ca-chip-size {
  margin-left: auto;
  opacity: .8;
  font-weight: 600;
}

/* Badge */
.ca-chip-badge {
  display: inline-block;
  min-width: 44px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 700;
  border-radius: 6px;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

/* màu theo ext */
.ca-chip-badge.ext-pdf {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.ca-chip-badge.ext-doc,
.ca-chip-badge.ext-docx {
  background: #e0f2fe;
  color: #075985;
  border-color: #bae6fd;
}

.ca-chip-badge.ext-xls,
.ca-chip-badge.ext-xlsx {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.ca-chip-badge.ext-ppt,
.ca-chip-badge.ext-pptx {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fed7aa;
}

.ca-chip-badge.ext-zip,
.ca-chip-badge.ext-7z,
.ca-chip-badge.ext-rar {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #e9d5ff;
}

.ca-chip-note-missing {
  color: #dc2626;
  font-weight: 600;
}

.ca-chip-link {
  text-decoration: none;
  color: #111827;
}

.ca-chip-link:hover {
  text-decoration: underline;
}

.wpum-message.error a {
  display: none;
}

@media (max-width: 767px) {
  .wpum-row {
    flex-direction: column;
    gap: 10px;
  }

  .wpum-meta,
  .wpum-row .wpum-col-xs {
    text-align: left !important;
  }

  .wpum-meta a.button {
    margin-bottom: 5px;
  }

  #profile-content-about .profile-fields-table td.label, .profile-content-settings .profile-fields-table td.label {
    width: auto;
  }

  #profile-content-about .profile-fields-table td.label, .profile-content-settings .profile-fields-table td.label,
  #profile-content-about .profile-fields-table td, .profile-content-settings .profile-fields-table td {
    padding: 8px 6px;
  }

  .profile-fields-table td.data a {
    overflow-wrap: break-word;
  }

  #header-name-container h2 {
    font-size: 24px;
  }

  .algae-fcm__tabs {
    gap: 10px;
  }
}

#wpum-directory-users-list .wpum-directory-single-user {
  border-bottom: 1px solid #ccc;
}

.notify-popup {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  width: min(320px, 90vw);
  background: rgba(255,255,255,0.92);
  color: #1f2937; /* slate-800 */
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 12px 10px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px) scale(.98);
  animation: popIn .28s cubic-bezier(.2,.8,.2,1) forwards;
}

.notify-icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #8ec5fc 0%, #e0c3fc 100%);
}

.notify-content { align-self: center; }
.notify-title { font-size: 15px; font-weight: 700; line-height: 1.2; margin: 2px 0 4px; }
.notify-desc  { font-size: 12.5px; color: #6b7280; margin: 0 0 8px; line-height: 1.4; }

.notify-actions { display: flex; gap: 8px; }
.btn { border: 0; border-radius: 999px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }

.btn-allow { background: #4f46e5; color: #fff; }
.btn-allow:hover { background: #4338ca; color: #fff; }

.btn-deny { background: #e5e7eb; color: #111827; }
.btn-deny:hover { filter: brightness(1.05); }

.notify-close { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer; background: transparent; color: #6b7280; display: grid; place-items: center; }
.notify-close:hover { color: #1f2937; }

@keyframes popIn { to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .notify-popup { animation: none; opacity: 1; transform: none; }
}
