/* KHỐI «TRỢ LÝ AI» (03/11) — kiểu Gemini: nút viên thuốc trắng + logo 4 cánh Sukids, viền 4 màu chạy khi rê; khung trượt phải cao hết màn,
   điện thoại phủ kín màn. Cùng bộ mặt với web mới (src/man/khung/tro-ly-ai.tsx + src/index.css). */
@property --tl-goc { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.tl-nut { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 55; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px 0 12px; border: 0; border-radius: 999px; background: #fff; color: #1f1f1f; font: 600 15px/1 inherit; cursor: pointer; box-shadow: 0 1px 3px rgb(0 0 0 / .12), 0 4px 14px rgb(0 0 0 / .08); transition: box-shadow .2s, transform .2s; }
.tl-nut[hidden] { display: none; }
.tl-nut { touch-action: none; user-select: none; -webkit-user-select: none; }
.tl-nut img { pointer-events: none; -webkit-user-drag: none; }
.tl-nut.tl-keo, .tl-nut.tl-keo:hover { cursor: grabbing; transform: scale(1.04); transition: none; }
body:has(.vhn-diem, .xoa-thanh-w:not([hidden])) .tl-nut { bottom: calc(130px + env(safe-area-inset-bottom)); }   /* lúc chưa kéo: đứng trên bảng «việc xong hôm nay» hoặc thanh xoá hàng loạt */
.tl-nut img { width: 28px; height: 28px; border-radius: 50%; }
.tl-nut::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--tl-goc), #4fb3d1, #8fb83a, #f2c230, #ff7a5c, #4fb3d1); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .2s; pointer-events: none; }
.tl-nut:hover, .tl-nut:focus-visible { transform: translateY(-1px); box-shadow: 0 2px 6px rgb(0 0 0 / .14), 0 8px 24px rgb(0 0 0 / .1); outline: none; }
.tl-nut:hover::before, .tl-nut:focus-visible::before { opacity: 1; }

.tl-khung { position: fixed; top: 0; right: 0; bottom: 0; z-index: 58; width: 420px; max-width: 100%; display: grid; grid-template-rows: auto 1fr auto; background: #fff; color: #1f1f1f; border-left: 1px solid #e3e3e3; box-shadow: -8px 0 30px rgb(0 0 0 / .08); font-size: 15px; line-height: 1.5; }
.tl-khung[hidden] { display: none; }
.tl-dau { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.tl-dau img { width: 28px; height: 28px; border-radius: 50%; }
.tl-dau b { flex: 1; font-size: 16px; }
.tl-ic { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: #5f6368; font-size: 20px; cursor: pointer; }
.tl-ic:hover, .tl-ic:focus-visible { background: #f0f4f9; }
.tl-ds { min-height: 0; overflow-y: auto; padding: 4px 20px 16px; display: grid; align-content: start; gap: 18px; }
.tl-chao { padding-top: 22px; }
.tl-chao h2 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 600; background: linear-gradient(90deg, #4fb3d1, #8fb83a 35%, #f2c230 65%, #ff7a5c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-chao p { margin: 4px 0 0; font-size: 21px; font-weight: 500; color: #5f6368; }
.tl-goi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tl-goi button { min-height: 72px; text-align: left; border: 0; border-radius: 14px; background: #f0f4f9; color: inherit; padding: 12px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.tl-goi button:hover, .tl-goi button:focus-visible { background: #e6ecf3; }
.tl-luot { display: grid; gap: 12px; }
.tl-hoi { justify-self: end; max-width: 85%; margin: 0; background: #f0f4f9; padding: 10px 16px; border-radius: 20px 20px 4px 20px; overflow-wrap: anywhere; }
.tl-tra { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.tl-tra > img { width: 28px; height: 28px; border-radius: 50%; }
.tl-nd { display: grid; gap: 8px; min-width: 0; }
.tl-nd p { margin: 0; }
.tl-nd > i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #f0f4f9 0%, #dfe9f5 50%, #f0f4f9 100%); background-size: 200% 100%; }
.tl-nd > i:nth-child(2) { width: 75%; }
.tl-hieu { font-size: 12.5px; color: #5f6368; }
.tl-loi { color: #b3261e; }
.tl-chip { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-chip button { border: 1px solid #e3e3e3; background: #fff; color: inherit; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.tl-chip button:hover { background: #f0f4f9; }
.tl-nhom { display: grid; gap: 6px; }
.tl-nhom > b { font-size: 14px; }
.tl-dong { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; border: 1px solid #e3e3e3; border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.tl-bo { min-width: 0; border: 0; background: none; padding: 0; color: inherit; font: inherit; font-weight: 500; text-align: left; overflow-wrap: anywhere; }
button.tl-bo { text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.tl-nhan { max-width: 100%; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #fdf0d0; color: #6b4500; }
.tl-canh { border-radius: 12px; background: #fdf0d0; color: #6b4500; padding: 8px 12px; font-size: 13px; }
.tl-nhap { display: grid; gap: 8px; }
.tl-ban { display: grid; gap: 4px; border: 1px solid #e3e3e3; border-radius: 14px; padding: 10px 12px; background: #fff; font-size: 14px; }
.tl-ban > b { font-size: 12px; color: #5f6368; font-weight: 600; }
.tl-ban > span { white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-chep { justify-self: start; border: 1px solid #e3e3e3; background: #fff; color: inherit; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.tl-chep:hover { background: #f0f4f9; }
.tl-chan { padding: 10px 14px calc(16px + env(safe-area-inset-bottom)); }
.tl-o { display: flex; align-items: center; gap: 6px; background: #f0f4f9; border: 1px solid transparent; border-radius: 28px; padding: 6px 6px 6px 18px; }
.tl-o:focus-within { background: #fff; border-color: #4fb3d1; }
.tl-o input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; font: inherit; color: inherit; outline: none; }
.tl-gui { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #1f1f1f; color: #fff; font-size: 18px; cursor: pointer; }
.tl-nho { margin: 8px 0 0; text-align: center; font-size: 11.5px; color: #5f6368; }
.tl-an { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes tl-quay { to { --tl-goc: 360deg; } }
@keyframes tl-song { to { background-position: -200% 0; } }
@keyframes tl-nhip { 50% { transform: rotate(90deg) scale(.88); } }
@media (prefers-reduced-motion: no-preference) {
  .tl-nut:hover::before, .tl-nut:focus-visible::before { animation: tl-quay 3s linear infinite; }
  .tl-nd > i { animation: tl-song 1.2s linear infinite; }
  .tl-nghi { animation: tl-nhip 1.4s ease-in-out infinite; }
}
@media (max-width: 767px) {
  .tl-khung { width: 100%; border-left: 0; }
  .tl-nut { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); height: 44px; font-size: 14px; }
}
