/* Kết Nối Số — Máy tính tự động hoá (data-tool="tu-dong-hoa"). Mọi quy tắc nằm dưới .tdh */
.tdh { font-family: var(--font); color: var(--ink); line-height: 1.5; text-align: left; -webkit-text-size-adjust: 100%; }
.tdh *, .tdh *::before, .tdh *::after { box-sizing: border-box; }
.tdh [hidden] { display: none !important; }
.tdh button, .tdh input, .tdh select { font-family: inherit; }
.tdh .tdh-ic { width: 20px; height: 20px; flex: none; display: block; }
.tdh :focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tdh .tdh-shell { container: tdh / inline-size; min-width: 0; }

/* ---------- Đầu công cụ ---------- */
.tdh .tdh-head { max-width: 760px; margin: 0 0 32px; }
.tdh .tdh-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 10px; border-radius: 999px; background: linear-gradient(120deg, rgba(31, 91, 255, .09), rgba(123, 92, 255, .09) 55%, rgba(0, 194, 178, .12)); color: var(--blue-dark); font-size: .82rem; font-weight: 650; letter-spacing: .01em; }
.tdh .tdh-kicker .tdh-ic { width: 15px; height: 15px; color: var(--violet); }
.tdh .tdh-title { margin: 14px 0 10px; font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.4rem); font-weight: 760; font-stretch: 115%; line-height: 1.08; letter-spacing: -0.015em; color: var(--ink); }
.tdh .tdh-lede { margin: 0; max-width: 62ch; color: var(--muted); font-size: 1.04rem; line-height: 1.6; }

/* ---------- Lưới ---------- */
.tdh .tdh-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "tasks" "assume" "panel" "suggest"; gap: 36px; align-items: start; }
.tdh .tdh-sec-tasks { grid-area: tasks; min-width: 0; }
.tdh .tdh-sec-assume { grid-area: assume; min-width: 0; }
.tdh .tdh-panel { grid-area: panel; min-width: 0; }
.tdh .tdh-sec-suggest { grid-area: suggest; min-width: 0; }
@container tdh (min-width: 860px) {
	.tdh .tdh-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 384px); grid-template-areas: "tasks panel" "assume panel" "suggest panel"; grid-template-rows: auto auto 1fr; column-gap: 36px; row-gap: 44px; }
	.tdh .tdh-panel { position: sticky; top: var(--tdh-top, 24px); max-height: calc(100vh - 2 * var(--tdh-top, 24px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
}

/* ---------- Tiêu đề bước ---------- */
.tdh .tdh-sec-head { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 18px; }
.tdh .tdh-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), #5A47F5); color: #fff; font-size: .95rem; font-weight: 760; font-stretch: 110%; box-shadow: 0 8px 18px -10px rgba(31, 91, 255, .9); }
.tdh .tdh-sec-txt { min-width: 0; padding-top: 2px; }
.tdh .tdh-h { margin: 0; font-size: 1.18rem; font-weight: 760; font-stretch: 112%; line-height: 1.25; letter-spacing: -0.005em; color: var(--ink); }
.tdh .tdh-sub { margin: 5px 0 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }

/* ---------- Thẻ công việc ---------- */
.tdh .tdh-list { display: grid; gap: 10px; container: tdhl / inline-size; }
.tdh .tdh-task { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); transition: border-color .2s ease, box-shadow .25s ease, background .25s ease; }
.tdh .tdh-task:hover { border-color: #B6C0D6; }
.tdh .tdh-task.is-on { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: 0 16px 34px -26px rgba(31, 91, 255, .7); }
.tdh .tdh-toggle { display: grid; grid-template-columns: 44px minmax(0, 1fr) 26px; align-items: center; gap: 14px; width: 100%; min-height: 66px; margin: 0; padding: 12px 16px; border: 0; border-radius: 13px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tdh .tdh-tic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--ink-2); transition: background .25s ease, color .25s ease; }
.tdh .tdh-tic .tdh-ic { width: 22px; height: 22px; }
.tdh .tdh-task.is-on .tdh-tic { background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; }
.tdh .tdh-ttx { min-width: 0; }
.tdh .tdh-tname { display: block; font-size: 1rem; font-weight: 650; line-height: 1.32; color: var(--ink); overflow-wrap: anywhere; }
.tdh .tdh-tmeta { display: block; margin-top: 3px; font-size: .84rem; color: var(--muted); line-height: 1.35; }
.tdh .tdh-task.is-on .tdh-tmeta { color: var(--teal-ink); font-weight: 600; }
.tdh .tdh-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #C4CCDD; display: grid; place-items: center; color: transparent; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.tdh .tdh-check .tdh-ic { width: 15px; height: 15px; stroke-width: 2.8; }
.tdh .tdh-toggle:hover .tdh-check { border-color: var(--blue); }
.tdh .tdh-task.is-on .tdh-check { background: linear-gradient(135deg, var(--blue), var(--violet)); border-color: transparent; color: #fff; }
.tdh .tdh-toggle:active .tdh-check { transform: scale(.9); }

/* Phần chỉnh số liệu mở ra */
.tdh .tdh-edit-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.2, .8, .2, 1); }
.tdh .tdh-task.is-on .tdh-edit-wrap { grid-template-rows: 1fr; }
.tdh .tdh-edit { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear .32s; }
.tdh .tdh-task.is-on .tdh-edit { visibility: visible; transition-delay: 0s; }
.tdh .tdh-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 16px; padding: 14px 0 0; border-top: 1px dashed var(--line); }
.tdh .tdh-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; }
.tdh .tdh-lab { display: block; margin: 0; font-size: .82rem; font-weight: 600; line-height: 1.3; color: var(--ink-2); letter-spacing: .005em; }
.tdh .tdh-lab-sm { font-size: .8rem; color: var(--muted); }
.tdh .tdh-step { display: flex; align-items: stretch; width: 144px; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
.tdh .tdh-step:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 91, 255, .16); }
.tdh .tdh-sbtn { flex: none; width: 42px; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background .15s ease; }
.tdh .tdh-sbtn:first-child { border-radius: 10px 0 0 10px; }
.tdh .tdh-sbtn:last-child { border-radius: 0 10px 10px 0; }
.tdh .tdh-sbtn .tdh-ic { width: 17px; height: 17px; stroke-width: 2.2; }
.tdh .tdh-sbtn:hover { background: #E6EBF6; }
.tdh .tdh-sbtn:active { background: #D9E1F2; }
.tdh .tdh-sbtn:focus-visible { outline-offset: -3px; border-radius: 10px; }
.tdh .tdh-inp { width: 100%; min-width: 0; margin: 0; padding: 0 4px; border: 0; background: transparent; color: var(--ink); font-size: 1rem; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.tdh .tdh-inp:focus, .tdh .tdh-inp:focus-visible { outline: none; }
.tdh .tdh-step .tdh-inp { flex: 1 1 auto; }
.tdh .tdh-tfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 12px 16px 14px; }
.tdh .tdh-tsave { margin: 0; font-size: .88rem; font-weight: 650; color: var(--teal-ink); font-variant-numeric: tabular-nums; }
.tdh .tdh-tsave:empty { display: none; }

/* Việc riêng */
.tdh .tdh-field-name { display: block; margin: 0 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.tdh .tdh-field-name .tdh-lab { margin-bottom: 6px; }
.tdh .tdh-task-custom .tdh-fields { border-top: 0; padding-top: 12px; }
.tdh .tdh-inp-name { height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; font-weight: 500; transition: border-color .2s ease, box-shadow .2s ease; }
.tdh .tdh-inp-name::placeholder { color: #7A849B; }
.tdh .tdh-inp-name:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 91, 255, .16); }
.tdh .tdh-sel { width: 144px; height: 44px; margin: 0; padding: 0 34px 0 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); font-size: 1rem; font-weight: 650; cursor: pointer; -webkit-appearance: none; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A3956' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 16px; }
.tdh .tdh-sel:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 91, 255, .16); }
.tdh .tdh-remove { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 0 0 0 auto; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #B42318; font-size: .86rem; font-weight: 600; cursor: pointer; }
.tdh .tdh-remove .tdh-ic { width: 16px; height: 16px; }
.tdh .tdh-remove:hover { background: #FEF3F2; }
.tdh .tdh-add { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 14px; width: 100%; min-height: 66px; margin: 0; padding: 12px 16px; border: 1.5px dashed #B6C0D6; border-radius: var(--radius); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.tdh .tdh-add .tdh-tic { background: rgba(31, 91, 255, .08); color: var(--blue-dark); }
.tdh .tdh-add:hover { border-color: var(--blue); background: rgba(31, 91, 255, .03); }

@container tdhl (min-width: 520px) {
	.tdh .tdh-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
	.tdh .tdh-task-custom .tdh-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tdh .tdh-fields .tdh-field { display: block; }
	.tdh .tdh-fields .tdh-lab { margin-bottom: 6px; }
	.tdh .tdh-fields .tdh-step, .tdh .tdh-fields .tdh-sel { width: 100%; }
}
@container tdhl (min-width: 680px) {
	.tdh .tdh-task-custom .tdh-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Giả định ---------- */
.tdh .tdh-acard { display: grid; gap: 22px; padding: 20px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); }
.tdh .tdh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tdh .tdh-chip { min-height: 42px; margin: 0; padding: 0 15px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.tdh .tdh-chip:hover { border-color: #97A3BD; }
.tdh .tdh-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tdh .tdh-costin { margin-top: 14px; }
.tdh .tdh-costin .tdh-lab { margin-bottom: 6px; }
.tdh .tdh-costbox { display: flex; align-items: center; max-width: 280px; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
.tdh .tdh-costbox:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 91, 255, .16); }
.tdh .tdh-inp-cost { flex: 1 1 auto; height: 100%; padding: 0 14px; text-align: left; }
.tdh .tdh-unit { flex: none; padding: 0 14px; border-left: 1px solid var(--line); color: var(--muted); font-size: .9rem; line-height: 42px; }
.tdh .tdh-field-weeks { display: block; }
.tdh .tdh-field-weeks .tdh-lab { margin-bottom: 8px; }
.tdh .tdh-field-weeks .tdh-step { width: 168px; }

/* ---------- Bảng kết quả (nền tối) ---------- */
.tdh .tdh-panel { isolation: isolate; color: #fff; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .08); background: radial-gradient(120% 55% at 100% 0%, rgba(123, 92, 255, .38), transparent 62%), radial-gradient(90% 45% at 0% 100%, rgba(0, 194, 178, .2), transparent 65%), var(--ink); box-shadow: 0 34px 60px -34px rgba(11, 21, 48, .75); }
.tdh .tdh-pin { padding: 26px 24px 22px; }
.tdh .tdh-panel :focus-visible { outline-color: #A9C1FF; }
.tdh .tdh-pk { margin: 0 0 10px; font-size: .78rem; font-weight: 650; font-stretch: 100%; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .74); }
.tdh .tdh-money { margin: 0; font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.45rem); font-weight: 760; font-stretch: 115%; line-height: 1.06; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: #fff; background: linear-gradient(120deg, #A8C0FF 0%, #CBBEFF 48%, #7CF3E6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tdh .tdh-mshort { margin: 8px 0 0; font-size: 1.02rem; font-weight: 650; color: #7FF2E5; font-variant-numeric: tabular-nums; }
.tdh .tdh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.tdh .tdh-stat { min-width: 0; padding: 14px 14px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.tdh .tdh-sv { display: block; font-size: 1.65rem; font-weight: 760; font-stretch: 110%; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tdh .tdh-sl { display: flex; align-items: flex-start; gap: 6px; margin-top: 5px; font-size: .8rem; line-height: 1.3; color: rgba(255, 255, 255, .74); }
.tdh .tdh-sl .tdh-ic { width: 14px; height: 14px; margin-top: 1px; }
.tdh .tdh-fte { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: linear-gradient(120deg, rgba(31, 91, 255, .3), rgba(123, 92, 255, .22) 55%, rgba(0, 194, 178, .18)); }
.tdh .tdh-fte-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .13); }
.tdh .tdh-fte-ic .tdh-ic { width: 18px; height: 18px; }
.tdh .tdh-fte-tx { min-width: 0; }
.tdh .tdh-ftev { display: block; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.tdh .tdh-fte-note { display: block; font-size: .8rem; color: rgba(255, 255, 255, .74); }
.tdh .tdh-assume { margin: 12px 0 0; font-size: .8rem; color: rgba(255, 255, 255, .66); }
.tdh .tdh-chart-h { margin: 22px 0 12px; font-size: .78rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .74); }
.tdh .tdh-chart { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tdh .tdh-crow { margin: 0; padding: 0; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.tdh .tdh-ctop { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: .86rem; line-height: 1.3; }
.tdh .tdh-clab { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, .92); }
.tdh .tdh-cval { flex: none; font-size: .8rem; color: rgba(255, 255, 255, .74); font-variant-numeric: tabular-nums; }
.tdh .tdh-ctrack { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tdh .tdh-cfill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .65s cubic-bezier(.2, .8, .2, 1); }
.tdh .tdh-crow:first-child .tdh-cfill { box-shadow: 0 0 14px rgba(123, 92, 255, .55); }
.tdh .tdh-empty { margin: 22px 0 0; padding: 16px; border: 1px dashed rgba(255, 255, 255, .22); border-radius: 12px; color: rgba(255, 255, 255, .82); font-size: .92rem; }
.tdh .tdh-panel.is-empty .tdh-money, .tdh .tdh-panel.is-empty .tdh-stats, .tdh .tdh-panel.is-empty .tdh-fte { opacity: .45; }

.tdh .tdh-acts { display: grid; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.tdh .tdh-acts2 { display: flex; gap: 10px; }
.tdh .btn.tdh-cta, .tdh .btn.tdh-cta2 { gap: 10px; border: 0; color: #fff; font-weight: 700; background: linear-gradient(120deg, var(--blue) 0%, #5A47F5 100%); box-shadow: 0 14px 28px -16px rgba(90, 71, 245, .95); transition: filter .2s ease, transform .2s ease, box-shadow .2s ease; }
.tdh .btn.tdh-cta { width: 100%; min-height: 52px; font-size: 1.02rem; }
.tdh .btn.tdh-cta:hover, .tdh .btn.tdh-cta2:hover { color: #fff; background: linear-gradient(120deg, var(--blue-dark) 0%, #4B37E6 100%); transform: translateY(-1px); }
.tdh .btn.tdh-cta .tdh-ic, .tdh .btn.tdh-cta2 .tdh-ic { width: 18px; height: 18px; order: 2; transition: transform .2s ease; }
.tdh .btn.tdh-cta:hover .tdh-ic, .tdh .btn.tdh-cta2:hover .tdh-ic { transform: translateX(3px); }
.tdh .btn.tdh-ghost { flex: 1 1 auto; gap: 7px; min-height: 44px; margin: 0; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font-size: .9rem; font-weight: 650; white-space: nowrap; }
.tdh .btn.tdh-ghost .tdh-ic { width: 16px; height: 16px; }
.tdh .btn.tdh-ghost:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .55); color: #fff; }
.tdh .btn.tdh-ghost.is-done { border-color: #7FF2E5; color: #7FF2E5; }
.tdh .tdh-reset { justify-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 0; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, .78); font-size: .86rem; font-weight: 600; cursor: pointer; }
.tdh .tdh-reset .tdh-ic { width: 15px; height: 15px; }
.tdh .tdh-reset:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.tdh .tdh-status { margin: 6px 0 0; font-size: .86rem; color: #7FF2E5; text-align: center; }
.tdh .tdh-status:empty { display: none; }
.tdh .tdh-sharebox { display: block; width: 100%; height: 40px; margin: 8px 0 0; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font-size: .8rem; }
.tdh .tdh-money.is-long { font-size: clamp(1.5rem, 1rem + 1.6vw, 1.85rem); }
.tdh .tdh-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Gợi ý ---------- */
.tdh .tdh-sgs { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tdh .tdh-sg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; margin: 0; padding: 18px 18px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 30px -26px rgba(11, 21, 48, .45); }
.tdh .tdh-sg-rank { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #EDF1FF; color: var(--blue-dark); font-size: 1.05rem; font-weight: 760; font-stretch: 115%; }
.tdh .tdh-sg:first-child .tdh-sg-rank { background: linear-gradient(135deg, var(--blue), #5A47F5); color: #fff; }
.tdh .tdh-sg-body { min-width: 0; }
.tdh .tdh-sg-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.tdh .tdh-sg-name { margin: 0; font-size: 1rem; font-weight: 700; font-stretch: 100%; line-height: 1.35; color: var(--ink); letter-spacing: 0; }
.tdh .tdh-sg-save { font-size: .86rem; font-weight: 650; color: var(--teal-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tdh .tdh-sg-tool { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 4px; font-size: .95rem; font-weight: 650; line-height: 1.4; color: var(--blue-dark); }
.tdh .tdh-sg-tool .tdh-ic { width: 17px; height: 17px; margin-top: 2px; }
.tdh .tdh-sg-how { margin: 0 0 12px; font-size: .92rem; line-height: 1.55; color: var(--muted); }
.tdh .tdh-tag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 650; line-height: 1.4; }
.tdh .tdh-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tdh .tdh-tag-fast { background: #E2F6F3; color: var(--teal-ink); }
.tdh .tdh-tag-mid { background: #E8EEFF; color: var(--blue-dark); }
.tdh .tdh-tag-big { background: #EFEAFF; color: #5232CF; }
.tdh .tdh-sg-empty { margin: 0; padding: 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: .95rem; }
.tdh .tdh-note { display: flex; gap: 8px; margin: 16px 0 0; font-size: .85rem; line-height: 1.5; color: var(--muted); }
.tdh .tdh-note .tdh-ic { width: 16px; height: 16px; margin-top: 2px; }
.tdh .tdh-sg-foot { margin-top: 16px; }
.tdh .btn.tdh-cta2 { min-height: 44px; }

/* ---------- Thanh tóm tắt dưới màn hình (di động) ---------- */
.tdh .tdh-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px)); transform: translateY(130%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; pointer-events: none; }
.tdh .tdh-bar.is-show { transform: none; visibility: visible; transition: transform .3s ease; }
.tdh .tdh-bar-in { position: relative; max-width: 560px; margin: 0 auto; padding: 10px 10px 10px 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(11, 21, 48, .97); color: #fff; box-shadow: 0 18px 40px -12px rgba(11, 21, 48, .6); overflow: hidden; pointer-events: auto; }
.tdh .tdh-bar-in::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); }
.tdh .tdh-bar-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tdh .tdh-bar-tx { min-width: 0; line-height: 1.25; }
.tdh .tdh-bar-k { display: block; font-size: .72rem; color: rgba(255, 255, 255, .74); letter-spacing: .02em; }
.tdh .tdh-bar-v { font-size: 1.2rem; font-weight: 760; font-stretch: 110%; color: #fff; background: linear-gradient(120deg, #A8C0FF, #CBBEFF 48%, #7CF3E6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-variant-numeric: tabular-nums; }
.tdh .tdh-bar-s { margin-left: 8px; font-size: .85rem; color: rgba(255, 255, 255, .82); white-space: nowrap; }
.tdh .tdh-bar-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 0; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font-size: .85rem; font-weight: 650; cursor: pointer; }
.tdh .tdh-bar-btn .tdh-ic { width: 16px; height: 16px; transition: transform .2s ease; }
.tdh .tdh-bar.is-open .tdh-bar-btn .tdh-ic { transform: rotate(180deg); }
.tdh .tdh-bar-d { margin: 0 0 10px; padding: 4px 6px 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.tdh .tdh-bar-stats { display: grid; gap: 3px; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tdh .tdh-bar-stats span { display: block; }
.tdh .tdh-bar-stats span:first-child { font-weight: 700; }
.tdh .tdh-bar-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin: 12px 0 0; padding: 0 14px; border: 0; border-radius: 10px; background: linear-gradient(120deg, var(--blue), #5A47F5); color: #fff; font-size: .92rem; font-weight: 650; cursor: pointer; }
.tdh .tdh-bar-go .tdh-ic { width: 16px; height: 16px; order: 2; }
.tdh .tdh-bar :focus-visible { outline-color: #A9C1FF; }
@media (min-width: 1000px) { .tdh .tdh-bar { display: none; } }

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 420px) {
	.tdh .tdh-toggle, .tdh .tdh-add { grid-template-columns: 40px minmax(0, 1fr) 24px; gap: 12px; padding: 12px 14px; }
	.tdh .tdh-add { grid-template-columns: 40px minmax(0, 1fr); }
	.tdh .tdh-tic { width: 40px; height: 40px; border-radius: 11px; }
	.tdh .tdh-check { width: 24px; height: 24px; }
	.tdh .tdh-fields, .tdh .tdh-field-name { margin-left: 14px; margin-right: 14px; }
	.tdh .tdh-tfoot { margin-left: 14px; margin-right: 14px; }
	.tdh .tdh-step, .tdh .tdh-sel { width: 132px; }
	.tdh .tdh-sbtn { width: 40px; }
	.tdh .tdh-acard { padding: 16px; }
	.tdh .tdh-pin { padding: 22px 18px 18px; }
	.tdh .tdh-sv { font-size: 1.4rem; }
	.tdh .tdh-sg { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px; }
	.tdh .tdh-sg-rank { width: 34px; height: 34px; border-radius: 10px; font-size: .95rem; }
	.tdh .tdh-acts2 { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
	.tdh *, .tdh *::before, .tdh *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
}
