/* Sổ chăm khách. Nền xám xanh như sỏi vườn; màu riêng của từng nick Zalo là điểm nhận diện chính. */
:root {
  --nen: #ECF0EB;
  --nen-dam: #DEE5DD;
  --mat: #FFFFFF;
  --muc: #18241D;
  --muc-phu: #55635A;
  --muc-nhat: #7A877E;
  --ke: #D6DED5;
  --ke-dam: #B9C5BA;
  --chinh: #1E5B43;
  --chinh-dam: #154532;
  --chinh-nhat: #DEECE3;
  --tre: #B3362A;
  --tre-nhat: #FAE5E1;
  --vang: #8A5A00;
  --vang-nhat: #FBEFD2;
  --bo: 14px;
  --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cao-tab: 60px;
  --an-duoi: env(safe-area-inset-bottom, 0px);
  --an-tren: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--muc);
  background: var(--nen);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
body.dang-mo { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--chinh); }
h1, h2, h3 { text-wrap: balance; }
.an { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muc-phu { color: var(--muc-phu); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.xoay { transform: rotate(180deg); color: var(--muc-nhat); }
.chu-nick { color: color-mix(in srgb, var(--nick) 78%, #000); font-weight: 600; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--chinh) 50%, transparent); outline-offset: 2px; }

/* ---------- khung ---------- */
.vo { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--cao-tab) + var(--an-duoi)); }
.chinh { max-width: 760px; margin: 0 auto; }
.cuoi-trang { height: 32px; }
body.co-thanh-chon .cuoi-trang { height: 150px; }

.dieu-huong {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: var(--mat); border-top: 1px solid var(--ke);
  padding-bottom: var(--an-duoi);
}
.dieu-huong a {
  flex: 1; position: relative; min-height: var(--cao-tab);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11.5px; font-weight: 500; color: var(--muc-nhat); text-decoration: none;
}
.dieu-huong a .ic { width: 24px; height: 24px; }
.dieu-huong a[aria-current="page"] { color: var(--chinh); font-weight: 600; }
.dieu-huong a[aria-current="page"] .ic { stroke-width: 2.2; }
.dieu-huong .so {
  position: absolute; top: 5px; left: calc(50% + 5px);
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--tre); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.dh-ten-app { display: none; }

@media (min-width: 900px) {
  .vo { padding-bottom: 0; padding-left: 232px; }
  .dieu-huong {
    top: 0; right: auto; width: 232px; flex-direction: column; gap: 2px;
    border-top: 0; border-right: 1px solid var(--ke); padding: 22px 14px;
  }
  .dieu-huong a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 15px; }
  .dieu-huong a:hover { background: var(--nen); }
  .dieu-huong a[aria-current="page"] { background: var(--chinh-nhat); }
  .dieu-huong .so { position: static; margin-left: auto; }
  .dh-ten-app { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 22px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
}

.ba-nick { display: flex; gap: 6px; }
.ba-nick span { flex: 1; height: 6px; border-radius: 3px; background: var(--nick); }
.ba-nick.nho { width: 72px; gap: 4px; }
.ba-nick.nho span { height: 5px; }

.dai-thu { margin: 0; padding: calc(var(--an-tren) + 6px) 16px 6px; background: var(--vang-nhat); color: var(--vang); font-size: 13px; text-align: center; }
.dai-thu + .dau { padding-top: 12px; }

/* ---------- đầu trang ---------- */
.dau { position: sticky; top: 0; z-index: 10; background: var(--nen); padding: calc(var(--an-tren) + 14px) 16px 10px; }
.dau-dong { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.dau h1 { flex: 1; margin: 0; font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; }
.dau-phu { margin: 4px 0 0; color: var(--muc-phu); font-size: 14px; }
.dau-con { padding-bottom: 4px; }
.gian { flex: 1; }
.nut-lui { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-left: -6px; padding-right: 8px; color: var(--chinh); font-weight: 600; text-decoration: none; }
.nut-lui .ic { width: 22px; height: 22px; }

.hang-chip { display: flex; gap: 8px; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.hang-chip::-webkit-scrollbar { display: none; }
.hang-loc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hang-loc .o { flex: 1 1 140px; width: auto; min-width: 0; }

.o-tim { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 0 12px; height: 46px; background: var(--mat); border: 1px solid var(--ke-dam); border-radius: 12px; color: var(--muc-nhat); }
.o-tim input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; color: var(--muc); }
.o-tim:focus-within { border-color: var(--chinh); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chinh) 18%, transparent); }

/* ---------- chip ---------- */
.chip {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 19px;
  border: 1px solid var(--ke-dam); background: var(--mat);
  font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none;
}
.chip-nho { height: 36px; padding: 0 13px; }
.chip .cham { width: 10px; height: 10px; border-radius: 50%; background: var(--nick); }
.chip .dem { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--tre); }
.chip[aria-pressed="true"], .chip:has(input:checked), .chip.dang-chon { background: var(--muc); border-color: var(--muc); color: #fff; }
.chip[aria-pressed="true"] .dem, .chip:has(input:checked) .dem { color: #fff; }
.chip-nick[aria-pressed="true"], .chip-nick:has(input:checked) { background: var(--nick); border-color: var(--nick); }
.chip-nick[aria-pressed="true"] .cham, .chip-nick:has(input:checked) .cham { background: #fff; }
.chip input[type="radio"], .chip input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--chinh) 50%, transparent); outline-offset: 2px; }
.chip:has(input:disabled) { opacity: .55; cursor: default; }
.chon-ngay { overflow: hidden; }
.chon-ngay input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- nút ---------- */
.nut {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.nut-nho { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.nut-chinh { background: var(--chinh); color: #fff; }
.nut-chinh:hover { background: var(--chinh-dam); }
.nut-phu { background: var(--mat); border-color: var(--ke-dam); color: var(--muc); }
.nut-nhat { background: transparent; color: var(--chinh); padding: 0 8px; min-height: 40px; }
.nut-nguy { background: var(--mat); color: var(--tre); border-color: #E6B8B0; }
.nut-rong { width: 100%; margin-top: 8px; }
.nut-icon { padding: 0; width: 52px; }
.nut:disabled { opacity: .55; cursor: default; }
.nut.dang { position: relative; color: transparent !important; }
.nut.dang::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--muc-nhat); border-right-color: transparent; animation: quay .7s linear infinite;
}
.nut-chinh.dang::after { border-color: #fff; border-right-color: transparent; }
@keyframes quay { to { transform: rotate(360deg); } }
.nut-tron { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--chinh); color: #fff; cursor: pointer; }
.nut-tron .ic { width: 22px; height: 22px; stroke-width: 2.2; }

/* ---------- danh sách khách ---------- */
.muc { margin-top: 18px; }
.muc-dau { display: flex; align-items: baseline; gap: 8px; padding: 0 16px 8px; }
.muc-dau h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.muc-dau .dem { color: var(--muc-phu); font-weight: 500; font-variant-numeric: tabular-nums; }
.muc-mo-ta { margin: -4px 16px 8px; color: var(--muc-phu); font-size: 13px; }
.dem-ket-qua { margin: 6px 16px 8px; color: var(--muc-phu); font-size: 13px; }
.ds { background: var(--mat); border-top: 1px solid var(--ke); border-bottom: 1px solid var(--ke); }
@media (min-width: 600px) { .ds { margin: 0 16px; border: 1px solid var(--ke); border-radius: var(--bo); overflow: hidden; } }

.hang { display: flex; align-items: stretch; border-left: 6px solid var(--nick); }
.hang + .hang { border-top: 1px solid var(--ke); }
.hang-mo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 12px 6px 12px 12px; color: inherit; text-decoration: none; }
.hang-mo:active { background: var(--nen); }
.hang-ten { font-size: 16px; font-weight: 600; line-height: 1.3; }
.hang-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13px; color: var(--muc-phu); }
.hang-ghi { font-size: 14px; color: var(--muc-phu); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hang-nut { display: flex; align-items: center; gap: 6px; padding: 0 10px 0 2px; }
.nut-vuong {
  width: 54px; height: 54px; border-radius: 12px; border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 11.5px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.nut-zalo { background: var(--nick); color: #fff; }
.nut-zalo.tat { background: var(--nen-dam); color: var(--muc-nhat); cursor: default; }
.nut-ghi { background: var(--chinh-nhat); color: var(--chinh); }
.tre { color: var(--tre); font-weight: 600; }
.den-han { color: var(--chinh); font-weight: 600; }
.quen, .chua-giao { color: var(--vang); font-weight: 600; }

details.sap-toi > summary { list-style: none; cursor: pointer; }
details.sap-toi > summary::-webkit-details-marker { display: none; }
details.sap-toi > summary .muc-dau::after { content: 'Xem'; margin-left: auto; color: var(--chinh); font-size: 14px; font-weight: 600; }
details.sap-toi[open] > summary .muc-dau::after { content: 'Ẩn'; }

.trong { padding: 28px 16px; text-align: center; color: var(--muc-phu); }
.trong p { margin: 0 0 6px; }
.trong b { color: var(--muc); }
.trong .nut { margin-top: 10px; }
.trong-nho { list-style: none; padding: 6px 0; color: var(--muc-phu); font-size: 14px; }
.dang-tai { padding: 32px 16px; text-align: center; color: var(--muc-phu); list-style: none; }
.dau-trang { min-height: 100vh; display: grid; place-items: center; }

/* ---------- hồ sơ khách ---------- */
.ho-so { margin: 4px 16px 0; padding: 16px; background: var(--mat); border-radius: var(--bo); border-top: 6px solid var(--nick); }
.ho-so h1 { margin: 0 0 2px; font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.ho-so-sdt { margin: 0; }
.ho-so-sdt a { font-size: 17px; font-weight: 500; color: var(--muc); text-decoration: none; font-variant-numeric: tabular-nums; }
.ho-so-dong { margin: 6px 0 0; font-size: 14px; color: var(--muc-phu); }
.ho-so-dong b { color: var(--muc); font-weight: 600; }
.ho-so-dong b.chu-nick { color: color-mix(in srgb, var(--nick) 78%, #000); }
.nhan-ds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nhan { padding: 3px 9px; border-radius: 6px; background: var(--chinh-nhat); color: var(--chinh); font-size: 12.5px; font-weight: 600; }

.hanh-dong { display: flex; gap: 8px; margin: 10px 16px 0; }
.nut-zalo-lon { flex: 1; min-height: 54px; background: var(--nick); color: #fff; font-size: 16px; }
.nut-zalo-lon:disabled { background: var(--nen-dam); color: var(--muc-nhat); }
.nut-zalo-lon .ic { width: 22px; height: 22px; }

.khoi { margin: 12px 16px 0; padding: 14px 16px 16px; background: var(--mat); border-radius: var(--bo); }
.khoi-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.khoi-dau h2 { margin: 0; font-size: 16px; font-weight: 700; }
.hen-hien { font-size: 15px; }
.khoi-phu { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ke); }
.khoi-phu h3 { margin: 0 0 6px; font-size: 15px; }
.dong-ngang { display: flex; gap: 8px; margin-top: 6px; }
.dong-ngang .o { flex: 1; min-width: 0; }

dl.tt { margin: 0; display: grid; grid-template-columns: 112px 1fr; gap: 8px 12px; font-size: 15px; }
dl.tt dt { color: var(--muc-phu); }
dl.tt dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.nk-ds { list-style: none; margin: 0; padding: 0; }
.nk { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--ke); }
.nk:first-child { border-top: 0; padding-top: 2px; }
.nk-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--nen); color: var(--muc-phu); }
.nk-ic .ic { width: 18px; height: 18px; }
.nk-dau-dong { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 14px; }
.nk-dau-dong b { font-weight: 600; }
.nk-dau-dong span { color: var(--muc-phu); }
.nk-than p { margin: 3px 0 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.nk-than p.nk-hen { color: var(--chinh); font-size: 14px; font-weight: 500; }
.nk-xoa { align-self: start; border: 0; background: none; padding: 4px; color: var(--muc-nhat); font-size: 13px; cursor: pointer; }

.anh-nho { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.anh-nho:empty { display: none; }
.anh-nho > button, .anh-cho { position: relative; width: 72px; height: 72px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: var(--nen-dam); cursor: pointer; }
.anh-nho img { width: 100%; height: 100%; object-fit: cover; display: block; }
.anh-cho button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; }
.anh-cho button .ic { width: 14px; height: 14px; }
img.anh-loi { visibility: hidden; }

/* ---------- bảng nổi ---------- */
.nen-mo {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(14, 26, 20, 0); transition: background .2s;
}
.nen-mo.hien { background: rgba(14, 26, 20, .42); }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--mat); border-radius: 20px 20px 0 0;
  padding: 0 16px calc(18px + var(--an-duoi));
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.nen-mo.hien .sheet { transform: none; }
@media (min-width: 700px) {
  .nen-mo { align-items: center; padding: 24px; }
  .sheet { border-radius: 20px; padding-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { .sheet, .nen-mo, .bao { transition: none; } }
.sheet-dau { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; gap: 12px; padding: 16px 0 12px; background: var(--mat); }
.sheet-dau > div { flex: 1; min-width: 0; }
.sheet-dau h2 { margin: 0; font-size: 20px; letter-spacing: -0.015em; }
.sheet-dau p { margin: 2px 0 0; color: var(--muc-phu); font-size: 14px; }
.nut-dong { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--nen); cursor: pointer; }
.sheet-anh .anh-lon img { display: block; width: 100%; max-height: 64vh; object-fit: contain; border-radius: 10px; background: var(--nen); }
.goi-y-to { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--chinh-nhat); color: var(--chinh-dam); font-size: 14px; }
.gn-loai { margin-bottom: 12px; }
.them-anh { margin: 8px 0 14px; cursor: pointer; }
.gn-anh { margin: 0; }
.the-dang-nhap { margin: 0 0 8px; padding: 12px 14px; border-radius: 10px; background: var(--nen); font-family: var(--font); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- biểu mẫu ---------- */
.truong { display: block; margin: 0 0 14px; }
.truong > span:first-child { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
fieldset { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.o {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--ke-dam); border-radius: 10px; background: var(--mat);
  font-size: 16px; -webkit-appearance: none; appearance: none;
}
select.o {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355635A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
.o-nho { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; border-radius: 10px; }
textarea.o { min-height: 88px; resize: vertical; line-height: 1.45; }
.o:focus { outline: 0; border-color: var(--chinh); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chinh) 18%, transparent); }
.o-so { max-width: 120px; }
.goi-y { display: block; margin: 6px 0 0; color: var(--muc-phu); font-size: 13px; font-weight: 400; }
.canh-bao { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--vang-nhat); color: var(--vang); font-size: 14px; }
.hop-chon { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-top: 1px solid var(--ke); font-size: 15px; cursor: pointer; }
.hop-chon:first-of-type { border-top: 0; }
.hop-chon input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--chinh); }
.hop-chon .goi-y { margin-top: 2px; }
.hop-dau { margin-bottom: 8px; padding-top: 0; border-top: 0; }
form:has([name="vai_tro"][value="quan_tri"]:checked) .phan-nv { display: none; }
.o-mau { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--nick); cursor: pointer; }
.o-mau input { position: absolute; opacity: 0; }
.o-mau:has(input:checked) { box-shadow: 0 0 0 3px var(--mat), 0 0 0 5px var(--nick); }
.o-mau:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--chinh) 50%, transparent); outline-offset: 5px; }

/* ---------- mẫu ---------- */
.phan-doan { display: flex; gap: 2px; margin-top: 10px; padding: 3px; border-radius: 12px; background: var(--nen-dam); }
.phan-doan button { flex: 1; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--muc-phu); font-size: 14px; font-weight: 600; cursor: pointer; }
.phan-doan button[aria-pressed="true"] { background: var(--mat); color: var(--muc); box-shadow: 0 1px 2px rgba(20, 40, 30, .12); }
.phan-doan .dem { font-weight: 500; color: var(--muc-nhat); }
.bang-gui {
  display: flex; align-items: center; gap: 10px; margin: 4px 16px 14px; padding: 8px 8px 8px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--nick) 10%, #fff); border: 1px solid color-mix(in srgb, var(--nick) 35%, #fff); font-size: 14px;
}
.bang-gui > span { flex: 1; }
.luoi-anh { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 16px; }
@media (min-width: 600px) { .luoi-anh { grid-template-columns: repeat(4, 1fr); } }
.o-anh { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--nen-dam); cursor: pointer; }
.o-anh img { width: 100%; height: 100%; object-fit: cover; display: block; }
.o-anh .dau-chon {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid #fff; background: rgba(0, 0, 0, .22); color: transparent;
}
.o-anh .dau-chon .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.o-anh[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--chinh); }
.o-anh[aria-pressed="true"] img { opacity: .82; }
.o-anh[aria-pressed="true"] .dau-chon { background: var(--chinh); color: #fff; }
.o-anh .ten-anh { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 7px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: #fff; font-size: 11.5px; font-weight: 500; text-align: left; line-height: 1.25; }
.xoa-o-anh { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--tre); color: #fff; cursor: pointer; }
.thanh-chon {
  position: fixed; left: 0; right: 0; bottom: calc(var(--cao-tab) + var(--an-duoi)); z-index: 25;
  display: grid; gap: 8px; padding: 10px 16px; background: var(--mat); border-top: 1px solid var(--ke);
  box-shadow: 0 -6px 18px rgba(20, 40, 30, .08);
}
.thanh-chon[hidden] { display: none; }
.tc-dong { display: flex; align-items: center; gap: 8px; }
.tc-dong b { flex: 1; }
.tc-dong select { flex: 1; min-width: 0; }
@media (min-width: 900px) { .thanh-chon { left: 232px; bottom: 0; } }
.ds-tin .tin { padding: 14px 16px; }
.ds-tin .tin + .tin { border-top: 1px solid var(--ke); }
.tin h3 { margin: 0 0 4px; font-size: 15px; }
.tin p { margin: 0; color: var(--muc-phu); font-size: 14.5px; white-space: pre-wrap; }
.tin-nut { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ds-tin + .muc-mo-ta { margin-top: 10px; }

/* ---------- quản lý ---------- */
.nick-tong { display: grid; grid-template-columns: repeat(auto-fit, minmax(98px, 1fr)); gap: 8px; margin-bottom: 14px; }
.nick-o { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-left: 5px solid var(--nick); border-radius: 8px; background: var(--nen); font-size: 14px; color: var(--muc-phu); }
.nick-o b { color: var(--muc); font-variant-numeric: tabular-nums; }
.nick-o b.chu-nick { color: color-mix(in srgb, var(--nick) 78%, #000); margin-bottom: 2px; }
.nick-o .tre b { color: var(--tre); }
.cuon-ngang { overflow-x: auto; }
.bang { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.bang th { padding: 6px 6px 6px 0; border-bottom: 1px solid var(--ke); color: var(--muc-phu); font-size: 12.5px; font-weight: 600; text-align: left; vertical-align: bottom; }
.bang td { padding: 9px 6px 9px 0; border-bottom: 1px solid var(--ke); }
.bang .so { text-align: right; }
.bang a { font-weight: 600; text-decoration: none; }
.ds-gon { display: grid; }
.dong-nv {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 0;
  border: 0; border-top: 1px solid var(--ke); background: none; text-align: left; cursor: pointer;
}
.dong-nv:first-child { border-top: 0; }
div.dong-nv { cursor: default; }
.dong-nick { border-left: 5px solid var(--nick); padding-left: 10px; }
.dong-nick + .dong-nick { margin-top: 8px; border-top: 0; }
.nv-ten { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nv-ten .muc-phu { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.nv-nick { display: flex; gap: 4px; }
.nv-nick .cham { width: 10px; height: 10px; border-radius: 50%; background: var(--nick); }
.nv-vai { flex: none; font-size: 13px; color: var(--muc-phu); }
.nv-vai.khoa { color: var(--tre); font-weight: 600; }
.tk-ten { display: flex; flex-direction: column; margin: 0 0 12px; }

/* ---------- đăng nhập ---------- */
.dang-nhap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--an-tren) + 24px) 16px 24px; }
.dn-khung { width: 100%; max-width: 380px; }
.dn-khung .ba-nick { width: 112px; margin-bottom: 18px; }
.dn-khung h1 { margin: 0 0 4px; font-size: 32px; line-height: 1.1; letter-spacing: -0.03em; }
.dn-phu { margin: 0 0 24px; color: var(--muc-phu); }
.dn-thu { margin: 0 0 12px; color: var(--muc-phu); font-size: 15px; }
.dn-khung .ds-gon { background: var(--mat); border-radius: var(--bo); padding: 0 14px; }
.dn-khung .nv-ten .muc-phu { white-space: normal; }

/* ---------- thông báo ---------- */
.bao {
  position: fixed; left: 50%; bottom: calc(var(--cao-tab) + var(--an-duoi) + 14px); z-index: 80;
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px;
  background: var(--muc); color: #fff; font-size: 15px; text-align: center;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.bao.hien { opacity: 1; transform: translate(-50%, 0); }
.bao.loi { background: var(--tre); }
body.co-thanh-chon .bao { bottom: calc(var(--cao-tab) + var(--an-duoi) + 130px); }
@media (min-width: 900px) { .bao { bottom: 24px; margin-left: 116px; } }
