/* Giao diện chung. Đổi màu thương hiệu ở khối :root */
:root {
  --bg: #f6f1e4;
  --card: #fffdf7;
  --ink: #2d2a24;
  --ink-2: #5d5749;
  --line: #e4dccb;
  --brand: #3f8f3a;
  --brand-ink: #ffffff;
  --accent: #e8a33a;
  --danger: #c2492f;
  --ok: #2e7d32;
  --soil: #d8b98b;
  --grass: #cfe6a6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 45, 20, 0.06), 0 4px 14px rgba(60, 45, 20, 0.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip; /* chặn trang trượt ngang trên điện thoại nếu có phần tử lỡ rộng hơn màn hình */
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--brand); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.8em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
/* Khoảng thở giữa menu trên và nội dung (main.wrap: .wrap đặt padding ngang, giữ lại padding dọc) */
main.wrap { padding-top: 32px; padding-bottom: 56px; }
.narrow { max-width: 640px; }

/* Thanh trên */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.logo { font-weight: 800; color: var(--ink); text-decoration: none; margin-right: auto; }
.logo small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--ink-2); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: 0.92rem; }
.nav a.on, .nav a:hover { background: var(--bg); color: var(--ink); }

main { padding: 24px 0 48px; }
footer { color: var(--ink-2); font-size: 0.85rem; padding: 24px 0 40px; border-top: 1px solid var(--line); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.muted { color: var(--ink-2); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 0.8rem; font-weight: 600; }
.pill.ok { background: #e3f3e1; border-color: #b9dcb4; color: var(--ok); }
.pill.warn { background: #fdf0d9; border-color: #f0d29c; color: #8a5a00; }
.pill.bad { background: #fbe4de; border-color: #eebbaf; color: var(--danger); }

/* Nút và ô nhập */
.btn { display: inline-block; border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; background: var(--brand); color: var(--brand-ink); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.alt { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 6px 10px; font-size: 0.85rem; border-radius: 8px; }
.btn.danger { background: var(--danger); }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 0.92rem; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
textarea { min-height: 120px; resize: vertical; }
.hint { font-size: 0.82rem; color: var(--ink-2); margin-top: 4px; }
.msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; display: none; }
.msg.show { display: block; }
.msg.err { background: #fbe4de; color: #7c2412; }
.msg.okm { background: #e3f3e1; color: #1d5a20; }

/* Trang giới thiệu */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 2.2rem; }
.hero .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 720px; }
.stage { border-left: 6px solid var(--accent); }
.stage .num { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); letter-spacing: 0.04em; }
.rules li { margin-bottom: 6px; }

/* Số lớn */
.stat { font-size: 1.6rem; font-weight: 800; }
.stat small { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); display: block; }

/* Nông trại */
.farm { border-top: 6px solid var(--farm, var(--brand)); }
.farm-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.farm-head h3 { margin: 0; }
.farm-rank { font-weight: 800; color: var(--farm, var(--brand)); }
.farm-stats { font-size: 0.85rem; color: var(--ink-2); }
.plots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plot { background: #f3ead5; border-radius: 10px; padding: 8px; }
.plot.me { outline: 3px solid var(--accent); }
.plot-name { color: var(--ink); text-decoration: none; font-size: 0.82rem; font-weight: 700; display: flex; gap: 6px; align-items: center; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plot-name .dot { width: 8px; height: 8px; border-radius: 50%; background: #bbb; flex: none; }
.plot-name .dot.on { background: var(--ok); }
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.tile { aspect-ratio: 1 / 1; border-radius: 4px; position: relative; }
.tile svg { width: 100%; height: 100%; display: block; }
.plot-foot { font-size: 0.75rem; color: var(--ink-2); margin-top: 6px; }
.stage-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 16px; }
.stage-tabs button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer; color: var(--ink-2); }
.stage-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 18px; display: inline-block; }
.legend i svg { width: 100%; height: 100%; }

/* Lịch cá nhân 12 tuần */
.cal { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); gap: 3px; align-items: center; max-width: 560px; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .stats3 .stat { font-size: 1.15rem; } .stats3 .stat small { font-size: 0.74rem; } }
.cal .wk { font-size: 0.72rem; color: var(--ink-2); font-weight: 600; }
.cal .tile { border-radius: 6px; }
.cal .dn { position: absolute; top: 1px; left: 3px; font-size: 0.6rem; color: rgba(0, 0, 0, 0.45); font-weight: 700; }

.feed-item { border-top: 1px solid var(--line); padding: 10px 0; }
.feed-item:first-child { border-top: 0; }

.qr { width: 100%; max-width: 280px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.copy { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--bg); padding: 2px 8px; border-radius: 6px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.03em; }
.scroll { overflow-x: auto; }
.hidden { display: none !important; }

@media (max-width: 560px) {
  main.wrap { padding-top: 22px; }
  h1, .hero h1 { font-size: 1.6rem; }
  .card { padding: 14px; }
  .plots { gap: 6px; }
  .plot { padding: 6px; }
  .cal { grid-template-columns: 40px repeat(7, minmax(0, 1fr)); }
}

/* ---------- Bảng tin ---------- */
.feed { max-width: 680px; margin: 0 auto; }
.post { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--farm, var(--brand)); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--farm, var(--brand)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.post-name { font-weight: 800; color: var(--ink); text-decoration: none; }
.post-name:hover { text-decoration: underline; }
.post-text { white-space: pre-wrap; margin-bottom: 10px; }
.post-link { display: block; margin: 4px 0 8px; word-break: break-all; }
.pgrid { display: grid; gap: 4px; border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.pgrid.n1 { grid-template-columns: 1fr; }
.pgrid.n2 { grid-template-columns: 1fr 1fr; }
.pgrid.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pgrid.n3 .pimg:first-child { grid-row: span 2; }
.pimg { border: 0; padding: 0; background: #eee; cursor: zoom-in; position: relative; display: block; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgrid.n1 .pimg img { max-height: 460px; object-fit: cover; }
.pgrid.n2 .pimg, .pgrid.n3 .pimg { aspect-ratio: 1 / 1; }
.pgrid.n3 .pimg:first-child { aspect-ratio: auto; }
.pimg.hid img { opacity: 0.35; }
.pimg span { position: absolute; left: 8px; top: 8px; background: #000; color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 6px; }
.post-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.water { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #b9d7f0; background: #eef6fd; color: #1f5f8c; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.water svg { width: 16px; height: 16px; fill: #8fbfe6; }
.water.on { background: #4a90d9; border-color: #4a90d9; color: #fff; }
.water.on svg { fill: #fff; }
.water.ro { cursor: default; background: transparent; border-color: transparent; padding-left: 0; font-weight: 600; }
.water.splash svg { animation: splash 0.6s ease; }
@keyframes splash { 0% { transform: scale(1); } 40% { transform: scale(1.6) translateY(-3px); } 100% { transform: scale(1); } }
.linkbtn { border: 0; background: none; color: var(--brand); font: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer; padding: 0; }
.cheers { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.cheer { font-size: 0.92rem; padding: 3px 0; }
.cheer-form { display: flex; gap: 8px; margin-top: 10px; }
.cheer-form input { flex: 1; padding: 8px 10px; }
.daynav { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 10px 0 12px; }
.daynav b { font-size: 1.05rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: var(--card); padding: 7px 14px; font: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--ink); color: #fff; }
.waiting { font-size: 0.88rem; color: var(--ink-2); background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.lb { position: fixed; inset: 0; background: rgba(15, 15, 12, 0.92); z-index: 50; display: flex; align-items: center; justify-content: center; }
.lb img { max-width: 94vw; max-height: 86vh; border-radius: 6px; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 30px; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; }
.lb .lb-x { top: 14px; right: 14px; }
.lb .lb-prev { left: 12px; top: 50%; }
.lb .lb-next { right: 12px; top: 50%; }
.lb-bar { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }
.lb-bar .linkbtn { position: static; width: auto; height: auto; font-size: 14px; background: none; color: #ffd36b; }

/* chọn ảnh khi nộp bài */
.picks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pick { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; position: relative; background: #eee; }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; line-height: 1; }
.pick-add { width: 84px; height: 84px; border-radius: 10px; border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-2); font-size: 0.78rem; font-weight: 600; cursor: pointer; background: var(--card); }
.pick-add b { font-size: 1.6rem; line-height: 1; }

/* ---------- Ảnh đại diện, menu tài khoản, thanh menu dưới ---------- */
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--farm, var(--brand)); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--farm, var(--brand)); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 48px; height: 48px; font-size: 1.2rem; }
.av.xl { width: 72px; height: 72px; font-size: 1.8rem; }
.umenu { position: relative; }
.ubtn { border: 0; background: none; padding: 4px; cursor: pointer; border-radius: 50%; }
.umenu-pop { position: absolute; right: 0; top: 48px; width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(40, 35, 20, 0.16); padding: 6px; z-index: 30; }
.umenu-head { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.umenu-head small { display: block; color: var(--ink-2); }
.umenu-pop a, .umenu-pop button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; font-size: 0.92rem; background: none; border: 0; cursor: pointer; }
.umenu-pop a:hover, .umenu-pop button:hover { background: var(--bg); }
.umenu-pop [data-logout] { color: var(--danger); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.tabbar { display: none; }
@media (max-width: 760px) {
  .top .nav { display: none; }
  body:not(.has-tabbar) .top .nav { display: flex; }
  .has-tabbar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 253, 247, 0.97); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--ink-2); font-size: 0.68rem; font-weight: 700; }
  .tab svg { width: 22px; height: 22px; }
  .tab.on { color: var(--brand); }
  .tab-nop i { width: 46px; height: 46px; margin-top: -20px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(63, 143, 58, 0.35); position: relative; }
  .tab-nop i svg { width: 24px; height: 24px; }
  .tab-todo i::after { content: ""; position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
  .tab-done i { background: #8cc35c; }
  .tab-off i { background: #bdb5a2; }
  body.full #stage { height: calc(100dvh - 57px - 68px); }
}

/* ---------- Trang của tôi (bảng điều khiển) ---------- */
.dash-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; padding: 0; overflow: hidden; border-top: 6px solid var(--farm, var(--brand)); }
.dash-main { padding: 22px; }
.dash-hi { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.dash-hi b { font-size: 1.15rem; display: block; }
.dash-day { font-size: 3rem; font-weight: 800; line-height: 1; margin: 6px 0 8px; letter-spacing: -0.02em; }
.dash-day span { font-size: 1.3rem; color: var(--ink-2); font-weight: 700; }
.day-bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.day-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8cc35c, var(--brand)); border-radius: 99px; }
.stage-line { margin: 10px 0 0; font-size: 0.92rem; }
.stage-line em { color: var(--ink-2); font-style: normal; display: block; }
.dash-act { background: #f3f8ec; padding: 22px; display: flex; flex-direction: column; gap: 8px; justify-content: center; border-left: 1px solid var(--line); }
.dash-act.done { background: #eaf5e4; }
.dash-act .k { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.dash-act .big { font-size: 1.6rem; font-weight: 800; }
.dash-act .btn { text-align: center; }
.nudge { display: block; padding: 12px 14px; border-radius: 12px; margin-bottom: 10px; text-decoration: none; color: var(--ink); font-size: 0.94rem; }
.nudge.pay { background: #fdf0d9; border: 1px solid #f0d29c; }
.nudge.news { background: #e9f3fd; border: 1px solid #b9d7f0; }
.nudge.miss { background: var(--card); border: 1px dashed var(--line); }
.todo { list-style: none; padding: 0; margin: 10px 0; counter-reset: t; }
.todo li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.todo li::before { counter-increment: t; content: counter(t); width: 26px; height: 26px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; flex: none; }
.todo li.done::before { content: "✓"; background: #e3f3e1; color: var(--ok); }
.todo li span { flex: 1; }
.todo li.done span { color: var(--ink-2); text-decoration: line-through; }
.mini-feed li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); list-style: none; }
.mini-feed { padding: 0; margin: 0; }
.mini-feed .grow2 { flex: 1; min-width: 0; }
.mini-feed .grow2 p { margin: 0; font-size: 0.86rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mates li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); list-style: none; }
.mates { padding: 0; margin: 0; }
.rankbar { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 0.9rem; }
.rankbar .bar { flex: 1; margin: 0; }
@media (max-width: 760px) {
  .dash-hero { grid-template-columns: 1fr; }
  .dash-act { border-left: 0; border-top: 1px solid var(--line); }
  .dash-day { font-size: 2.5rem; }
}

/* Số đếm kèm biểu tượng: "2" + giọt nước (lượt tưới), "3" + ảnh */
.cnt { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 0.86rem; color: #1f5f8c; white-space: nowrap; }
.cnt svg { width: 16px; height: 16px; fill: #4a90d9; }
.cnt.ph { color: var(--ink-2); }
.cnt.ph svg { fill: none; stroke: currentColor; }

/* Menu trên cho khách chưa đăng nhập, trên điện thoại: dòng 1 tên + nút Đăng ký, dòng 2 menu vuốt ngang */
@media (max-width: 760px) {
  body:not(.has-tabbar) .top .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; padding-top: 8px; padding-bottom: 4px; min-height: 0; }
  body:not(.has-tabbar) .top .logo { grid-column: 1; grid-row: 1; margin: 0; }
  body:not(.has-tabbar) .top .wrap > .btn { grid-column: 2; grid-row: 1; align-self: center; }
  body:not(.has-tabbar) .top .nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 10px 4px; }
  body:not(.has-tabbar) .top .nav::-webkit-scrollbar { display: none; }
  .top .nav a { white-space: nowrap; padding: 6px 9px; font-size: 0.86rem; }
  .logo { font-size: 0.98rem; }
  .logo small { font-size: 0.68rem; }
}

/* ---- Rà soát 08/11: chân trang, menu trượt, bảng thi đua, lịch tuần, bảng quản trị trên điện thoại ---- */
footer .foot { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
footer .foot > div { display: flex; flex-direction: column; gap: 2px; }
footer .foot b { color: var(--ink); }
footer .foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 760px) {
  body:not(.has-tabbar) .top .nav a[href="/"] { display: none; } /* chữ logo đã dẫn về trang chủ */
  .top .nav.more { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
}
.rankbar { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; row-gap: 5px; margin: 10px 0; }
.rankbar .bar { grid-column: 2 / 4; }
.rankbar span { min-width: 0; }
.cal .wk { white-space: nowrap; }
@media (max-width: 560px) { .cal { grid-template-columns: 46px repeat(7, minmax(0, 1fr)); } .cal .wk { font-size: 0.66rem; } }
.more-btn { display: block; margin: 14px auto 0; }
.login-why { background: #eef6e9; border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; font-size: 0.92rem; }
.mtable tr.off { opacity: 0.5; }
.mtable.hide-off tr.off { display: none; }
@media (max-width: 700px) {
  .mtable thead { display: none; }
  .mtable, .mtable tbody { display: block; }
  .mtable tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .mtable td { display: block; border: 0; padding: 0; min-width: 0; }
  .mtable td:first-child { grid-column: 1 / 3; }
  .mtable td:last-child { grid-column: 3; grid-row: 1; justify-self: end; }
  .mtable td[data-l]::before { content: attr(data-l); display: block; font-size: 0.7rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
}
.evt td:last-child { white-space: nowrap; }

/* ---- Danh sách có biểu tượng: thay đoạn văn dài bằng các dòng ngắn dễ đọc ----
   Dùng: <ul class="ticks"><li data-ic="clock">Hạn 23:59</li></ul>  (không ghi data-ic thì là dấu tích)
   Trong JS: NT.ticks([["clock", "Hạn **23:59**"], ...]) — **chữ** in đậm. Biểu tượng có sẵn: wallet, check, clock, users, sprout, shield, plus, refresh, pen, camera, calendar, coin, qr, drop, chat, lock, star, bank, minus, eye, target, mail, flag, link */
.ticks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; text-align: left; }
.ticks li { position: relative; padding-left: 34px; line-height: 1.45; min-height: 24px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: -1px; width: 25px; height: 25px; border-radius: 8px; background: var(--tick-bg, #e3f3e1); }
.ticks li::after { content: ""; position: absolute; left: 4.5px; top: 3.5px; width: 16px; height: 16px; background: var(--tick, var(--brand)); -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.ticks.sm { gap: 7px; font-size: 0.92rem; }
.ticks.sm li { padding-left: 30px; }
.ticks.sm li::before { width: 22px; height: 22px; border-radius: 7px; }
.ticks.sm li::after { left: 4px; top: 3px; width: 14px; height: 14px; }
.ticks.row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ticks.warn { --tick-bg: #fdeedd; --tick: #c26a1a; }
:where(.ticks li) { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 12.5l4.5 4.5L19 7.5%22/%3E%3C/svg%3E"); }
[data-ic="check"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 12.5l4.5 4.5L19 7.5%22/%3E%3C/svg%3E"); }
[data-ic="clock"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M12 7v5l3.5 2%22/%3E%3C/svg%3E"); }
[data-ic="users"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%229%22 cy=%228%22 r=%223.2%22/%3E%3Cpath d=%22M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6%22/%3E%3Cpath d=%22M16 4.6a3 3 0 0 1 0 6%22/%3E%3Cpath d=%22M18 14.2c1.8.7 3 2.7 3 5.8%22/%3E%3C/svg%3E"); }
[data-ic="sprout"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 21v-9%22/%3E%3Cpath d=%22M12 13c-4 0-6-3-6-6 4 0 6 2 6 6z%22/%3E%3Cpath d=%22M12 11c0-4 2-7 6-7 0 4-2 7-6 7z%22/%3E%3C/svg%3E"); }
[data-ic="shield"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z%22/%3E%3Cpath d=%22M9 12l2 2 4-4%22/%3E%3C/svg%3E"); }
[data-ic="plus"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M12 8v8M8 12h8%22/%3E%3C/svg%3E"); }
[data-ic="refresh"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 12a9 9 0 0 1 15.5-6.2L21 8%22/%3E%3Cpath d=%22M21 3v5h-5%22/%3E%3Cpath d=%22M21 12a9 9 0 0 1-15.5 6.2L3 16%22/%3E%3Cpath d=%22M3 21v-5h5%22/%3E%3C/svg%3E"); }
[data-ic="pen"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 20h4L19 9l-4-4L4 16z%22/%3E%3Cpath d=%22M13 7l4 4%22/%3E%3C/svg%3E"); }
[data-ic="camera"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%227%22 width=%2218%22 height=%2213%22 rx=%222%22/%3E%3Cpath d=%22M8 7l2-3h4l2 3%22/%3E%3Ccircle cx=%2212%22 cy=%2213.5%22 r=%223.5%22/%3E%3C/svg%3E"); }
[data-ic="calendar"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%225%22 width=%2218%22 height=%2216%22 rx=%222%22/%3E%3Cpath d=%22M3 10h18M8 3v4M16 3v4%22/%3E%3C/svg%3E"); }
[data-ic="coin"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M15 9.2c-.5-1-1.6-1.6-3-1.6-1.7 0-3 .9-3 2.2 0 3 6 1.6 6 4.6 0 1.3-1.3 2.2-3 2.2-1.4 0-2.6-.7-3-1.7M12 6v1.6M12 16.6V18%22/%3E%3C/svg%3E"); }
[data-ic="qr"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%223%22 width=%227%22 height=%227%22 rx=%221%22/%3E%3Crect x=%2214%22 y=%223%22 width=%227%22 height=%227%22 rx=%221%22/%3E%3Crect x=%223%22 y=%2214%22 width=%227%22 height=%227%22 rx=%221%22/%3E%3Cpath d=%22M14 14h3v3h-3zM21 14v7h-7%22/%3E%3C/svg%3E"); }
[data-ic="drop"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3c4 5 6 8 6 11a6 6 0 0 1-12 0c0-3 2-6 6-11z%22/%3E%3C/svg%3E"); }
[data-ic="chat"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 5h16v11H9l-5 4z%22/%3E%3C/svg%3E"); }
[data-ic="lock"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%225%22 y=%2211%22 width=%2214%22 height=%2210%22 rx=%222%22/%3E%3Cpath d=%22M8 11V8a4 4 0 0 1 8 0v3%22/%3E%3C/svg%3E"); }
[data-ic="star"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3l2.6 5.6 6 .7-4.5 4.1 1.2 6L12 16.5l-5.3 2.9 1.2-6-4.5-4.1 6-.7z%22/%3E%3C/svg%3E"); }
[data-ic="bank"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 10l9-6 9 6M5 10v8M10 10v8M14 10v8M19 10v8M3 21h18%22/%3E%3C/svg%3E"); }
[data-ic="minus"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M8 12h8%22/%3E%3C/svg%3E"); }
[data-ic="eye"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%223%22/%3E%3C/svg%3E"); }
[data-ic="target"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%225%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%221.2%22/%3E%3C/svg%3E"); }
[data-ic="mail"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%225%22 width=%2218%22 height=%2214%22 rx=%222%22/%3E%3Cpath d=%22M3 7l9 6 9-6%22/%3E%3C/svg%3E"); }
[data-ic="flag"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 21V4M5 4h11l-2 4 2 4H5%22/%3E%3C/svg%3E"); }
[data-ic="link"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1%22/%3E%3Cpath d=%22M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1%22/%3E%3C/svg%3E"); }
[data-ic="wallet"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M17 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2%22/%3E%3Crect x=%223%22 y=%227%22 width=%2218%22 height=%2213%22 rx=%222%22/%3E%3Cpath d=%22M16 13.5h2%22/%3E%3C/svg%3E"); }

/* tiêu đề có biểu tượng: <h2 class="ih" data-ic="clock">...</h2> */
.ih { display: flex; align-items: center; gap: 10px; }
.ih::before { content: ""; flex: none; width: 32px; height: 32px; border-radius: 10px; background: #e3f3e1; }
.ih::after { content: ""; position: absolute; width: 18px; height: 18px; margin-left: 7px; background: var(--brand); -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.ih { position: relative; }
