/* ═══════════════════════════════════════════════════════════════════════════
   public/assets/css/deu-dialoge-list.css — trang danh sách Hội thoại (/dialogues), làm lại 20/10/2026.
   Cùng khuôn trang Ngữ pháp (learn-grammar-list.css): dải đầu trang · ô cấp độ · thanh lọc · bài XẾP THEO CHỦ ĐỀ
   (tên Việt + tên Đức của chủ đề làm tiêu đề nhóm) thay cho một lưới phẳng 40 thẻ giống nhau.
   Nạp SAU deu-dialoge.css (tệp đó còn dùng cho trang luyện play.php). Chỉ token --lv-* / --color-*.
   ═══════════════════════════════════════════════════════════════════════════ */
.dl { --dl-gold: var(--color-brand-gold, var(--lv-mint)); --dl-ok: var(--color-success); --dl-mid: var(--color-warning); }

/* ───── Dải đầu trang ───── */
.dl .dd-band { --lv-band-pb: 46px; }
.dl-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.dl-hero__l { min-width: 0; }
.dl-prog { display: flex; flex-direction: column; gap: 10px; width: 320px; padding: 18px 20px; color: var(--lv-on); }
.dl-prog__t { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dl-prog__t b { font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.dl-prog__t b span { margin-left: 4px; font-size: 15px; font-weight: 500; color: var(--lv-on-2); letter-spacing: 0; }
.dl-prog__t small { font-size: 13px; color: var(--lv-on-3); }
.dl-prog__bar { display: block; height: 6px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--color-on-dark) 18%, transparent); }
.dl-prog__bar i { display: block; height: 100%; border-radius: inherit; background: var(--dl-gold); }
.dl-prog__next { font-size: 13px; line-height: 1.45; color: var(--lv-on-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-prog__next b { color: var(--lv-on); font-weight: 650; }
.dl-prog .lv-btn { margin-top: 2px; }

/* ───── Ô cấp độ (giống trang Ngữ pháp) ───── */
.dl-body { padding-top: 28px; }
.dl-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dd .lv-card.dl-lv { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; color: var(--lv-text); box-shadow: none;
  transition: border-color var(--lv-dur) var(--lv-ease), box-shadow var(--lv-dur) var(--lv-ease); }
.dl-lv:hover { border-color: color-mix(in srgb, var(--color-primary) 40%, var(--lv-hair)); box-shadow: var(--lv-sh-2); }
.dl-lv:focus-visible { outline: 2px solid var(--lv-brand-fg); outline-offset: 2px; }
.dl-lv__top { display: flex; align-items: baseline; gap: 10px; }
.dl-lv__top b { font-size: 26px; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--lv-ink); }
.dl-lv__top span { font-size: 14.5px; font-weight: 650; color: var(--lv-ink); }
.dl-lv small { font-size: 13px; color: var(--lv-muted); }
.dl-lv__bar { display: block; height: 5px; margin-top: 6px; border-radius: 999px; overflow: hidden; background: var(--lv-sunken); }
.dl-lv__bar i { display: block; height: 100%; border-radius: inherit; background: var(--lv-brand-strong); }
.dl-lv.is-on { border-color: transparent; color: var(--lv-on-2);
  background:
    radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--dl-gold) 26%, transparent), transparent 62%),
    linear-gradient(155deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 58%, black));
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--color-primary) 90%, transparent); }
.dl-lv.is-on .dl-lv__top b { color: var(--dl-gold); }
.dl-lv.is-on .dl-lv__top span, .dl-lv.is-on small { color: var(--lv-on); }
.dl-lv.is-on small { color: var(--lv-on-2); }
.dl-lv.is-on .dl-lv__bar { background: color-mix(in srgb, var(--color-on-dark) 22%, transparent); }
.dl-lv.is-on .dl-lv__bar i { background: var(--dl-gold); }

/* ───── Thanh lọc ───── */
.dl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 28px 0 8px; }
.dl-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 13px; background: var(--lv-sunken); }
.dl-seg button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 0; border-radius: 10px;
  background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--lv-muted); cursor: pointer; }
.dl-seg button i { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--lv-faint); font-variant-numeric: tabular-nums; }
.dl-seg button:hover { color: var(--lv-ink); }
.dl-seg button.is-on { background: var(--lv-surface); color: var(--lv-ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--lv-shade, black) 18%, transparent); }
.dl-seg button.is-on i { color: var(--lv-brand-fg); }
.dl-seg button:focus-visible { outline: 2px solid var(--lv-brand-fg); outline-offset: 1px; }
.dl-topic { position: relative; display: inline-flex; flex: 0 1 320px; }
.dl-topic select { width: 100%; height: 46px; padding: 0 40px 0 14px; border: 1px solid var(--lv-border); border-radius: 13px; appearance: none; -webkit-appearance: none;
  background: var(--lv-surface); font: inherit; font-size: 14.5px; color: var(--lv-ink); cursor: pointer; }
.dl-topic::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
  border-right: 2px solid var(--lv-muted); border-bottom: 2px solid var(--lv-muted); transform: rotate(45deg); }
.dl-topic select:focus { outline: none; border-color: color-mix(in srgb, var(--color-primary) 55%, var(--lv-border)); box-shadow: var(--shadow-focus); }

/* ───── Mỗi chủ đề một khối (như một bài trong giáo trình), bài là các dòng ───── */
.dl-units { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 18px; }
.dd .lv-card.dl-sec { padding: 0; overflow: hidden; box-shadow: none; }   /* deu-dialoge.css đặt .dd .lv-card { padding } cho mọi thẻ */
.dl-sec__h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; padding: 16px 20px 12px; border-bottom: 1px solid var(--lv-hair); }
.dl-sec__h h2 { font-size: 17px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; color: var(--lv-ink); }
.dl-sec__h i { font-size: 14px; color: var(--lv-muted); }
.dl-sec__h span { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--lv-muted); font-variant-numeric: tabular-nums; }
.dl-items { list-style: none; margin: 0; padding: 0; }
.dl-card + .dl-card { border-top: 1px solid var(--lv-hair); }
.dl-card__a { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 20px; color: var(--lv-text);
  transition: background var(--lv-dur) var(--lv-ease); }
.dl-card__a:hover { background: var(--lv-tint); }
.dl-card__a:focus-visible { outline: 2px solid var(--lv-brand-fg); outline-offset: -2px; }
.dl-card__no { display: grid; place-items: center; width: 38px; height: 32px; border-radius: 9px;
  font-size: 13px; font-weight: 800; background: var(--lv-sunken); color: var(--lv-muted); }
.dl-card.is-done .dl-card__no { background: var(--lv-brand-strong); color: var(--lv-on); }
.dl-card__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-card__t b { font-size: 15.5px; line-height: 1.35; font-weight: 700; color: var(--lv-ink); }
.dl-card__a:hover .dl-card__t b { color: var(--lv-brand-fg); }
.dl-card__t i { font-size: 13.5px; line-height: 1.4; color: var(--lv-muted); }
.dl-card__s { margin-top: 3px; font-size: 13.5px; line-height: 1.5; color: var(--lv-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-card__f { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-top: 2px; }
.dl-card__lines { font-size: 12.5px; color: var(--lv-muted); white-space: nowrap; }
.dl-card__score { display: flex; align-items: center; gap: 8px; }
.dl-card__score b { font-size: 13px; font-weight: 800; color: var(--lv-ink); }
.dl-meter { display: block; width: 54px; height: 6px; border-radius: 999px; overflow: hidden; background: var(--lv-sunken); }
.dl-meter i { display: block; height: 100%; border-radius: inherit; background: var(--dl-mid); }
.dl-meter.is-ok i { background: var(--dl-ok); }
.dl-meter.is-low i { background: var(--color-brand-red, var(--dl-mid)); }
.dl-none { padding: 28px 20px; text-align: center; font-size: 14.5px; color: var(--lv-muted); }

/* ───── Máy tính bảng / điện thoại ───── */
@media (max-width: 1100px) {
  .dl-units { grid-template-columns: 1fr; }
  .dl-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
  .dl-prog { width: auto; max-width: 520px; }
}
@media (max-width: 760px) {
  .dl .dd-band { --lv-band-pb: 30px; }
  .dl-prog { padding: 16px; }
  .dl-body { padding-top: 18px; }
  .dl-levels { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--lv-gutter); scrollbar-width: none;
    margin: 0 calc(-1 * var(--lv-gutter)); padding: 2px var(--lv-gutter) 6px; }
  .dl-levels::-webkit-scrollbar { display: none; }
  .dd .lv-card.dl-lv { flex: 0 0 150px; scroll-snap-align: start; padding: 14px; }
  .dl-lv__top { flex-direction: column; gap: 4px; }
  .dl-bar { margin-top: 20px; }
  .dl-seg { width: 100%; }
  .dl-seg button { flex: 1; justify-content: center; padding: 0 8px; font-size: 13.5px; }
  .dl-topic { flex: 1 1 100%; }
  .dl-units { grid-template-columns: 1fr; gap: 12px; }
  .dl-sec__h { padding: 14px 16px 10px; }
  .dl-card__a { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 13px 16px; }
  .dl-card__no { width: 34px; height: 30px; font-size: 12.5px; }
}
