/* Nhà mẫu - giao diện app Aqara Home trên điện thoại (theo ảnh mẫu app thật: nền xanh chuyển màu, ô thiết bị 4 cột, thanh menu nổi). */
:root {
  --text: #1d1f24; --sub: #7a7f8a; --tile: #fbfbfd; --tile-off: rgba(52, 57, 70, .88); --line: #eceef2;
  --accent: #5d5fd8; --accent-soft: #eceafd; --warn: #e5484d; --ok: #30a46c;
  --radius: 16px; --gap: 11px; --safe-b: env(safe-area-max-inset-bottom, env(safe-area-inset-bottom, 0px)); /* Chrome Android 135+: dùng mức tối đa (không phải safe-area-inset-bottom động) - padding theo inset động thì Chrome giữ "chin" (dải màu riêng của Chrome) che thanh điều hướng thay vì cho trang vẽ tràn xuống */ --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; color: var(--text); font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; }
html { background: #4f6a7d; }
body { background: transparent; position: relative; z-index: 0; }
/* nền cố định (iOS không hỗ trợ background-attachment: fixed) */
body::before { content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, #8fbfce 0%, #77abbf 30%, #6a9ab0 44%, #546f84 54%, #3f4b5b 68%, #343b47 100%); }
/* dải dưới cùng (vùng thanh điều hướng Android / vạch home iPhone - safe-area): phủ màu đáy nền trang (--bgB, aqara.js sheetTheme) - không thì thẻ cuộn ngang qua lộ ra thành 1 dải dưới thanh tab */
body::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: var(--safe-b); background: var(--bgB, #343b47); z-index: 15; pointer-events: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding: calc(var(--safe-t) + 14px) 16px calc(104px + var(--safe-b)); overflow-x: hidden; }

/* đầu trang */
.top { display: flex; align-items: center; justify-content: space-between; color: #fff; padding: 4px 4px 0; }
.top h1 { margin: 0; font-size: 21px; font-weight: 500; display: flex; align-items: center; gap: 8px; letter-spacing: .2px; }
.top h1 svg { width: 14px; height: 14px; }
.top .acts { display: flex; gap: 22px; }
.top .acts svg { width: 26px; height: 26px; }

/* phòng (tab chữ lớn) */
.rooms { position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: 18px 16px 6px; display: flex; align-items: center; gap: 8px; }
.rooms.stuck { background: rgba(120, 168, 188, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.rooms .scroll { flex: 1; display: flex; align-items: baseline; gap: 28px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.rooms .scroll::-webkit-scrollbar { display: none; }
.room-tab { flex: none; font-size: 18px; color: rgba(255, 255, 255, .62); white-space: nowrap; transition: font-size .15s; }
.room-tab.on { font-size: 22px; font-weight: 600; color: #fff; }
.rooms .menu { flex: none; color: rgba(255, 255, 255, .8); }
.rooms .menu svg { width: 22px; height: 22px; }

.group-h { color: rgba(255, 255, 255, .9); font-size: 14px; margin: 18px 2px 10px; }
.group-h:first-child { margin-top: 12px; }

/* cảnh */
.scenes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.scene { background: var(--tile); border-radius: var(--radius); height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 14px; text-align: left; font-size: 15px; font-weight: 500; transition: transform .1s; }
.grid > .scene { grid-column: span 2; align-self: start; } .grid > .tall2 { grid-row: span 2; } .grid > .scene.fill { align-self: stretch; height: auto; min-height: 52px; } /* cảnh trong lưới card: rộng 1/2 hàng; thời tiết cạnh cảnh cao 2 dòng */
.scene svg, .scene img { width: 30px; height: 30px; flex: none; }
.scene.run { box-shadow: 0 0 0 2px var(--accent) inset; }

/* thiết bị: 4 cột, ô nhỏ 1 cột / ô rộng 2 cột / camera 4 cột */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row dense; gap: var(--gap); }
.tile { position: relative; background: var(--tile); border-radius: var(--radius); aspect-ratio: .74; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; transition: background .2s, transform .1s; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tile .ic { width: 62%; aspect-ratio: 1; display: grid; place-items: center; margin-top: 6px; }
.tile .ic svg, .tile .ic img { width: 100%; height: 100%; object-fit: contain; }
.tile .nm { font-size: 14px; font-weight: 500; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile.off { background: var(--tile-off); color: #fff; }
.tile.off .ic { filter: grayscale(1) brightness(1.5); opacity: .75; }
.tile.wide { grid-column: span 2; aspect-ratio: auto; align-items: stretch; text-align: left; padding: 14px 16px 12px; }
.tile.wide .row1 { display: flex; justify-content: space-between; align-items: flex-start; }
.tile.wide .ic { width: 46px; margin: 0; }
.tile.wide .val { font-size: 15px; font-weight: 600; color: var(--accent); }
.tile.wide .val.alert { color: var(--warn); }
.tile.wide .nm { font-size: 15px; margin-top: 8px; -webkit-line-clamp: 1; }
.tile.wide .meta { font-size: 12px; color: var(--sub); margin-top: 2px; }
.tile.wide.off .meta { color: rgba(255, 255, 255, .6); }

/* camera */
.cam { grid-column: 1 / -1; border-radius: var(--radius); overflow: hidden; background: #2f3350; }
.cam .view { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(120% 90% at 60% 40%, #6c6f78 0%, #3b3e46 55%, #1f2126 100%); display: grid; place-items: center; }
.cam .view img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cam .view .ph { width: 54px; height: 54px; color: rgba(255, 255, 255, .25); }
.cam .ts { position: absolute; top: 8px; left: 10px; color: #fff; font: 600 11px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .5px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cam .ago { position: absolute; bottom: 10px; left: 14px; color: #fff; font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cam .bar { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 14px; color: #fff; background: #3a3e62; }
.cam .bar .t { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.cam .bar svg { width: 20px; height: 20px; }
.cam .bar .play svg { width: 24px; height: 24px; }
.empty { text-align: center; color: rgba(255,255,255,.85); padding: 48px 0; }

/* các tab khác Nhà: nền sáng xanh nhạt, chữ tối */
body.light::before { background: linear-gradient(180deg, #d3e3f8 0%, #e6edf8 22%, #eff1f6 45%, #f1f2f6 100%); }
html:has(body.light) { background: #f1f2f6; }
.top.light { color: var(--text); padding-top: 10px; }
.top.light h1 { font-size: 20px; font-weight: 600; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; margin: 22px 0 6px; padding: 0 16px; border-radius: 14px; background: rgba(214, 218, 226, .6); color: var(--sub); }
.search svg { width: 22px; height: 22px; flex: none; color: #222; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); }
.search input::placeholder { color: #9a9fa9; }
body.light .list-h { color: #8a8f99; font-size: 14px; margin: 22px 2px 10px; }
.list.acc .li { padding: 0 18px 0 18px; height: 78px; gap: 16px; border-bottom: 0; position: relative; }
.list.acc .li::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 1px; background: var(--line); }
.list.acc .li:last-child::after { display: none; }
.list.acc .lic { width: 40px; height: 40px; }
.list.acc .t { font-size: 16px; font-weight: 400; }
.list.acc .chev { color: #a9adb6; }
.list.acc .chev svg { width: 18px; height: 18px; }
.empty.dark { color: var(--sub); }
.top .ttl { color: inherit; }
.top .arr { display: inline-flex; transition: transform .15s; }
.top .arr.up { transform: rotate(180deg); }

/* bảng lọc (bấm tiêu đề Thiết bị) */
.fbg { position: fixed; inset: 0; background: rgba(60, 64, 72, .45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 25; }
.fbg.open { opacity: 1; pointer-events: auto; }
.fpop { position: fixed; left: 50%; top: calc(var(--safe-t) + 70px); width: calc(100% - 32px); max-width: 528px; max-height: calc(100vh - 200px); overflow-y: auto;
  transform: translate(-50%, -12px); opacity: 0; pointer-events: none; transition: all .2s; z-index: 26; background: #fff; border-radius: 22px; padding: 18px 20px 20px; }
.fpop.open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.fsec { color: var(--sub); font-size: 14px; margin: 4px 2px 10px; }
.fsec:not(:first-child) { margin-top: 18px; }
.fchips { display: flex; flex-wrap: wrap; gap: 10px; }
.fchips button { padding: 8px 16px; border-radius: 999px; background: #f1f2f6; font-size: 15px; color: #2b2e36; }
.fchips button.on { background: #4f5ff0; color: #fff; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.fbtn { height: 48px; border-radius: 14px; background: #e4e6ef; font-size: 16px; font-weight: 600; color: #2b2e36; padding: 0 12px; }
.fbtn.pri { background: #4f5ff0; color: #fff; }
.fbtn.danger { color: var(--warn); background: #fbe9ea; }
.fbtn.wide { display: block; width: 100%; margin-top: 10px; }

/* chế độ sửa */
.inp { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--text); background: #fafbfc; outline: 0; }
.inp:focus { border-color: #4f5ff0; background: #fff; }
.ctl .fchips { gap: 8px; }
.ctl .fchips button { padding: 7px 13px; font-size: 14px; }
.pres { margin-top: 8px; max-height: 280px; overflow-y: auto; border-radius: 12px; border: 1px solid var(--line); }
.pres .li { padding: 8px 10px; gap: 10px; }
.pres .lic { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; }
.pres .t { font-size: 14px; }
.mini { flex: none; padding: 6px 10px; border-radius: 10px; background: #f1f2f6; font-size: 13px; font-weight: 600; }
.mini.danger { color: var(--warn); }
a.li { color: inherit; text-decoration: none; }
body.light .page-h { color: var(--text); }

/* danh sách (Thiết bị / Tự động) */
.page-h { color: #fff; font-size: 26px; font-weight: 600; margin: 12px 4px 14px; }
.list { background: var(--tile); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.list-h { color: rgba(255,255,255,.9); font-size: 14px; margin: 14px 4px 8px; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.li:last-child { border-bottom: 0; }
.li .lic { width: 36px; height: 36px; flex: none; }
.li .lic svg, .li .lic img { width: 100%; height: 100%; object-fit: contain; }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 500; font-size: 15px; }
.li .d { color: var(--sub); font-size: 12px; margin-top: 2px; }
.sw { width: 48px; height: 29px; border-radius: 999px; background: #d9dce2; position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.sw.on { background: var(--accent); }
.sw.on::after { transform: translateX(19px); }

/* thanh menu nổi */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); width: calc(100% - 28px); max-width: 532px; height: 70px; display: flex; align-items: center; justify-content: space-around;
  padding: 0 6px; border-radius: 36px; background: rgba(236, 238, 243, .86); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); box-shadow: 0 6px 24px rgba(0,0,0,.18); z-index: 20; }
.tabbar button { flex: 1; height: 58px; border-radius: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: #23262e; position: relative; }
.tabbar button svg { width: 26px; height: 26px; }
.tabbar button.on { background: rgba(255, 255, 255, .75); color: var(--accent); }
.tabbar .dot { position: absolute; top: 8px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--warn); display: none; }
body.editing .tabbar .dot.ed, body.msg-unread .tabbar .dot.mu { display: block; } /* chấm đỏ: tab Khám phá = đang ở chế độ chỉnh sửa, tab Tôi = còn tin nhắn chưa đọc */

/* bảng điều khiển (sheet) */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 90vh; overflow-y: auto; background: #f2f3f7; border-radius: 24px 24px 0 0;
  padding: 10px 16px calc(22px + var(--safe-b)); transform: translateY(calc(100% + 60px)); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; z-index: 31; }
.sheet.open { transform: none; visibility: visible; transition: transform .25s ease; } /* đóng: trượt xuống rồi ẩn hẳn - Safari iOS (thanh công cụ nổi) cuộn gần cuối trang thì mép trên tấm đang đóng (trống, chỉ cao vài chục px) lộ ra thành 1 dải trắng ở đáy */
.grab { width: 38px; height: 5px; border-radius: 3px; background: #cfd2da; margin: 0 auto 12px; }
.sh-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sh-head .lic { width: 44px; height: 44px; }
.sh-head .lic svg, .sh-head .lic img { width: 100%; height: 100%; object-fit: contain; }
.sh-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.sh-head .d { color: var(--sub); font-size: 13px; }
.big { display: grid; place-items: center; margin: 6px 0 20px; }
.big-btn { width: 132px; height: 132px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--sub); box-shadow: 0 2px 10px rgba(0,0,0,.06); transition: all .15s; }
.big-btn svg { width: 56px; height: 56px; }
.big-btn.on { background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(93,95,216,.35); }
.big-val { font-size: 44px; font-weight: 300; text-align: center; margin: 0 0 18px; }
.big-val small { font-size: 15px; color: var(--sub); }
.ctl { background: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.ctl label { display: flex; justify-content: space-between; font-size: 13px; color: var(--sub); margin-bottom: 10px; }
.ctl input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
.ctl input.hue { -webkit-appearance: none; appearance: none; height: 14px; border-radius: 7px; background: linear-gradient(90deg, red, #ff0, lime, cyan, blue, #f0f, red); }
.ctl input.ct { -webkit-appearance: none; appearance: none; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #ffb057, #fff3e0, #cfe3ff); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg button { background: #f0f1f5; border-radius: 12px; padding: 10px 4px; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.seg button svg { width: 20px; height: 20px; }
.seg button.on { background: var(--accent); color: #fff; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.log li:last-child { border-bottom: 0; }
.log li span:last-child { color: var(--sub); font-size: 12px; }
.curtain { height: 120px; border-radius: 14px; background: linear-gradient(#cfe8ff, #eaf5ff); position: relative; overflow: hidden; margin-bottom: 14px; }
.curtain i { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, #d6c7b0 0 10px, #c9b89e 10px 20px); transition: width .4s; }
.curtain i.l { left: 0; } .curtain i.r { right: 0; }
.sheet .cam { margin-bottom: 12px; }

/* kéo xuống để tải lại: tắt nảy cuộn mặc định (iOS) - tự vẽ vòng tải */
html, body { overscroll-behavior-y: none; }
.ptr { position: fixed; top: calc(var(--safe-t) + 10px); left: 50%; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #4f5ff0; box-shadow: 0 3px 12px rgba(0,0,0,.18);
  display: grid; place-items: center; transform: translate(-50%, -48px); opacity: 0; z-index: 15; pointer-events: none; }
.ptr svg { width: 20px; height: 20px; transition: transform .2s; }
.ptr.ready svg { transform: rotate(180deg); }
.ptr i { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #d9dcf8; border-top-color: #4f5ff0; animation: ptrspin .7s linear infinite; }
.ptr.busy svg { display: none; }
.ptr.busy i { display: block; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%) translateY(16px); background: rgba(20,22,28,.9); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 40; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%); }
/* popup hướng dẫn iPhone mở bằng mã QR: Thêm vào MH chính để xem toàn màn hình (aqara.js fullscreenFromQr) */
.me-card { background: var(--tile); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
.me-card h2 { margin: 0 0 4px; font-size: 18px; }
.me-card p { margin: 0; color: var(--sub); font-size: 13px; }
.btn { display: block; width: 100%; padding: 14px; border-radius: var(--radius); background: var(--tile); font-weight: 600; }
.btn.danger { color: var(--warn); }

/* trang Thêm thiết bị (bộ icon theo nhóm) */
.search.cat-q { margin: 4px 0 12px; background: #fff; }
.cat { display: flex; gap: 10px; height: min(60vh, 520px); margin-bottom: 12px; }
.cat-side { width: 98px; flex: none; overflow-y: auto; }
.cat-side button { display: block; width: 100%; padding: 11px 8px; border-radius: 10px; text-align: left; font-size: 13.5px; color: var(--sub); }
.cat-side button.on { background: #fff; color: var(--text); font-weight: 600; }
.cat-grid { flex: 1; min-width: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; }
.cat-grid button { background: #fff; border-radius: 14px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; line-height: 1.25; text-align: center; color: var(--text); }
.cat-grid button:active { transform: scale(.96); }
.cat-grid img { width: 48px; height: 48px; object-fit: contain; }
.cat-grid span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.sh-head .grow { flex: 1; min-width: 0; }
.sh-head .mini { background: #fff; }
.cat-grid button.on { box-shadow: 0 0 0 2px #4f5ff0 inset; }
.fbtn:disabled { opacity: .45; }

/* card trang Nhà (nút 4 ô vuông): danh sách card + bảng chọn icon card */
.li .cardpick { width: 40px; height: 40px; border-radius: 10px; background: #f1f2f6; padding: 4px; }
.li .cardpick img { width: 100%; height: 100%; object-fit: contain; }
.card-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-height: min(58vh, 520px); overflow-y: auto; margin-bottom: 12px; background: #fff; border-radius: var(--radius); padding: 10px; }
.card-grid button { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; }
.card-grid button.on { box-shadow: 0 0 0 2px #4f5ff0 inset; }
.card-grid img { width: 70%; height: 70%; object-fit: contain; }

/* menu chọn nhà mẫu (bấm tên nhà ở trang Nhà) */
.hpop { position: fixed; top: calc(var(--safe-t) + 58px); left: max(16px, calc(50% - 264px)); min-width: 220px; padding: 6px 0; border-radius: 18px; z-index: 25;
  background: rgba(196, 226, 232, .82); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left; pointer-events: none; transition: opacity .15s, transform .15s; }
.hpop.open { opacity: 1; transform: none; pointer-events: auto; }
.hpop .hi { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; color: #1d1f24; font-size: 16px; text-decoration: none; }
.hpop .hi + .hi { border-top: 1px solid rgba(255,255,255,.35); }
.hpop .hi svg { width: 22px; height: 22px; flex: none; }

/* xem tất cả camera (nút 4 ô vuông ở trang Nhà) */
.camwall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.camwall .cam { margin: 0; }
.camwall .cam .bar { padding: 0 10px; height: 40px; font-size: 13px; }
.camwall .cam .ts { font-size: 9px; }
.camwall .cam .play, .camwall .cam .bar > svg { display: none; }
.cam-room { color: var(--sub); font-size: 12px; margin: 4px 2px 0; }
.ctl .cardicon { padding: 4px 0; border: 0; }
.ctl label .mini { padding: 3px 10px; font-size: 12px; }

/* kéo thả sắp xếp: tay nắm ≡ ở cuối dòng (chế độ sửa) */
.li .drag { flex: none; width: 36px; height: 36px; margin-right: -8px; display: grid; place-items: center; color: #a3a7b1; touch-action: none; cursor: grab; }
.li .drag svg { width: 22px; height: 22px; }
.li.dragging { position: relative; z-index: 2; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.14); border-radius: 12px; opacity: .96; }
.hpop button.hi { width: 100%; text-align: left; }
.hpop .hsep { height: 1px; margin: 4px 16px; background: rgba(0,0,0,.12); }
.hpop .hsep + .hi { border-top: 0; }
.hpop.dpop { top: calc(var(--safe-t) + 112px); left: auto; right: max(16px, calc(50% - 264px)); min-width: 250px; max-height: calc(100vh - 220px); overflow-y: auto; } .hpop.dpop .hi + .hi { border-top: 0; }

/* chế độ sửa card trang Nhà (☰) - như "Edit cards" của app */
.top.edit-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.top.edit-bar button { color: #fff; font-size: 17px; padding: 6px 0; }
.top.edit-bar span { color: rgba(255,255,255,.75); font-size: 13px; text-align: center; }
body.card-editing .tabbar { display: none; }
.cam { position: relative; }
.cx { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 50%; background: #e5484d; z-index: 3; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.cx::before { content: ""; position: absolute; left: 6px; right: 6px; top: 10px; height: 2px; border-radius: 1px; background: #fff; }
.cs { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(40, 44, 56, .85); color: #fff; display: grid; place-items: center; z-index: 3; }
.cs svg { width: 14px; height: 14px; }
.cam .cs { bottom: 10px; }
.jiggle { animation: jiggle .32s ease-in-out infinite alternate; }
.jiggle:nth-child(2n) { animation-delay: -.16s; }
@keyframes jiggle { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
.dragging.jiggle, .tile.dragging, .cam.dragging { animation: none; transform: scale(1.04); box-shadow: 0 10px 28px rgba(0,0,0,.25); z-index: 4; opacity: .95; }
.add-card { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); width: calc(100% - 32px); max-width: 528px; height: 52px; border-radius: 16px;
  background: #4f5ff0; color: #fff; font-size: 17px; font-weight: 600; z-index: 20; box-shadow: 0 6px 20px rgba(79,95,240,.35); }
.cam .cx { top: 8px; left: 8px; }
.cs { right: 4px; bottom: 4px; width: 20px; height: 20px; }
.cs svg { width: 12px; height: 12px; }
.tile.jiggle .nm { padding: 0 14px; }
.scene { position: relative; }
.sheet .list-h { color: #8a8f99; font-size: 13px; margin: 14px 2px 8px; }
.sc-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.sc-grid button { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; }
.sc-grid button.on { box-shadow: 0 0 0 2px #4f5ff0 inset; }
.sc-grid img { width: 60%; height: 60%; }
.li .cardpick .scene-ic { width: 100%; height: 100%; }
/* card camera vừa (nửa hàng) */
.cam.half { grid-column: span 2; }
.cam.half .bar { height: 38px; padding: 0 10px; }
.cam.half .bar .t { font-size: 13px; }
.cam.half .bar .play, .cam.half .bar > svg { display: none; }
.cam.half .ts { font-size: 8px; }
.cam.half .ago { font-size: 11px; bottom: 6px; left: 10px; }

/* card đèn lớn (3 cột x 2 hàng) / dọc (1 cột x 2 hàng): nút nguồn + thanh kéo */
.tile.lcard { aspect-ratio: auto; grid-row: span 2; padding: 12px; align-items: stretch; justify-content: flex-start; gap: 10px; text-align: left; }
.tile.lcard.lbig { grid-column: span 3; }
.lcard .lhead { display: flex; align-items: flex-start; gap: 10px; }
.lcard .lhead .ic { width: 44px; margin: 0; flex: none; }
.lcard .lhead .grow { flex: 1; min-width: 0; }
.lcard .nm { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard .lsub { font-size: 12px; color: var(--sub); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.off .lsub { color: rgba(255,255,255,.6); }
.lcard.ltall { align-items: center; text-align: center; }
.lcard.ltall .nm, .lcard.ltall .lsub { width: 100%; }
.lpow { flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.08); color: #5c6070; display: grid; place-items: center; }
.lpow svg { width: 22px; height: 22px; }
.lpow.on { background: #4f5ff0; color: #fff; }
.tile.off .lpow { background: rgba(0,0,0,.35); color: #fff; }
.lcard.ltall .lpow { margin-top: auto; }
.lsl { cursor: pointer; -webkit-user-select: none; user-select: none; position: relative; height: 38px; border-radius: 12px; background: rgba(120,126,140,.25); overflow: hidden; touch-action: none; margin-top: auto; }
.lsl + .lsl { margin-top: 0; }
.lsl i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 1%); background: #5160d0; border-radius: 12px; }
.lsl b { position: absolute; top: 3px; bottom: 3px; width: 30px; left: calc(var(--p) * 1%); transform: translateX(calc(var(--p) * -1%)); border-radius: 9px; background: #d7d9df; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.lsl.ct { background: linear-gradient(90deg, #c8b35a, #f3f1ea); } .lsl.ct i { display: none; }
.lsl.v { width: 30px; flex: 1; min-height: 80px; margin: 6px auto 0; border-radius: 10px; }
.lsl.v i { top: auto; bottom: 0; right: 0; width: auto; height: calc(var(--p) * 1%); border-radius: 10px; }
.lsl.v b { left: 2px; right: 2px; width: auto; height: 24px; top: auto; bottom: calc(var(--p) * 1%); transform: translateY(calc(var(--p) * 1%)); border-radius: 8px; }
body.card-editing .lcard .lpow, body.card-editing .lcard .lsl { pointer-events: none; }
.tile.lwide .row1 { align-items: flex-start; }
.tile.lwide .lpow { width: 38px; height: 38px; }
.afchips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 16px 10px; } .afchip { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: #1d1f24; } .afchip button { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #e2e5ea; color: #7b808a; } .afchip button svg { width: 12px; height: 12px; } /* nhãn lọc tab Tự động */
.acard .ahead .t .d { font-size: 13px; font-weight: 400; color: #8a8f99; margin-top: 3px; } /* phòng của kịch bản */
.tile.prs { grid-column: 1 / -1; aspect-ratio: auto; flex-direction: row; align-items: center; justify-content: flex-start; gap: 0; padding: 14px 16px; text-align: left; color: #1d1f24; }
.prs-l { flex: none; width: 26%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-right: 12px; border-right: 1px solid #e4e6ea; } .prs-l .ic { width: 54px; margin: 0; } .prs-l .nm { font-size: 15px; font-weight: 500; -webkit-line-clamp: 2; }
.prs-r { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 8px; padding-left: 16px; } .prs-r small { display: block; white-space: nowrap; font-size: 13px; color: #8a8f99; margin-bottom: 10px; } .prs-r b { display: block; font-size: clamp(16px, 4.3vw, 24px); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .prs-r em { font-style: normal; font-size: 13px; margin-left: 3px; } .tile.prs.on .prs-r div:first-child b { color: var(--accent); } /* card lớn cảm biến hiện diện */ .tile.wide .meta, .tile.lwide .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* dòng trạng thái | phòng luôn 1 dòng: đổi trạng thái (vd Đã mở khoá) không làm card cao ra */
body.card-editing .tile .lpow { pointer-events: none; }
/* card lớn rèm / điều hoà */
.lcard.curt .lsl i { background: transparent; } .lcard.curt .lsl b { background: #fff; box-shadow: 0 0 0 2px #4f5ff0 inset, 0 1px 4px rgba(0,0,0,.2); }
.lops { display: flex; justify-content: space-around; gap: 6px; margin-top: auto; }
.lop { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: inherit; opacity: .9; }
.lop svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: rgba(120,126,140,.15); color: #4f5ff0; }
.lop.on svg { background: #4f5ff0; color: #fff; }
.tile.off .lop svg { color: rgba(255,255,255,.55); background: rgba(255,255,255,.08); }
.actemp { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; margin-top: auto; }
.actemp span { font-size: 40px; font-weight: 300; }
.actemp small { font-size: 13px; vertical-align: top; margin-left: 2px; }
.actemp button { font-size: 28px; width: 44px; height: 44px; color: inherit; opacity: .7; }
body.card-editing .lcard .lop, body.card-editing .lcard .actemp button { pointer-events: none; }
/* thiết bị Matter: huy hiệu nhỏ góc dưới phải icon (.lic) + ô chọn trong form */
.lic { position: relative; }
.lic img.mbadge { position: absolute; right: -3px; bottom: -3px; width: 42%; height: 42%; object-fit: contain; }
.chk { display: flex; align-items: center; gap: 10px; margin: 4px 2px 12px; font-size: 15px; cursor: pointer; }
.chk input { width: 20px; height: 20px; accent-color: var(--accent, #4f6bed); flex: none; }
.chk small { color: var(--muted, #8a8f98); font-size: 12px; }
/* tab Tự động: 2 mục Cảnh / Tự động (mục đang chọn đậm + gạch dưới), dòng cảnh có nút ▶, thẻ kịch bản tự động */
.atabs { display: flex; align-items: baseline; gap: 26px; }
.atabs button { position: relative; font-size: 19px; color: #6b707a; padding: 4px 0 10px; display: inline-flex; align-items: center; gap: 6px; }
.atabs button.on { font-size: 19px; font-weight: 500; color: var(--text); } /* như app: tab đang chọn cùng cỡ chữ, chỉ đậm + màu chữ chính */
.atabs button.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 26px; height: 4px; margin-left: -13px; border-radius: 2px; background: #4f5ff0; }
.atabs .arr svg { width: 14px; height: 14px; }
.list.acc .sc-row { height: 84px; }
.list.acc .sc-row .lic { width: 46px; height: 46px; }
.sc-row .lic .scene-ic { width: 100%; height: 100%; }
.sc-row .play { flex: none; width: 52px; height: 36px; border-radius: 18px; background: #eef0f5; color: #4a4e57; display: grid; place-items: center; }
.sc-row .play svg { width: 16px; height: 16px; }
.sc-row .play i { width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid #cfd3e6; border-top-color: #4f5ff0; animation: ptrspin .7s linear infinite; } .sc-row .play.done { color: #4f5ff0; } .sc-row .play.done svg { width: 22px; height: 22px; }
.acard { padding: 18px 18px 16px; position: relative; }
.acard + .acard::before { content: ""; position: absolute; left: 18px; right: 0; top: 0; height: 1px; background: var(--line); }
.acard .ahead { display: flex; align-items: center; gap: 12px; }
.acard .ahead .t { flex: 1; min-width: 0; font-size: 17px; font-weight: 400; }
.acard .arow { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.aic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; }
.aic img, .aic > svg { width: 100%; height: 100%; object-fit: contain; }
.aic { position: relative; } .aic img.mbadge { position: absolute; right: -4px; bottom: -4px; width: 45%; height: 45%; } /* huy hiệu Matter ở góc icon (như danh sách thiết bị) */
.aic.soft { border-radius: 50%; background: #e9ebfb; color: #5b63e6; padding: 7px; } .aic.soft.wx { background: #def5ee; color: #5fcfae; } .aic.soft.sec { background: #fde8e8; color: #e5484d; } .aic.soft.ml { background: #def5ee; color: #4fc9a4; }
.aic .scene-ic { width: 100%; height: 100%; }
.aarr { color: #a3a7b1; font-size: 20px; }
.atag { border: 1px solid #8a8f99; color: #6b707a; border-radius: 999px; font-size: 13px; padding: 1px 8px; }
/* chi tiết điều hoà (như app gốc): vòng nhiệt độ, thẻ Bật / Tắt, Làm lạnh nhanh, Chế độ, Tốc độ gió */
.acd-dial { position: relative; width: min(360px, 84vw); margin: 4px auto 0; touch-action: none; }
.acd-svg { width: 100%; display: block; cursor: pointer; }
.acd-temp { position: absolute; left: 0; right: 0; top: 33%; text-align: center; font-size: 72px; font-weight: 300; color: #3f434c; line-height: 1; letter-spacing: -2px; pointer-events: none; }
.acd-temp small { font-size: 18px; vertical-align: top; margin-left: 2px; letter-spacing: 0; }
.acd-pm { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 64px; }
.acd-pm button { width: 50px; height: 50px; border-radius: 50%; background: #fff; font-size: 28px; color: #2a2d34; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.acd-pm button:disabled { background: #eef0f4; color: #c3c6cd; box-shadow: none; }
.acd-info { display: flex; justify-content: center; align-items: center; gap: 18px; color: #555a64; font-size: 15px; margin: 18px 0 16px; }
.acd-info span { display: inline-flex; align-items: center; gap: 5px; } .acd-info svg { width: 17px; height: 17px; } .acd-info i { width: 1px; height: 12px; background: #c7cad1; }
.acd-card { background: #fff; border-radius: 18px; padding: 18px 18px; margin-bottom: 12px; }
.acd-row { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.acd-row .grow { flex: 1; min-width: 0; }
.acd { overflow: hidden; }
.acd-row b { display: block; font-weight: 500; font-size: 17px; } .acd-row small { display: block; color: #8b8f99; font-size: 13px; margin-top: 3px; line-height: 1.35; }
.acd-pow { width: 46px; height: 46px; border-radius: 50%; background: #e9ebf0; color: #7a7e88; display: grid; place-items: center; flex: none; } .acd-pow.on { background: #4f5ff0; color: #fff; } .acd-pow svg { width: 22px; height: 22px; }
.acd-ic { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #6f7cf2, #8f9cf8); color: #fff; display: grid; place-items: center; flex: none; } .acd-ic svg { width: 24px; height: 24px; }
.acd-h { font-size: 17px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .acd-h i { width: 1px; height: 13px; background: #c7cad1; } .acd-h span { color: #8b8f99; }
.acd-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.acd-opts button { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 13px; color: #555a64; }
.acd-opts button span { width: 50px; height: 50px; border-radius: 50%; background: #e9ebf0; color: #5c606a; display: grid; place-items: center; } .acd-opts button svg { width: 24px; height: 24px; }
.acd-opts button.on { color: #4f5ff0; } .acd-opts button.on span { background: #4f5ff0; color: #fff; }
.acd.off .acd-temp { color: #b6b9c1; } .acd.off .acd-opts button.on span { background: #b9bcf4; } .acd.off .acd-opts button.on { color: #8f97ee; }
/* chi tiết camera (như app gốc, nền tối) */
.sheet.dark { background: #000; color: #fff; } .sheet.dark .sh-head h2 { color: #fff; } .sheet.dark .sh-head .d { color: #9a9ea8; } .sheet.dark .grab { background: #444; }
.sheet.dark .fbtn:not(.danger) { background: #1c1d21; color: #fff; } .sheet.dark .ctl { background: #141518; color: #fff; }
.camd { margin: 0 -16px; } .camd-view { position: relative; } .sheet.page .camd-view { position: sticky; top: calc(var(--pgh, 56px) - 6px); z-index: 2; background: #000; } /* cuộn trang camera: khung video đứng yên dưới thanh tiêu đề */ .camd-view .cam { border-radius: 0; margin: 0; } .camd-view .cam .bar { display: none; }
.camd-view.dim .cam .view { filter: brightness(.25); }
.camd-view .cam .ts { display: none; }
.camd-view.bell { width: 68%; margin: 0 auto; } .camd-view.bell .cam .view { aspect-ratio: 3 / 4; } .camd-view.bell.wide { width: auto; } .camd-view.bell.wide .cam .view { aspect-ratio: 16 / 9; } /* chuông cửa có cảnh 3D (live-3d.js): khung ngang 16:9 như ảnh render */ .camd-view.bell .cam .ts { display: block; } .camd-view.bell .camd-top { top: 28px; left: 12px; gap: 14px; }
.camd-grid.bell { margin-top: 20px; }
.camd-top { position: absolute; top: 10px; right: 12px; left: 30%; display: flex; align-items: center; justify-content: flex-end; gap: 18px; color: #fff; font-size: 14px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.camd-top span { margin-right: auto; } .camd-top svg { width: 20px; height: 20px; }
.camd-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 14px; } .camd-msg svg { width: 30px; height: 30px; }
.camd-rec { position: absolute; left: 12px; bottom: 10px; color: #ff4d4f; font: 600 12px/1 ui-monospace, Menlo, monospace; }
.camd-tools { display: flex; justify-content: space-around; align-items: center; padding: 18px 8px; border-bottom: 1px solid #222; }
.camd-tools button { width: 44px; height: 44px; color: #fff; display: grid; place-items: center; border-radius: 50%; } .camd-tools button svg { width: 28px; height: 28px; }
.camd-tools button.on:not(.rec) { color: #6f7cf5; } .camd-tools .rec { width: 34px; height: 34px; background: #e5484d; font-size: 9px; font-weight: 600; } .camd-tools .rec.on { box-shadow: 0 0 0 4px rgba(229,72,77,.35); }
.camd-panel { padding: 16px 16px 6px; } .camd-ph { display: flex; align-items: center; justify-content: space-between; font-size: 18px; }
.camd-ph button { width: 36px; height: 36px; border-radius: 50%; background: #1c1d21; color: #fff; display: grid; place-items: center; } .camd-ph button svg { width: 18px; height: 18px; transform: rotate(-90deg); } .camd-ph button.down svg { transform: rotate(90deg); }
.camd-ptz { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin: 22px 0; }
.camd-joy { position: relative; width: min(184px, 46vw); aspect-ratio: 1; border-radius: 50%; background: #eceef1; }
.camd-joy i { position: absolute; left: 35%; top: 35%; width: 30%; height: 30%; border-radius: 50%; background: #000; }
.camd-joy button { position: absolute; width: 34%; height: 34%; } .camd-joy button::after { content: ""; position: absolute; left: 50%; top: 50%; border: 8px solid transparent; transform: translate(-50%, -50%); }
.camd-joy .u { left: 33%; top: 0; } .camd-joy .u::after { border-bottom: 11px solid #5e626b; border-top: 0; }
.camd-joy .d { left: 33%; bottom: 0; } .camd-joy .d::after { border-top: 11px solid #5e626b; border-bottom: 0; }
.camd-joy .l { left: 0; top: 33%; } .camd-joy .l::after { border-right: 11px solid #5e626b; border-left: 0; }
.camd-joy .r { right: 0; top: 33%; } .camd-joy .r::after { border-left: 11px solid #5e626b; border-right: 0; }
.camd-fn { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #c9ccd3; font-size: 13px; text-align: center; }
.camd-fn span { width: 52px; height: 52px; border-radius: 50%; background: #2b2c30; color: #fff; display: grid; place-items: center; } .camd-fn span svg { width: 24px; height: 24px; }
.camd-fn.on span { background: #4f5ff0; } .camd-fn em { font-style: normal; color: #ff5a5f; border: 1px solid #ff5a5f; border-radius: 999px; font-size: 11px; padding: 0 8px; }
.camd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 8px; margin-bottom: 14px; }
.camd-tabs { display: flex; justify-content: space-around; background: #141518; padding: 10px 0 14px; margin-top: 4px; }
.camd-tabs span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: #9a9ea8; } .camd-tabs svg { width: 24px; height: 24px; } .camd-tabs .on { color: #6f7cf5; }
/* chi tiết thiết bị: trang toàn màn hình (như app gốc) */
.sheet.page { top: 0; max-height: none; max-width: 560px; border-radius: 0; background: linear-gradient(180deg, #e2e6f8 0, #eef0f6 260px, #f2f3f7 100%); padding-top: calc(6px + var(--safe-t)); }
.sheet.page.dark { background: #000; }
.sheet.page { overflow-x: hidden; }
.pg-head { position: sticky; top: -6px; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 0 -16px 10px; padding: 8px 12px; background: inherit; }
.sheet.page .pg-head { background: rgba(226, 230, 248, .92); backdrop-filter: blur(10px); } .sheet.page.dark .pg-head { background: rgba(0, 0, 0, .9); }
.pg-head button { width: 40px; height: 40px; display: grid; place-items: center; flex: none; color: inherit; } .pg-head button svg { width: 24px; height: 24px; transform: rotate(180deg); }
.pg-head .grow { flex: 1; min-width: 0; text-align: center; } .pg-head h2 { margin: 0; font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-head .d { color: var(--sub); font-size: 12px; } .sheet.dark .pg-head .d { color: #9a9ea8; }
.pg-head .pg-sp { width: 40px; flex: none; } /* giữ tiêu đề ở giữa khi không có nút ... */
/* chi tiết rèm kéo (như app gốc): đầu trang xanh, khung hình rèm trắng bo góc */
.sheet.page.blue { background: linear-gradient(180deg, #6b7bd6 0, #6b7bd6 150px, #f4f5f8 150px); } .sheet.page.blue .pg-head { background: #6b7bd6; color: #fff; } .sheet.page.blue .pg-head .d { color: rgba(255,255,255,.75); }
.crt-hero { background: #fff; border-radius: 28px; padding: 26px 18px 18px; margin: 30px 0 14px; }
/* cuộn trang chi tiết rèm: hình minh hoạ dính ngay dưới đầu trang (pg-head cao 56px, top -6px) */
.crt > .crt-hero { position: sticky; top: 50px; z-index: 1; } .rl-wrap { position: sticky; top: 20px; z-index: 1; } /* rèm cuốn: dính cả khối hình + thanh kéo dọc, trừ 30px lề trên của hình */
.crt-art { width: 100%; display: block; }
.crt-sl { --x: calc(var(--h) * (1% - .34px)); position: relative; height: 40px; margin: 6px 4px 4px; touch-action: none; cursor: pointer; }
.crt-sl i { position: absolute; top: 50%; height: 5px; margin-top: -2.5px; border-radius: 3px; } .crt-sl .a { left: 0; right: 0; background: #e3e9f8; }
.crt-sl .b { left: 0; right: 0; background: linear-gradient(90deg, #4f6ef0 var(--x), transparent var(--x), transparent calc(100% - var(--x)), #4f6ef0 calc(100% - var(--x))); }
.crt-sl b { position: absolute; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff; border: 2.5px solid #4f6ef0; }
.crt-sl .l { left: var(--x); } .crt-sl .r { left: calc(100% - var(--x)); }
.crt-ops { display: flex; justify-content: space-around; padding: 24px 18px; }
.crt-ops button { width: 58px; height: 58px; border-radius: 50%; background: #5b7ef0; color: #fff; display: grid; place-items: center; } .crt-ops button svg { width: 30px; height: 30px; }
.sheet.page.blue.sky { background: linear-gradient(180deg, #7da0f0 0, #7da0f0 150px, #f4f5f8 150px); } .sheet.page.blue.sky .pg-head { background: #7da0f0; }
.crt-sl.one { --x: calc(17px + var(--t) * (1% - .34px)); } .crt-sl.one .b { background: linear-gradient(90deg, #4f8bf0 var(--x), transparent var(--x)); } .crt-sl.one b { left: var(--x); }
.crt-ops.lb { padding: 18px 6px; align-items: flex-start; } .crt-ops.lb button { flex: 1; width: auto; height: auto; background: none; color: #3c4049; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13.5px; text-align: center; }
.crt-ops.lb i { width: 50px; height: 50px; border-radius: 50%; background: #7b95e0; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 19px; font-weight: 600; } .crt-ops.lb button svg { width: 26px; height: 26px; }
.rl-wrap { position: relative; display: flow-root; } .rl-sl { position: absolute; left: 18px; right: 18px; top: 56px; aspect-ratio: 300 / 240; pointer-events: none; }
.rl-sl div { position: absolute; left: 80%; right: 0; top: 0; bottom: 0; pointer-events: auto; touch-action: none; cursor: ns-resize; }
.rl-sl i { position: absolute; left: 88.67%; width: 10px; margin-left: -5px; top: 2%; height: calc(var(--y) - 2%); background: linear-gradient(rgba(226,231,248,0), #e2e7f8); }
.rl-sl b { position: absolute; left: 88.67%; top: var(--y); width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(70,90,160,.3); }
.rl-rot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .rl-rot button { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 8px; font-size: 15px; color: #3c4049; }
.rl-rot i { width: 50px; height: 50px; border-radius: 50%; background: #5b7ef0; color: #fff; display: grid; place-items: center; } .rl-rot svg { width: 26px; height: 26px; } .rl .crt-ops.lb i { background: #5b7ef0; }
.wsw-hero { display: grid; place-items: center; padding: 34px 18px; } .wsw-hero img { width: 190px; height: 190px; }
.wsw-k { display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; padding: 20px 22px; } .wsw-k i { flex: none; width: 28px; height: 28px; background: linear-gradient(#7b95e0 0 84%, #c9d3f5 84%); } .wsw-k b { display: block; font-weight: 400; font-size: 16.5px; color: #1f2228; } .wsw-k small { display: block; margin-top: 4px; font-size: 14px; color: #8b8f99; }
.sheet.page.plain { background: linear-gradient(180deg, #fff 0, #f7f7f8 100%); } .sheet.page.plain .pg-head { background: rgba(255,255,255,.92); }
.clm-hero { display: grid; place-items: center; padding: 56px 18px 64px; } .clm-hero img { width: 170px; height: 170px; }
.wsw-k > svg { flex: none; width: 40px; height: 40px; } .wsw-k .grow { flex: 1; min-width: 0; } .wsw-k .chev { color: #a3a7b1; } .wsw-k .chev svg { width: 20px; height: 20px; display: block; }
.evt-hero { padding: 90px 18px; }
.fp-hint { font-size: 14px; color: #6d7079; margin: 4px 0 10px; } .fp-box { border: 4px solid #111; border-radius: 3px; margin-bottom: 14px; } .fp-map { display: block; width: 100%; } .fp-t text { font-size: 4.3px; fill: #4c4f58; }
.fp-p { transition: transform .9s linear; }
.wsw-k em { font-style: normal; color: #4f5ff0; }
.sheet.page.mint { background: linear-gradient(180deg, #a9e6ab 0, #d9efdc 340px, #f1f3f6 500px); } .sheet.page.mint .pg-head { background: rgba(169,230,171,.92); }
.w1-big { display: flex; align-items: center; justify-content: center; gap: 34px; padding: 80px 0 26px; } .w1-big > i { width: 1px; height: 36px; background: #9fb3a6; }
.w1-v { display: grid; grid-template-columns: auto auto; column-gap: 4px; justify-content: center; color: #3f4a4a; } .w1-v b { font-size: 62px; font-weight: 600; line-height: 1; } .w1-v span { display: flex; flex-direction: column; justify-content: space-between; padding: 4px 0; } .w1-v small { font-size: 18px; } .w1-v em { font-style: normal; font-size: 22px; font-weight: 600; }
.w1-v label { grid-column: 1 / -1; margin-top: 16px; text-align: center; font-size: 15px; color: #7f938a; }
.w1-st { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 15px; color: #3f4a4a; margin-bottom: 90px; } .w1-st > i { width: 1px; height: 12px; background: #9fb3a6; } .w1-st u { display: inline-block; width: 26px; height: 12px; margin-right: 7px; border-radius: 3px; background: #84879a; vertical-align: -1px; }
.wsw-k .sep { color: #a3a7b1; margin: 0 4px; } .w1-ic { flex: none; } .w1-ic img { width: 44px; height: 44px; display: block; } .w1-on { color: #8b8f99; font-size: 15px; white-space: nowrap; }
.sheet.page.aqua { background: linear-gradient(180deg, #78b7f2 0, #c6e0f7 440px, #f1f3f7 600px); } .sheet.page.aqua .pg-head { background: rgba(120,183,242,.92); }
.fp1-hero { display: block; width: calc(100% + 32px); margin: 0 -16px 70px; padding: 90px 20px 60px; text-align: center; color: #111; background: radial-gradient(ellipse 66% 100% at 50% 0, rgba(255,255,255,0) 72%, rgba(255,255,255,.3) 99%, rgba(255,255,255,0) 100%); } .fp1-hero b { display: block; font-size: 32px; font-weight: 700; margin-bottom: 12px; } .fp1-hero small { display: block; font-size: 14.5px; color: #4f5a66; margin-top: 6px; }
.sheet.page.vlv { background: linear-gradient(180deg, #84868c 0, #dfe2e6 300px, #f3f5f7 460px); } .sheet.page.vlv .pg-head { background: rgba(132,134,140,.92); } .sheet.page.vlv .pg-head .d { color: #33363c; }
.sheet.page.vlv.vlv-on { background: linear-gradient(180deg, #7fb0ee 0, #d6e6f7 300px, #f3f5f7 460px); } .sheet.page.vlv.vlv-on .pg-head { background: rgba(127,176,238,.92); }
.wsw-k .sw.on { background: #4f5ff0; }
.sheet.page.fanp { background: linear-gradient(180deg, #c9d6f8 0, #e2e5fa 200px, #eef0f6 340px, #f2f3f7 100%); }
.fan-nav { display: flex; justify-content: space-between; align-items: center; height: 44px; } .fan-nav button { width: 40px; height: 40px; display: grid; place-items: center; color: #111; } .fan-nav button svg { width: 24px; height: 24px; } .fan-nav button:first-child svg { transform: rotate(180deg); }
.fan-t { margin: 22px 8px 6px; font-size: 32px; font-weight: 500; } .fan-r { margin: 0 8px 36px; font-size: 15px; color: #7a7e88; }
.fan-k { display: flex; align-items: center; gap: 6px; margin: 0 6px 14px; font-size: 14.5px; color: #555a64; } .fan-k img { width: 26px; height: 26px; } .fan-k .chev { color: #a3a7b1; } .fan-k .chev svg { width: 13px; height: 13px; display: block; }
.vac-bat { display: flex; align-items: center; gap: 16px; padding: 22px 24px; } .vac-bat b { font-size: 17px; font-weight: 500; } .vac-bat > span:last-child { color: #8b8f99; font-size: 15px; } .vac-bi { flex: none; width: 48px; height: 48px; border-radius: 50%; background: #6b7cf0; color: #fff; display: grid; place-items: center; } .vac-bi svg { width: 24px; height: 24px; }
.vac-bs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 40px 10px 26px; } .vac-b { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14.5px; color: #555a64; } .vac-b i { width: 50px; height: 50px; border-radius: 50%; background: #e9ebf1; color: #5f6268; display: grid; place-items: center; } .vac-b i svg { width: 26px; height: 26px; } .vac-b.on i { background: #4f5ff0; color: #fff; }
.vac-r { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 30px 24px; } .vac-r b { font-size: 17px; font-weight: 500; color: #1f2228; } .vac-r > span { color: #8b8f99; font-size: 15px; } .vac-r .chev { color: #a3a7b1; } .vac-r .chev svg { width: 18px; height: 18px; display: block; }
.vac-bat .grow, .vac-r .grow { flex: 1; min-width: 0; }
.vac-lab { width: max-content; margin: 18px auto 10px; padding: 3px 12px; border: 1px solid #6d7079; border-radius: 12px; font-size: 13px; color: #6d7079; }
.fan-pow { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #3f4160; color: #fff; display: grid; place-items: center; } .fan-pow.on { background: #4f5ff0; } .fan-pow svg { width: 24px; height: 24px; }
.fan-sl { position: relative; height: 42px; border-radius: 14px; background: linear-gradient(90deg, #c9d3fb calc(21px + var(--v) * (1% - .42px)), #eef1f9 0); touch-action: none; cursor: pointer; } .fan-sl b { position: absolute; top: 0; left: calc(var(--v) * (1% - .42px)); width: 42px; height: 42px; border-radius: 14px; background: #fff; border: 1.5px solid #4f5ff0; }
.csz { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.csz-o { padding: 8px 8px 6px; border: 2px solid transparent; border-radius: 14px; background: #eef0f4; font-size: 13px; text-align: center; color: #3c4049; cursor: pointer; } .csz-o.on { border-color: #4f5ff0; color: #4f5ff0; font-weight: 600; }
.csz-box { width: 132px; height: 100px; margin: 0 auto 6px; padding: 5px; border-radius: 8px; background: linear-gradient(#8fbfce, #5f8196); overflow: hidden; pointer-events: none; }
.csz-box .grid { width: 340px; transform: scale(.36); transform-origin: top left; }
.sheet.addc { top: 50px; max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 30px 30px 0 0; }
.ac-head { background: #fff; padding: 18px 0 0; flex: none; } .ac-head h2 { margin: 0 0 16px; text-align: center; font-size: 18px; font-weight: 600; }
.ac-tabs { display: flex; gap: 28px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; } .ac-tabs button { flex: none; padding: 4px 0 10px; color: #8a8f99; font-size: 15px; border-bottom: 3px solid transparent; } .ac-tabs button.on { color: #111; font-size: 17px; font-weight: 600; border-color: #4f5ff0; }
.ac-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; } .ac-q { width: 100%; background: #e4e6ea; border: 0; margin-bottom: 12px; }
.ac-filter { display: flex; align-items: center; gap: 16px; font-size: 14px; color: #8a8f99; margin-bottom: 6px; } .ac-filter label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; } .ac-filter select { border: 0; background: none; color: #111; font-size: 14px; width: 82px; } .ac-filter button { margin-left: auto; color: #4f5ff0; font-size: 14px; white-space: nowrap; } .ac-filter.hide, .ac-filter .hide { display: none; }
.ac-row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 104px; padding: 12px 16px; margin-bottom: 12px; background: #fff; border-radius: 14px; cursor: pointer; overflow: hidden; } .ac-row .grow { min-width: 0; } .ac-row .t { font-size: 16px; } .ac-row .d { font-size: 13px; color: #8a8f99; margin-top: 4px; }
.ac-th { position: relative; flex: none; width: 104px; height: 68px; border: 1px solid #e6e8ee; border-radius: 8px; overflow: hidden; } .ac-th .grid { width: 340px; transform: scale(.56); transform-origin: top left; pointer-events: none; } .ac-th.big .grid { transform: scale(.3); }
.ac-th > button { position: absolute; left: 36px; top: 20px; width: 30px; height: 30px; border-radius: 50%; background: rgba(90,92,100,.75); color: #fff; display: grid; place-items: center; } .ac-th > button svg { width: 18px; height: 18px; }
.ac-th.sc { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; color: #55585f; } .ac-th.sc img, .ac-th.sc svg { width: 24px; height: 24px; }
.ac-r { position: absolute; top: 12px; right: 14px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #d3d6dc; } .ac-r.on { background: #4f5ff0; border-color: #4f5ff0; } .ac-r.on::after { content: ""; position: absolute; left: 7px; top: 4px; width: 7px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(40deg); }
.ac-lab { position: absolute; left: 0; top: 10px; z-index: 1; padding: 1px 6px; background: #4f5ff0; color: #fff; font-size: 10.5px; font-weight: 500; line-height: 1.5; font-style: normal; border-radius: 0 4px 4px 0; }
.ac-row.done { cursor: default; opacity: .6; }
.ac-empty { padding: 40px 16px; text-align: center; color: #8a8f99; font-size: 14px; }
.ac-foot { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 16px calc(14px + var(--safe-b)); background: #f2f3f7; border-top: 1px solid #e4e6ea; } .ac-foot .fbtn { width: 100%; margin: 0; } .ac-foot .fbtn:disabled { opacity: .45; }
.tile.gd { grid-column: 1 / -1; aspect-ratio: auto; align-items: stretch; text-align: left; padding: 18px 20px 20px; background: var(--tile); } .gd-t { font-size: 17px; font-weight: 500; } .gd-s { font-size: 13px; color: var(--sub); margin-top: 2px; }
.gd-m { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; } .gd-m button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: #1d1f24; } .gd-m i { width: 54px; height: 54px; border-radius: 50%; background: #e7e9ef; color: #9a9da7; display: grid; place-items: center; } .gd-m .on i { background: #4f5ff0; color: #fff; } .gd-m svg { width: 28px; height: 28px; }
.tile.gds { background: #faf3ea; } .gds-ic { width: 48px; height: 48px; margin: 4px auto 6px; border-radius: 12px 12px 22px 22px; background: #fff; color: #4cb89a; box-shadow: inset 0 0 0 2px #5d6680; display: grid; place-items: center; } .gds-ic.off { color: #9a9da7; } .gds-ic svg { width: 26px; height: 26px; }
.lv { position: relative; grid-column: 1 / -1; border-radius: var(--radius); background: #3a3e62; color: #fff; } .lv-v { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; display: grid; place-items: center; } .lv-v img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .lv-v button { position: relative; color: #fff; } .lv-v svg { width: 46px; height: 46px; fill: currentColor; }
.lv-t { display: flex; align-items: center; gap: 6px; padding: 12px 14px; font-size: 16px; } .lv-t svg { width: 16px; height: 16px; }
.lv-c { display: flex; gap: 6px; padding: 0 12px 12px; overflow-x: auto; scrollbar-width: none; } .lv-c button { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 10px; color: rgba(255,255,255,.55); font-size: 13px; } .lv-c button.on { background: rgba(0,0,0,.3); color: #fff; } .lv-c img { width: 28px; height: 28px; } .lv-e { font-size: 13px; color: rgba(255,255,255,.6); padding: 2px; } .ve .lv-e { color: var(--sub); }
.tile.ve { grid-column: 1 / -1; aspect-ratio: auto; align-items: stretch; text-align: left; padding: 16px 0 16px 16px; } .ve-l { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; } .ve-l button { flex: none; display: flex; flex-direction: column; justify-content: flex-start; align-self: flex-start; width: 124px; text-align: left; color: #1d1f24; } .ve-i { display: grid; place-items: center; height: 78px; margin-bottom: 6px; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #6c6f78, #3b3e46); color: rgba(255,255,255,.3); } .ve-i img { width: 100%; height: 100%; object-fit: cover; } .ve-i svg { width: 34px; height: 34px; } .ve-l b { display: block; font-size: 12.5px; font-weight: 400; } .ve-l small { font-size: 11.5px; color: var(--sub); }
.tile.lvs { grid-column: span 2; aspect-ratio: auto; align-items: stretch; justify-content: space-between; min-height: 112px; text-align: left; padding: 14px 16px; } .lvs-h { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.25; color: #6d7079; } .lvs-h img { width: 26px; height: 26px; } .tile.lvs b { font-size: 16px; font-weight: 600; color: #1d1f24; }
.tile.wt { grid-column: span 2; aspect-ratio: auto; align-items: stretch; justify-content: space-between; min-height: 112px; padding: 14px 16px; text-align: left; background: linear-gradient(120deg, #e6e9fb, #f6eeee); color: #1d1f24; } .tile.wt > i { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; } .tile.wt > i::before { content: ""; position: absolute; right: -24px; top: -36px; width: 104px; height: 104px; border-radius: 50%; background: rgba(255,255,255,.75); box-shadow: -30px 24px 0 -14px rgba(255,255,255,.6); } /* chỉ cắt hình mây, không cắt nút xoá / đổi cỡ khi sửa */ .wt-t { position: relative; font-size: 15px; font-weight: 500; } .wt-t b { font-size: 36px; font-weight: 500; line-height: 1; } .wt-t sup { font-size: 14px; } .wt-b { display: flex; justify-content: space-between; font-size: 13px; color: #6d7079; }
.tile.en { grid-column: 1 / -1; aspect-ratio: auto; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 14px 16px; text-align: left; color: #1d1f24; } .en small { display: block; font-size: 12px; color: #6d7079; margin-bottom: 8px; } .en b { font-size: 22px; font-weight: 600; white-space: nowrap; } .en em { font-style: normal; font-size: 12px; font-weight: 400; margin-left: 2px; } .en-c { flex: 1; min-width: 96px; } .en-b { display: flex; align-items: flex-end; gap: 5px; height: 62px; border-bottom: 1px solid #5cc6b4; } .en-b i { flex: 1; background: #5cc6b4; } .en-d { display: flex; justify-content: space-between; font-size: 10px; color: #8a8f99; margin-top: 3px; }
.tile.lg { grid-column: 1 / -1; aspect-ratio: auto; align-items: stretch; padding: 14px 16px; text-align: left; color: #1d1f24; } .lg-h { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid #e4e6ea; } .lg-h b { font-size: 16px; font-weight: 500; } .lg-h span { font-size: 13px; color: #6d7079; } .tile.lg small { font-size: 12px; color: #8a8f99; } .lg-r { display: flex; gap: 10px; padding: 3px 0 10px; font-size: 14px; } .lg-r time { flex: none; width: 42px; color: #6d7079; } .lg-r > i { flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: #c9ccd3; }
.sheet.page.gdp { background: linear-gradient(180deg, #bcd9f8 0, #dfe9f7 260px, #f2f3f7 420px); }
.gp-s { margin: 22px 6px 6px; font-size: 15px; color: #6d7079; } .gp-t { margin: 0 6px 22px; font-size: 28px; font-weight: 600; } .gp-m { margin: 0 0 20px; } .gp-m i { width: 64px; height: 64px; background: #fff; } .gp-m svg { width: 32px; height: 32px; } .gp-m button { color: #6d7079; } .gp-m button.on { color: #1d1f24; }
.gp-st { display: flex; align-items: center; gap: 10px; font-size: 15.5px; } .gp-st svg { flex: none; width: 24px; height: 24px; } .gp-log.lg small { font-size: 12px; color: #8a8f99; } .gp-log > small { display: block; margin: 6px 0; font-weight: 600; font-size: 13px; }
.sheet.page.enp { background: linear-gradient(135deg, #cdeec6 0, #94e3c8 110px, #a9e0e0 240px, #d3dcf2 340px, #f2f3f7 460px); }
.he-t { margin: 24px 2px 6px; } .he-home { margin: 0 2px 24px; font-size: 14px; color: #55606a; } .he-bot { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 14px; border-radius: 16px; background: rgba(255,255,255,.45); } .he-bot svg { flex: none; width: 44px; height: 44px; } .he-bot div { flex: 1; padding: 10px 14px; border-radius: 12px; background: #fff; font-size: 14px; color: #55585f; }
.he-h { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #e8eaef; } .he-h > i { flex: none; width: 18px; height: 18px; border-radius: 5px; } .he-h > b { flex: 1; font-size: 15.5px; font-weight: 500; }
.he-seg { flex: none; display: flex; padding: 2px; border-radius: 9px; background: #eef0f4; font-size: 13px; } .he-seg button { padding: 3px 9px; border-radius: 7px; color: #6d7079; } .he-seg .on { background: #fff; color: #1d1f24; }
.he-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .he-2 > div { padding: 12px; border-radius: 12px; background: #f2f3f7; } .he-2 small, .he-mm small { display: block; font-size: 12.5px; color: #6d7079; } .he-2 b { display: block; margin-top: 8px; font-size: 24px; font-weight: 500; } .he-2 em, .he-mm em { margin-left: 4px; font-style: normal; font-size: 12px; color: #55585f; font-weight: 400; }
.he-mm { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; } .he-mm b { font-size: 22px; font-weight: 500; } .he-chart { display: block; width: 100%; } .he-chart text { font-size: 8px; fill: #6d7079; } .he-chart .u { font-size: 7px; }
.he-ai { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #f2f3f7; font-size: 13.5px; color: #55585f; } .he-by { padding: 6px 10px; border: 0; border-radius: 9px; background: #eef0f4; font-size: 13.5px; } .he-pie { display: block; width: 100%; max-width: 360px; margin: 6px auto; } .he-pie text { font-size: 10px; }
.he-leg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; padding: 14px; border-radius: 12px; background: #f2f3f7; font-size: 13.5px; } .he-leg > div { display: flex; align-items: center; gap: 8px; min-width: 0; } .he-leg i { flex: none; width: 10px; height: 10px; border-radius: 50%; } .he-leg small { display: block; font-size: 12.5px; color: #55585f; }
.he-d { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14px; } .he-d img { width: 36px; height: 36px; } .he-d .grow { flex: 1; min-width: 0; } .he-d b { display: block; font-weight: 500; } .he-d small { font-size: 12.5px; color: #8a8f99; } .he-d > span { white-space: nowrap; }
.sheet.page.vep { background: #f2f3f7; padding-top: 0; } .ve-top { margin: 0 -16px; padding: calc(10px + var(--safe-t)) 16px 12px; background: linear-gradient(180deg, #9fc3ef 0, #e2edfa 70px, #fff 130px); } .ve-n { display: flex; align-items: center; gap: 6px; } .ve-n h2 { flex: 1; margin: 0; text-align: center; font-size: 18px; font-weight: 500; } .ve-n > button { flex: none; width: 40px; height: 40px; display: grid; place-items: center; color: #111; } .ve-n > button:first-child svg { width: 24px; height: 24px; transform: rotate(180deg); } .ve-ai { border-radius: 50%; background: linear-gradient(135deg, #3f8ae8, #6a7df0); color: #fff !important; } .ve-ai svg { width: 22px; height: 22px; }
.ve-w { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 12px; } .ve-w button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #1d1f24; } .ve-w button:disabled { color: #b4b8c1; } .ve-w small { font-size: 12.5px; color: #6d7079; } .ve-w b { font-size: 16px; font-weight: 500; width: 42px; height: 40px; display: grid; place-items: center; border-radius: 10px; } .ve-w .on b { background: #4f5ff0; color: #fff; } .ve-w i { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: #4f5ff0; } .ve-w .on i { background: #fff; }
.ve-f { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; } .ve-f select, .ve-f button { flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: #eef0f4; font-size: 13.5px; color: #55585f; max-width: 140px; } .ve-f button.on { background: #4f5ff0; color: #fff; }
.ve-list { padding-top: 12px; } .ve-r { position: relative; display: flex; gap: 10px; align-items: flex-start; } .ve-k { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #e9edfb; color: #4f5ff0; display: grid; place-items: center; } .ve-k svg { width: 18px; height: 18px; } .ve-r .grow { flex: 1; min-width: 0; } .ve-r b { display: block; font-size: 16px; font-weight: 500; } .ve-r small { display: block; margin-top: 2px; font-size: 13px; color: #8a8f99; } .ve-m { position: absolute; right: 12px; top: 12px; color: #a3a7b1; } .ve-m svg { width: 20px; height: 20px; }
.ve-p { position: relative; display: grid; place-items: center; width: 142px; height: 80px; margin-top: 10px; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #6c6f78, #3b3e46); color: rgba(255,255,255,.3); } .ve-p.tall { width: 80px; height: 106px; } .ve-p img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .ve-p svg { width: 34px; height: 34px; }
.tile.lcard.lbig.acc { grid-column: 1 / -1; aspect-ratio: auto; min-height: 250px; padding: 16px 18px 18px; } .acc .actemp { padding: 0 24px; margin: 12px 0; } .acc .actemp span { font-size: 46px; } .acc .lops { margin-top: 6px; } .acc .lop { flex: 1; gap: 7px; font-size: 12.5px; color: #8a8f99; opacity: 1; } .acc .lop svg { width: 50px; height: 50px; padding: 13px; border-radius: 14px; background: #eef0f4; color: #a9acb6; } .acc .lop.on { color: #1d1f24; } .acc .lop.on svg { background: #eef0f4; color: #4f5ff0; } .tile.off.acc .lop { color: rgba(255,255,255,.6); } .tile.off.acc .lop svg { background: rgba(255,255,255,.08); }
.lpow.soft, .acc .lpow.on, .fanw .lpow.on { background: #fff; color: #4f5ff0; box-shadow: 0 1px 5px rgba(40,50,90,.14); }
.tile.lcard.lbig.curt { grid-column: 1 / -1; aspect-ratio: auto; padding: 16px 18px 18px; } .lcs { --x: calc(var(--h) * (1% - .84px)); position: relative; height: 42px; margin: 18px 4px; border-radius: 12px; background: linear-gradient(90deg, #4f5ff0 calc(var(--x) + 21px), #d5d6dc 0, #d5d6dc calc(100% - var(--x) - 21px), #4f5ff0 0); touch-action: none; cursor: pointer; } .lcs b { position: absolute; top: 0; width: 42px; height: 42px; border-radius: 12px; background: #fff; border: 1.5px solid #4f5ff0; } .lcs b:first-child { left: var(--x); } .lcs b:last-child { right: var(--x); }
.curt .lops { margin-top: 0; } .curt .lop { flex: 1; gap: 7px; font-size: 12.5px; opacity: 1; color: #1d1f24; } .curt .lop svg { width: 50px; height: 50px; padding: 13px; border-radius: 14px; background: #eef0f4; color: #4f5ff0; } body.card-editing .lcs { pointer-events: none; }
.scene.fx-run { overflow: hidden; color: #8a8f99; } .scene.fx-run::before { content: ""; position: absolute; left: 50%; top: 50%; width: 130%; aspect-ratio: 1; transform: translate(-50%, -50%); background: conic-gradient(#7aa7f5, #b58af0, #f0708a, #f59a4a, #f5d04a, #8fe07a, #5cc6e0, #7aa7f5); animation: fx-spin 2.4s linear infinite; } .scene.fx-run::after { content: ""; position: absolute; inset: 3px; border-radius: calc(var(--radius) - 3px); background: var(--tile); } .scene.fx-run > * { position: relative; z-index: 1; }
@keyframes fx-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.scene .fx-ok { color: #f2c14e; }
.lpow.flip svg { transform: scaleX(-1); }
/* card đèn theo app gốc: nút nguồn trắng; đèn lớn rộng hết hàng, 2 thanh cách đều; đèn dọc thanh mảnh, núm to hơn thanh */
.lpow.on { background: #fff; color: #4f5ff0; box-shadow: 0 1px 5px rgba(40,50,90,.14); }
.lcard .nm { font-weight: 500; }
.tile.lcard.lbig.lgt { grid-column: 1 / -1; aspect-ratio: 1.54; padding: 16px 20px 22px; gap: 0; justify-content: space-between; } .lgt .lhead { align-items: center; gap: 14px; } .lgt .lhead .ic { width: 50px; } .lgt .nm { font-size: 16px; } .lgt .lsub { font-size: 13px; } .lgt .lsl, .lgt .lsl + .lsl { height: 34px; margin: 0 2px; border-radius: 11px; }
.lgt .lsl i { background: #4f5ff0; border-radius: 11px; } .lgt .lsl b { top: 0; bottom: 0; width: 32px; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1.5px #4f5ff0; } .lgt .lsl.ct { background: linear-gradient(90deg, #f6d565, #fdf6dc 75%, #fff); box-shadow: inset 0 0 0 1px #f0f0ee; } .lgt .lsl.ct b { box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.tile.lcard.ltall { aspect-ratio: .355; padding: 14px 8px 12px; gap: 0; } .ltall .nm { font-size: 14.5px; } .ltall .lsub { margin-top: 2px; font-size: 12px; } .tile.lcard.ltall .lpow { width: 36px; height: 36px; margin-top: 12px; }
.lsl.v { width: 28px; min-height: 70px; margin: 12px auto 0; background: none; border-radius: 0; overflow: visible; } .lsl.v::before { content: ""; position: absolute; left: 8px; right: 8px; top: 0; bottom: 0; border-radius: 6px; background: #d9dbe1; } .lsl.v i { left: 8px; right: 8px; border-radius: 6px; background: #4f5ff0; } .lsl.v b { left: 0; right: 0; height: 28px; border-radius: 10px; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.2); }
.tile.off .lsl.v::before { background: rgba(255,255,255,.12); } .tile.off .lsl i { background: #3f4aa6; } .tile.off .lsl b, .tile.off.lgt .lsl.ct b { background: #8d919b; box-shadow: none; } .tile.off.lgt .lsl { background: rgba(255,255,255,.12); } .tile.off.lgt .lsl.ct { opacity: .5; }
/* card đèn lớn RGB: thanh độ sáng + bảng phổ màu sát viền dưới card; núm vuông bo góc, không lòi ra ngoài bảng */
.tile.lcard.lbig.lgt.lrgb { padding: 16px 4px 4px; justify-content: flex-start; } .lrgb .lhead { padding: 0 16px; } .lrgb .lsl, .lrgb .lsl + .lsl { margin: 12px 22px 0; flex: none; }
.lspec { position: relative; flex: 1; min-height: 0; margin-top: 12px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); touch-action: none; cursor: pointer; -webkit-user-select: none; user-select: none; background: linear-gradient(180deg, #fff, rgba(255,255,255,0)), linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }
.lspec b { position: absolute; left: calc(5px + (100% - 42px) * var(--x) / 100); top: calc(5px + (100% - 42px) * var(--y) / 100); width: 32px; height: 32px; border-radius: 10px; border: 4px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.tile.off .lspec { filter: brightness(.82) saturate(.8); } body.card-editing .lcard .lspec { pointer-events: none; }
.tile.wide { aspect-ratio: 1.55; justify-content: space-between; } /* cao bằng ô nhỏ cùng hàng */
.wsw-hint { text-align: center; font-size: 12.5px; color: #8b8f99; margin: 4px 0 12px; }
.lsw.crt-md { grid-template-columns: repeat(3, 1fr); }
.crt-sc { display: flex; flex-wrap: wrap; gap: 18px; } .crt-sc button { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: #3c4049; text-align: center; }
.crt-sc button > svg, .crt-sc button > img, .crt-sc .scene-ic { width: 48px; height: 48px; } .crt-sc .add { width: 48px; height: 48px; border-radius: 50%; background: #eef0f4; display: grid; place-items: center; color: #555a64; } .crt-sc .add svg { width: 22px; height: 22px; }
/* trang chi tiết đèn: phủ toàn màn hình, thanh tiêu đề xanh, vòng độ sáng + đĩa nhiệt độ màu / màu */
.sheet:has(.lpage) { top: 0; max-height: none; max-width: 560px; border-radius: 0; padding: 0; background: #6678d4; } /* rộng tối đa như trang chính (#app 560px) */
.lpage { min-height: 100%; display: flex; flex-direction: column; }
.lbar { color: #fff; padding: calc(var(--safe-t) + 10px) 12px 30px; }
.lnav { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.lnav h2 { margin: 0; text-align: center; font-size: 18px; font-weight: 400; }
.lnav button { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; }
.lnav button svg { width: 24px; height: 24px; }
.lnav button:first-child svg { transform: scaleX(-1); }
.ltabs { display: flex; justify-content: center; gap: 14px; margin-top: 18px; }
.ltabs button { padding: 8px 16px; border-radius: 999px; font-size: 14px; color: rgba(255,255,255,.55); background: rgba(255,255,255,.1); }
.ltabs button.on { color: #fff; background: rgba(255,255,255,.26); }
.lbody { flex: 1; margin-top: -18px; padding: 0 14px calc(24px + var(--safe-b)); background: #f7f7f8; border-radius: 22px 22px 0 0; }
.ldial { position: relative; width: min(260px, 70vw); aspect-ratio: 1; margin: 40px auto 0; touch-action: none; user-select: none; -webkit-user-select: none; --rc: #efc36f; }
.ldial.rgb { --rc: hsl(var(--k) 85% 65%); }
.lring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--rc) calc(var(--p) * 1%), #e8e9ee 0); -webkit-mask: radial-gradient(farthest-side, transparent 79.5%, #000 80%); mask: radial-gradient(farthest-side, transparent 79.5%, #000 80%); }
.lmark { position: absolute; left: 50%; top: -1px; width: 5px; height: 12%; margin-left: -2.5px; border-radius: 3px; background: #e2e3e8; transform-origin: 50% calc(min(260px, 70vw) / 2 + 1px); transform: rotate(calc(var(--p) * 3.6deg)); }
.ldisc { position: absolute; inset: 15%; border-radius: 50%; background: linear-gradient(180deg, #f5b36f, #f9dcae 45%, #fdf0e8 75%, #fdf6f4); }
.ldial.rgb .ldisc { background: radial-gradient(closest-side, #fff, transparent 85%), conic-gradient(red, #ff0, lime, cyan, blue, #f0f, red); }
.lknob { position: absolute; left: 50%; top: calc(var(--k) * 1%); width: 34px; height: 34px; margin: -17px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ldial.rgb .lknob { left: calc(50% + 36% * sin(var(--k) * 1deg)); top: calc(50% - 36% * cos(var(--k) * 1deg)); background: hsl(var(--k) 90% 60%); }
.linfo { text-align: center; color: #6b707a; font-size: 14px; margin: 22px 0 34px; }
.lcardw { display: block; width: 100%; text-align: left; background: #fff; border-radius: 14px; margin-bottom: 12px; font-size: 17px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.lcardw.lrow { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 0 20px; }
.lcardw.lrow > span:first-child:not(.aic) { flex: 1; }
.lcardw .grow { flex: 1; }
.lcardw .chev { color: #a3a7b1; } .lcardw .chev svg { width: 20px; height: 20px; }
.lcardw .sw.on { background: #4f5ff0; }
.lcardw h3 { margin: 0; padding: 20px 20px 0; font-size: 17px; font-weight: 400; }
.lsw { display: grid; grid-template-columns: repeat(5, 1fr); padding: 22px 8px 18px; }
.lsw button { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14px; color: #3a3d45; }
.lsw i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.lsw i.add { background: #f0f0f2; color: #55585f; } .lsw i.add svg { width: 22px; height: 22px; }
.ledit { display: block; width: 100%; padding: 14px; border-top: 1px solid var(--line); color: #4f5ff0; font-size: 17px; text-align: center; }
.aic.soft.gray { width: 44px; height: 44px; padding: 10px; background: #f0f0f2; color: #55585f; }
/* trang đèn - tab Động: vòng tròn lớn bật / tắt, hiệu ứng động dạng vòng màu */
.ldyn { display: grid; place-items: center; width: min(250px, 66vw); aspect-ratio: 1; margin: 60px auto 64px; border-radius: 50%; background: #e4e5ea; position: relative; transition: all .2s; }
.ldyn::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: #fff; }
.ldyn i { position: relative; width: 78%; aspect-ratio: 1; border-radius: 50%; background: #e4e5ea; color: #fff; display: grid; place-items: center; }
.ldyn i svg { width: 34%; height: 34%; }
.ldyn.on { background: #8394e4; box-shadow: 0 0 0 28px rgba(255,255,255,.9); } .ldyn.on i { width: 72%; background: #6576dd; animation: ldynPulse 2.4s ease-in-out infinite; }
@keyframes ldynPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }
.lsw i.fx { background: transparent; border: 6px solid var(--c); box-shadow: inset 0 0 0 4px #fff; position: relative; } .lsw i.fx::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: color-mix(in srgb, var(--c) 30%, #fff); }
.lsw button.on span { color: #4f5ff0; font-weight: 600; } .lsw button.on i.fx { outline: 2px solid #4f5ff0; outline-offset: 3px; }
/* trang đèn RGB (như app gốc): nền đầu trang theo màu đèn (--rc) */
.sheet:has(.rpage) { top: 0; max-height: none; max-width: 560px; border-radius: 0; padding: 0; background: #eef0f5; }
.rpage { min-height: 100%; background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 70%, #fff) 0, color-mix(in srgb, var(--rc) 25%, #eef0f5) 200px, #eef0f5 380px); transition: background .3s; }
.rbar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: calc(var(--safe-t) + 10px) 12px 0; color: #1f2128; }
.rbar h2 { margin: 0; text-align: center; font-size: 19px; font-weight: 600; } .rbar button { width: 40px; height: 40px; display: grid; place-items: center; color: inherit; } .rbar button svg { width: 24px; height: 24px; } .rbar button:first-child svg { transform: scaleX(-1); }
.rbody { padding: 110px 14px calc(24px + var(--safe-b)); }
.rpow { background: #34364f; color: #fff; } .rpow.on { background: #4f5ff0; } /* như app gốc: tắt = xanh đậm, bật = xanh dương */
.rbri { padding: 20px 20px 22px; } .rbri .acd-h { margin-bottom: 18px; }
.rsl { position: relative; height: 40px; border-radius: 20px; background: linear-gradient(90deg, #4f5ff0 var(--p), #eef0f8 var(--p)); touch-action: none; cursor: pointer; }
.rsl b { position: absolute; top: 0; left: clamp(20px, var(--p), calc(100% - 20px)); width: 40px; height: 40px; margin-left: -20px; border-radius: 16px; background: #fff; border: 2px solid #4f5ff0; }
.rcol { padding: 14px 16px 18px; } .rtabs { display: flex; align-items: center; gap: 22px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding: 4px 4px 0; }
.rtabs button { flex: none; font-size: 18px; font-weight: 600; color: #8a8e98; padding-bottom: 8px; position: relative; } .rtabs button.on { color: #1f2128; } .rtabs button.on::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 3px; border-radius: 2px; background: #4f5ff0; }
.rtabs .radd { margin-left: auto; color: #1f2128; padding: 0; } .rtabs .radd svg { width: 26px; height: 26px; }
.rscn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .rscn button { height: 92px; border-radius: 12px; overflow: hidden; display: flex; align-items: flex-end; }
.rscn span { flex: 1; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; color: #fff; font-size: 15px; } .rscn span svg { width: 18px; height: 18px; }
.rmore { display: flex; align-items: center; gap: 4px; margin: 14px auto 0; color: #8a8e98; font-size: 15px; } .rmore svg { width: 16px; height: 16px; }
.rpal { display: grid; grid-template-columns: repeat(8, 1fr); border-radius: 12px; overflow: hidden; } .rpal button { aspect-ratio: 1; } .rpal button.on { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px #1f2128; }
.rspec, .rwhite { position: relative; height: 200px; border-radius: 12px; touch-action: none; cursor: pointer; overflow: hidden; }
.rspec { background: linear-gradient(180deg, #fff, rgba(255,255,255,0)), linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }
.rwhite { background: linear-gradient(90deg, #f6c47a, #fbf0b4 45%, #f2f4f8); }
.rspec em, .rwhite em { position: absolute; top: 12px; right: 12px; font-style: normal; color: #fff; font-size: 14px; background: rgba(0,0,0,.25); border-radius: 999px; padding: 4px 12px; }
.rspec b { position: absolute; width: 34px; height: 34px; margin: -17px; border-radius: 10px; border: 4px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.rwhite b { position: absolute; top: 50%; width: 38px; height: 38px; margin: -19px; border-radius: 12px; border: 4px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.rwhite b::before, .rwhite b::after { content: ""; position: absolute; top: 50%; margin-top: -7px; border: 7px solid transparent; } .rwhite b::before { right: 100%; border-right: 9px solid #fff; margin-right: 2px; } .rwhite b::after { left: 100%; border-left: 9px solid #fff; margin-left: 2px; }
.rgrp { width: 46px; height: 46px; flex: none; } .rgrp img { width: 100%; height: 100%; object-fit: contain; }
/* trang đèn RGB / nhóm đèn: dòng Nhóm đèn, nhóm tắt thì mờ thẻ chỉnh, danh sách thành viên */
.lcardw.lrow > .rgrp, .lcardw.lrow > .rmus-ic { flex: none !important; }
.rpage.off .rdim { opacity: .5; pointer-events: none; }
.rgm { padding: 0; overflow: hidden; } .rgm-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; font-size: 17px; border-bottom: 1px solid var(--line); }
.rgm-h button { width: 30px; height: 30px; color: #3a3d45; display: grid; place-items: center; } .rgm-h button svg { width: 24px; height: 24px; }
.rgm .li { width: 100%; padding: 14px 20px; border-bottom: 1px solid var(--line); text-align: left; } .rgm .li:last-child { border-bottom: 0; } .rgm .li .d { color: #8b8f99; font-size: 13px; margin-top: 3px; }
/* trang đèn: đèn tắt = cùng vòng, toàn xám, không núm, không kéo (như app gốc) */
.ldial.off { pointer-events: none; } .ldial.off .lring { background: #efeff1; } .ldial.off .ldisc { background: #ececee; } .ldial.off .lknob { display: none; }
.ldial.off .lmark { transform: rotate(0deg); background: #d9dade; }
/* LED dây (LED Strip T1): nút nguồn xanh, thẻ Đồng bộ nhạc; tab Trắng: núm tô màu, sát mép thì ẩn mũi tên phía đó */

.rmus b { display: block; font-weight: 500; } .rmus small { display: block; color: #8b8f99; font-size: 14px; margin-top: 3px; }
.rmus-ic { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f07a7a, #d94848); color: #fff; display: grid; place-items: center; flex: none; } .rmus-ic svg { width: 22px; height: 22px; }
.rwhite b.min::before, .rwhite b.max::after { display: none; } .rwhite b.min { margin-left: 0; } .rwhite b.max { margin-left: -38px; }
/* đèn T1M: tab Đèn chính / Đèn phụ dưới tiêu đề; ô hiệu ứng không icon */
.t1tabs { display: flex; justify-content: center; gap: 44px; margin-top: 26px; } .t1tabs button { font-size: 17px; color: #1f2128; padding-bottom: 10px; position: relative; }
.t1tabs button.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 30px; height: 3px; margin-left: -15px; border-radius: 2px; background: #4f5ff0; }
.rbody.t1body { padding-top: 70px; }
/* chi tiết công tắc (như app gốc): mặt công tắc N kênh trong khung trắng, điện năng, cài đặt */
.swd { background: #f6f6f8; border-radius: 28px 28px 0 0; margin: 30px -16px 0; padding: 64px 16px 20px; min-height: 60vh; }
.swd-panel { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: 3px; width: min(86%, 340px); aspect-ratio: 1; margin: 0 auto 64px; } /* khối nút vuông như app gốc ở mọi khổ màn hình, 1 / 2 / 3 nút chia đều; nội dung đặt theo % nên không kéo giãn khối */
.swd-panel button { position: relative; min-width: 0; min-height: 0; background: #e2e3e7; color: #fff; transition: background .2s; }
.swd-panel button:first-child { border-radius: 18px 0 0 18px; } .swd-panel button:last-child { border-radius: 0 18px 18px 0; } .swd-panel button:only-child { border-radius: 18px; }
.swd-panel button.on { background: #6a7cd8; } .swd-panel .ic { position: absolute; top: 17%; left: 50%; width: 56px; height: 56px; margin-left: -28px; } .swd-panel .ic img, .swd-panel .ic svg { width: 100%; height: 100%; object-fit: contain; }
.swd-panel button:not(.on) .ic { filter: grayscale(1) brightness(1.15); } .swd-panel .nm { position: absolute; top: 58%; left: 6px; right: 6px; font-size: 15px; text-align: center; line-height: 1.25; }
.swd-panel i { position: absolute; bottom: 7%; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #cfd1d6; } .swd-panel button.on i { background: #f5c842; }
.swd-pow { display: flex; align-items: center; width: 100%; text-align: center; padding: 22px 8px; color: inherit; } .swd-pow > div { flex: 1; } .swd-pow > i { width: 1px; height: 22px; background: #c7cad1; }
.swd-pow b { display: block; font-size: 19px; font-weight: 400; color: #2a2d34; } .swd-pow span { display: block; color: #8b8f99; font-size: 12.5px; margin-top: 6px; }
.swd-row { width: 100%; text-align: left; padding: 18px; } .swd-row .chev svg { width: 20px; height: 20px; color: #a3a7b1; }
.swd-ic { width: 46px; height: 46px; border-radius: 50%; background: #6a7cd8; color: #fff; display: grid; place-items: center; flex: none; } .swd-ic svg { width: 22px; height: 22px; }
.sheet.page.blue:has(.swd) { background: linear-gradient(180deg, #6b7bd6 0, #6b7bd6 240px, #f6f6f8 240px); } .sheet.page.blue .swd { margin-top: 14px; }
/* điện năng tiêu thụ (như app gốc) */
.sheet:has(.enpage) { top: 0; max-height: none; max-width: 560px; border-radius: 0; padding: 0; background: #fff; }
.enpage { min-height: 100%; display: flex; flex-direction: column; background: #fff; padding-bottom: calc(14px + var(--safe-b)); }
.enbar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: calc(var(--safe-t) + 10px) 12px 0; } .enbar h2 { margin: 0; text-align: center; font-size: 19px; font-weight: 600; }
.enbar button { width: 40px; height: 40px; display: grid; place-items: center; color: #1f2128; } .enbar button svg { width: 24px; height: 24px; } .enbar button:first-child svg { transform: scaleX(-1); }
.en-pills { display: flex; justify-content: center; gap: 26px; margin-top: 22px; } .en-pills button { padding: 6px 18px; border-radius: 999px; background: #f0f0f2; color: #6b707a; font-size: 15px; } .en-pills button.on { background: #7b8fe2; color: #fff; }
.en-total { text-align: center; margin-top: 4px; font-size: 14px; } .en-total b { font-size: 40px; font-weight: 400; } .en-total span { display: block; color: #9a9ea8; margin-top: 2px; }
.en-leg { display: flex; align-items: center; gap: 10px; color: #6b707a; font-size: 14px; margin: 38px 16px 0; } .en-leg i { width: 11px; height: 11px; border-radius: 50%; background: #6a7cd8; }
.en-chart { position: relative; flex: 1; min-height: 320px; margin-top: 12px; border-top: 1px dashed #e6e7eb; } .en-chart svg { position: absolute; top: 0; bottom: 0; left: 34px; width: calc(100% - 68px); height: 100%; overflow: visible; }
.en-menu { position: absolute; right: 18px; bottom: 14px; width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); display: grid; place-items: center; color: #8a8e98; padding: 0; } .en-menu svg { position: static; width: 22px; height: 22px; margin: 0; }
.en-axis { display: flex; align-items: center; border-top: 1px solid #eceef1; padding: 14px 6px 0; } .en-axis > button { width: 28px; color: #8a8e98; } .en-axis > button svg { width: 18px; height: 18px; } .en-axis > button:first-child svg { transform: scaleX(-1); }
.en-axis > div { flex: 1; display: grid; grid-template-columns: repeat(var(--n), 1fr); text-align: center; font-size: 12px; color: #6b707a; line-height: 1.35; }
/* chi tiết khoá (như app gốc): xanh = đã khoá, hồng = cửa đang mở */
.sheet:has(.lkpage) { top: 0; max-height: none; max-width: 560px; border-radius: 0; padding: 0; background: #eef0f4; }
.lkpage { min-height: 100%; padding: 0 16px calc(96px + var(--safe-b)); background: linear-gradient(180deg, #dbe7fa 0, #e8eef8 420px, #eef0f4 700px); }
.lkpage.open { background: linear-gradient(180deg, #f8e4e2 0, #f4ebea 420px, #eef0f4 700px); } .lkpage .enbar { margin: 0 -12px; }
.lk-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; } .lk-btns button { height: 74px; border-radius: 18px; background: rgba(255,255,255,.55); display: grid; place-items: center; color: #1f2128; box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.lk-btns button svg { width: 26px; height: 26px; } .lk-btns button.dim { color: #c9cbd2; } .lk-btns button:nth-child(3) { color: #6b707a; }
.lk-card { display: block; width: 100%; background: #fff; border-radius: 22px; padding: 20px; margin-bottom: 14px; text-align: left; color: #1f2128; }
.lk-h, .lk-row { display: flex; align-items: center; gap: 12px; font-size: 18px; } .lk-h button { display: flex; align-items: center; gap: 4px; color: #9a9ea8; font-size: 16px; } .lk-h button svg, .lk-row .chev svg { width: 18px; height: 18px; color: #8a8e98; }
.lk-ic { width: 30px; height: 30px; border-radius: 8px; background: #7ba2f0; color: #fff; display: grid; place-items: center; flex: none; } .lk-ic svg { width: 18px; height: 18px; }
.lk-log { margin-top: 16px; } .lk-log > div { display: flex; align-items: center; gap: 18px; padding: 10px 0 10px 8px; font-size: 17px; position: relative; }
.lk-log .t { width: 46px; color: #8a8e98; font-size: 15px; } .lk-log .i { width: 28px; height: 28px; color: #6b707a; display: grid; place-items: center; } .lk-log .i svg { width: 24px; height: 24px; }
.lk-log > div + div::before { content: ""; position: absolute; left: 75px; top: -14px; height: 24px; width: 1px; background: #d8d9de; } .lk-log .warn { color: #d9452f; } .lk-log .warn .i { color: #d9452f; }
.lk-hold { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--safe-b)); width: min(528px, calc(100% - 32px)); z-index: 2; }
.lk-hold button { position: relative; overflow: hidden; width: 100%; height: 56px; border-radius: 28px; background: #3f55dd; color: #fff; font-size: 19px; } .lk-hold button.dim { background: #b7bde6; color: #e7e9f8; }
.lk-hold button i { position: absolute; inset: 0; width: 0; background: rgba(255,255,255,.25); } .lk-hold button.hold i { width: 100%; transition: width .8s linear; } .lk-hold button span { position: relative; }
.lkpage .grow { flex: 1; min-width: 0; }
/* nhật ký khoá cửa (như app gốc) */
.sheet:has(.lklogpage) { top: 0; max-height: none; max-width: 560px; border-radius: 0; padding: 0; background: #f3f5f7; }
.lklogpage { min-height: 100%; padding: 0 16px calc(24px + var(--safe-b)); background: #f3f5f7; } .lklogpage .enbar { margin: 0 -12px; }
.lk-date { display: flex; align-items: center; gap: 8px; margin: 26px 6px 24px; font-size: 26px; font-weight: 600; color: #16171b; } .lk-date svg { width: 14px; height: 14px; }
.lk-chips { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 22px; padding: 0 16px; } .lk-chips button { flex: none; padding: 6px 16px; border-radius: 999px; font-size: 17px; color: #1f2128; }
.lk-chips button.on { background: #3f55dd; color: #fff; }
.lk-day { font-size: 18px; margin: 4px 0 4px 10px; } .lk-log .warn .t { color: #e88d7c; }
/* quản lý người dùng khoá */
.lku-h { display: flex; align-items: center; justify-content: space-between; margin: 26px 18px 12px; color: #4a4e57; font-size: 16px; } .lku-h button { color: #4a4e57; } .lku-h button svg { width: 22px; height: 22px; }
.lku { padding: 6px 20px; } .lku-u { display: flex; align-items: center; gap: 14px; padding: 14px 0; } .lku-u + .lku-u .grow, .lku-u .grow { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: -14px; }
.lku .av { width: 50px; height: 50px; border-radius: 12px; background: #6f80d0; color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 600; flex: none; }
.lku b { display: block; font-size: 18px; font-weight: 400; } .lku small { display: block; color: #6b707a; font-size: 14px; margin-top: 3px; }
.lku > button { display: block; padding: 16px 0; color: #3f55dd; font-size: 18px; }
.lku .lku-u .grow { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
/* khoá bản mới: camera liên kết + thẻ trạng thái */
.lk2-top { margin: 10px 0 14px; border-radius: 26px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); overflow: hidden; }
.lk2-cam { position: relative; } .lk2-cam .cam { margin: 0; border-radius: 26px 26px 18px 18px; } .lk2-cam .cam .bar, .lk2-cam .cam .ago { display: none; } .lk2-cam .cam .view { aspect-ratio: 16 / 9.5; }
.lk2-cn { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 2px; padding: 4px 6px 4px 12px; border-radius: 999px; background: rgba(0,0,0,.2); color: #fff; font-size: 16px; } .lk2-cn svg { width: 18px; height: 18px; }
.lk2-ctl { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: space-around; color: #fff; } .lk2-ctl svg { width: 22px; height: 22px; }
.lk2-st { display: flex; align-items: center; padding: 16px 22px 20px; } .lk2-st b { display: block; font-size: 22px; font-weight: 500; color: #16171b; } .lkpage.open .lk2-st b { color: #d9452f; } .lk2-st span { color: #6b707a; font-size: 15px; }
.lk2-bat { display: flex; align-items: center; gap: 10px; color: #8a8e98 !important; font-size: 16px !important; } .lk2-bat i { display: flex; gap: 2px; padding: 2px; border-radius: 5px; background: #e2e4e9; }
.lk2-bat em { width: 7px; height: 16px; border-radius: 2px; background: #d0d2d8; } .lk2-bat .l3 em { background: #4cbf6b; } .lk2-bat .l2 em:nth-child(-n+2) { background: #f0943a; } .lk2-bat .l1 em:first-child { background: #e5484d; }
/* công tắc màn hình S100: tab Cấu hình / Công tắc, trang Màn hình & độ sáng */
.sheet:has(.s1p) { top: 0; max-height: none; max-width: 560px; border-radius: 0; padding: 0; background: #f2f3f7; }
.s1p { min-height: 100%; background: #f2f3f7; padding-bottom: calc(24px + var(--safe-b)); }
.s1tabs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 16px; padding: 0 24px; } .s1tabs button { position: relative; padding: 8px 0 18px; font-size: 17px; color: #2a2d34; } .s1tabs button.on { font-weight: 600; } .s1tabs button.on::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 24px; height: 3px; margin-left: -12px; border-radius: 2px; background: #4f5ff0; }
.s1b { padding: 12px 14px 0; } .s1p .chev { color: #a3a7b1; display: grid; } .s1p .chev svg { width: 20px; height: 20px; }
.s1c { display: block; width: 100%; padding: 0 16px; text-align: left; color: inherit; font-size: 16px; } .s1c .grow { flex: 1; min-width: 0; } .s1c small { display: block; margin-top: 3px; color: #8b8f99; font-size: 13px; line-height: 1.3; font-weight: 400; } .s1c b { display: block; font-weight: 400; font-size: 16px; }
.s1m { display: flex; align-items: center; gap: 16px; padding: 16px; min-height: 82px; } .s1ic { flex: none; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle, #4f5ff0 40%, #8d9bf5); color: #fff; display: grid; place-items: center; } .s1ic svg { width: 24px; height: 24px; } .s1th { flex: none; width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.s1cfg { padding: 16px; } .s1h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; } .s1h b { font-weight: 600; font-size: 17px; } .s1h button { display: grid; color: #1f2128; } .s1h svg { width: 24px; height: 24px; }
.s1g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; } .s1g button { color: #1f2128; font-size: 14px; font-weight: 500; } .s1g svg { display: block; width: 100%; margin-bottom: 10px; }
.s1cap { margin: 18px 2px 8px; color: #7a7f8a; font-size: 13.5px; } .s1cap:first-child { margin-top: 12px; }
.s1r { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 62px; padding: 12px 0; text-align: left; color: inherit; font-size: 16px; } .s1r + .s1r { border-top: 1px solid #eef0f4; } .s1r em { font-style: normal; color: #8b8f99; }
.s1lv { display: block; padding-bottom: 20px; } .s1lv > div:first-child { display: flex; align-items: center; margin-bottom: 14px; } .s1lv i { width: 1px; height: 12px; margin: 0 8px; background: #c7cad1; } .s1lv span { color: #a3a7b1; font-size: 14px; }
.s1sl { position: relative; height: 30px; border-radius: 11px; background: #eef1f8; overflow: hidden; touch-action: none; cursor: pointer; } .s1sl u { position: absolute; left: 0; top: 0; bottom: 0; width: calc(32px + (100% - 32px) * var(--p) / 100); border-radius: 11px; background: #4f5ff0; } .s1sl b { position: absolute; top: 0; bottom: 0; width: 32px; left: calc((100% - 32px) * var(--p) / 100); border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1.5px #4f5ff0; }
.s1p .swd { margin: 0; padding: 26px 14px 0; min-height: 0; background: none; border-radius: 0; }
.s1p.thm, .sheet:has(.s1p.thm) { background: #fff; } .thm .rbar { position: sticky; top: 0; z-index: 2; background: #fff; padding-bottom: 10px; border-bottom: 1px solid #eceef2; } .thm .rbar h2 { font-size: 18px; }
.s1lib { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 12px; padding: 10px 16px 0; }
.s1t { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; } .s1t img { display: block; width: 100%; aspect-ratio: 409 / 416; border-radius: 10px; object-fit: cover; } .s1t b { width: 100%; margin-top: 10px; font-weight: 400; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .s1t small { margin: 8px 0 6px; color: #8b8f99; font-size: 12.5px; }
.s1t button { width: 100%; height: 32px; border-radius: 8px; background: #4f5ff0; color: #fff; font-size: 14px; }
.s1use { display: flex; align-items: center; gap: 6px; width: 100%; } .s1use span { flex: none; display: flex; align-items: center; gap: 4px; color: #4f5ff0; font-size: 14px; } .s1use span svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: #4f5ff0; color: #fff; } .s1use button { flex: 1; min-width: 0; }
/* tab Công tắc S100: mặt công tắc 3 phím trong khung xám, phím có gờ dưới */
.s1pan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(81%, 320px); aspect-ratio: 1.037; margin: 0 auto 62px; padding: 8px 11px 13px; border-radius: 18px; background: #e5e6e8; box-shadow: inset 0 0 0 1px #dfe0e2; }
.s1pan button { position: relative; min-width: 0; min-height: 0; background: #f3f3f4; color: #74777e; box-shadow: inset 0 -5px 0 #dcdde0; transition: background .2s; } .s1pan button + button { border-left: 1px solid #d8d9dc; } .s1pan button:first-child { border-radius: 10px 0 0 10px; } .s1pan button:last-child { border-radius: 0 10px 10px 0; }
.s1pan button.on { background: #6a7cd8; color: #fff; box-shadow: inset 0 -5px 0 #5566c0; } .s1pan .ic { position: absolute; top: 12%; left: 50%; width: 52px; height: 52px; margin-left: -26px; } .s1pan .ic img, .s1pan .ic svg { width: 100%; height: 100%; object-fit: contain; }
.s1pan .nm { position: absolute; left: 6px; right: 6px; bottom: 22%; font-size: 13.5px; line-height: 1.3; text-align: center; } .s1pan i { position: absolute; left: 50%; bottom: 9%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #c9cacd; } .s1pan button.on i { background: #f5c842; }
.s1sw .swd-pow { align-items: flex-start; padding: 22px 6px 20px; } .s1sw .swd-pow > i { margin-top: 12px; } .s1sw .swd-pow b { font-size: 21px; font-weight: 600; color: #1f2128; } .s1sw .swd-pow span { line-height: 1.4; }
.s1sw .swd-ic { width: 42px; height: 42px; background: radial-gradient(circle, #4f5ff0 40%, #8d9bf5); } .s1sw .swd-row { min-height: 82px; font-size: 16px; }
.s1pan button:not(.on) .ic { filter: grayscale(1) brightness(1.15); }
/* Panel Hub S1 Plus: đầu trang xanh phẳng, mặt 2 phím, dòng tải ảnh có nút */
.sheet:has(.s1plus), .s1p.s1plus { background: #f5f7f8; } .s1hd { background: #7689ee; padding-bottom: 12px; } .s1hd .rbar { color: #fff; }
.s1plus .swd { padding-top: 46px; } .s1pan.two { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(89%, 340px); aspect-ratio: 1.128; margin-bottom: 40px; padding: 8px; } .s1pan.two button.on { background: linear-gradient(180deg, #6a7cd8, #7c8de0); } .s1pan.two button + button { border-left: 1.5px solid #fff; } .s1pan.two .ic { width: 60px; height: 60px; margin-left: -30px; top: 11%; } .s1pan.two .nm { font-size: 13.5px; bottom: 21%; }
.s1plus .swd-pow { padding: 20px 6px; } .s1plus .swd-pow b { font-size: 16px; } .s1plus .swd-row b { font-size: 16px; font-weight: 500; } .s1plus .swd-row .swd-ic { width: 40px; height: 40px; } .s1plus .swd-row small { line-height: 1.4; }
.s1up { flex: none; height: 28px; padding: 0 16px; border-radius: 999px; background: #7689ee; color: #fff; font-size: 13px; }
/* S1 Plus: Cá nhân hoá, Hình nền, thư viện ảnh ngang */
.sheet:has(.s1p.thm.s1gr), .s1p.thm.s1gr { background: #f1f2f6; } .sheet:has(.s1p.thm.wp), .s1p.thm.wp { background: #f4f7f9; } .s1gr .rbar { border-bottom: 0; }
.s1pr { padding: 16px; min-height: 78px; gap: 12px; } .s1pr img { flex: none; width: 97px; height: 48px; border-radius: 6px; object-fit: cover; } .s1pr b { font-size: 16px; }
.s1look { margin: 22px 2px 12px; font-size: 16px; color: #1f2128; } .s1chip { height: 36px; padding: 0 16px; border-radius: 999px; background: #fff; color: #55585f; font-size: 13px; }
.s1wg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 12px; padding: 10px 16px 0; } .s1wg button { position: relative; display: block; } .s1wg img { display: block; width: 100%; aspect-ratio: 409 / 203; border-radius: 9px; object-fit: cover; }
.s1wg i { position: absolute; top: 13.5%; right: 7%; width: 23px; height: 23px; border-radius: 50%; background: #fff; color: transparent; display: grid; place-items: center; } .s1wg i svg { width: 16px; height: 16px; } .s1wg .on i { background: #4f5ff0; color: #fff; }
.s1wg em { position: absolute; right: 7%; bottom: 13%; padding: 2px 8px; border-radius: 999px; background: #ee9a3a; color: #fff; font-size: 10.5px; line-height: 1.4; font-style: normal; }
.s1lib.w { gap: 38px 12px; } .s1lib.w .s1t img { aspect-ratio: 409 / 211; } .s1lib.w .s1use { justify-content: center; height: 32px; }
/* trang chi tiết cảnh */
.scd h3 { margin: 26px 4px 16px; font-size: 24px; font-weight: 500; color: #1f2128; }
.scd-r { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 14px; margin-bottom: 14px; border-radius: 16px; } .scd-r .grow { flex: 1; min-width: 0; } .scd-r b { display: flex; align-items: center; gap: 4px; font-weight: 400; font-size: 16px; color: #1f2128; } .scd-r small { display: block; margin-top: 6px; color: #8b8f99; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scd-r em { padding: 2px 7px; border-radius: 8px; background: #eff1f7; color: #4f5ff0; font-style: normal; } .scd-i { position: relative; flex: none; width: 36px; height: 36px; display: grid; place-items: center; } .scd-i > img, .scd-i > svg { width: 100%; height: 100%; object-fit: contain; } .scd-i.wait { border-radius: 50%; background: #e9edfb; color: #4f5ff0; } .scd-i.wait svg { width: 20px; height: 20px; }
.scd-m { flex: none; width: 28px; color: #a3a7b1; display: grid; place-items: center; } .scd-m svg { width: 22px; height: 22px; } .scd-e { padding: 40px 0; text-align: center; color: #8b8f99; }
.scd-pop { position: fixed; inset: 0; z-index: 35; background: rgba(40, 44, 50, .28); } .scd-pop > div { position: absolute; right: max(14px, calc(50vw - 266px)); width: 210px; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.14); }
.scd-pop button { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 45px; padding: 0 14px 0 16px; font-size: 14.5px; color: #1f2128; } .scd-pop button + button { border-top: 1px solid #eceef2; } .scd-pop svg { width: 20px; height: 20px; color: #4a4e57; } .scd-pop .del, .scd-pop .del svg { color: #e0533f; }
.scd-r { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab; } .scd-r.dragging { position: relative; z-index: 2; transform: scale(1.02); box-shadow: 0 8px 24px rgba(0,0,0,.16); }
/* nhật ký cảnh / tự động */
.lg-t { display: flex; justify-content: center; gap: 44px; } .rbar .lg-t button { position: relative; width: auto; height: 40px; font-size: 17px; color: #8b8f99; } .rbar .lg-t button.on { color: #1f2128; font-weight: 500; } .lg-t button.on::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 30px; height: 3px; margin-left: -15px; border-radius: 2px; background: #4f5ff0; }
.lg-f { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 12px; } .lg-f button { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 500; color: #1f2128; } .lg-f i { border: 5px solid transparent; border-top-color: #b9bcc4; margin-top: 5px; } .lg-f svg { width: 24px; height: 24px; color: #4a4e57; }
.lg-q { display: block; width: 100%; height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: #e3e4e8; font-size: 15px; outline: none; -webkit-appearance: none; appearance: none; } #logList .s1cap:first-child { margin-top: 24px; }
.lg-r { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 14px 18px 14px 24px; margin-bottom: 12px; text-align: left; color: inherit; border-radius: 14px; } .lg-r .grow { flex: 1; min-width: 0; } .lg-r b { display: block; font-weight: 400; font-size: 16px; color: #1f2128; } .lg-r small { display: block; margin-top: 3px; color: #8b8f99; font-size: 14px; } .lg-r small.bad { color: #e0533f; }
.tile.lg .lg-r, .gp-log .lg-r { align-items: flex-start; padding: 4px 0 8px; margin: 0; border-radius: 0; } .tile.lg .lg-r small, .gp-log .lg-r small { margin-top: 2px; } .tile.lg > small, .gp-log > small { display: block; margin: 6px 0 4px; } .tile.lg .lg-r, .gp-log .lg-r { position: relative; } .tile.lg .lg-r.ln::before, .gp-log .lg-r.ln::before { content: ""; position: absolute; left: 54.5px; top: 14px; bottom: -14px; width: 1px; background: #d5d8de; } .tile.lg .lg-r > i, .gp-log .lg-r > i { position: relative; z-index: 1; } /* đường dọc nối các chấm cùng ngày như app gốc */ /* card Nhật ký an ninh: dòng sát như app gốc, không dính khoảng cách của trang Nhật ký */
.lg-r .chev { display: grid; color: #a3a7b1; transition: transform .15s; } .lg-r .chev svg { width: 20px; height: 20px; transform: rotate(90deg); } .lg-r.open .chev { transform: rotate(180deg); } .lg-r.open { flex-wrap: wrap; padding-right: 18px; } .lg-d { display: block; flex: 0 0 100%; margin-top: 8px; padding-top: 16px; border-top: 1px solid #eceef2; }
.lg-r .lg-s { margin: 0 0 8px; font-size: 13px; } .lg-a { display: flex; align-items: center; gap: 10px; padding: 7px 0; } .lg-a b { font-size: 15px; } .lg-a small { margin-top: 2px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lg-a em { flex: none; color: #8b8f99; font-style: normal; font-size: 13px; } .lg-a em.bad { color: #e0533f; }
.lkpage.moving { background: linear-gradient(180deg, #fbe6cf 0, #f7eee2 420px, #eef0f4 700px); } .lkpage.moving .lk2-st b { color: #ee8a2a; }
.btnrow { display: grid; grid-template-columns: 1fr 96px; gap: 8px; } .btnrow + .btnrow { margin-top: 8px; } .btnrow.ic { grid-template-columns: 44px 1fr; } .btnrow.ic.sc { grid-template-columns: 44px 1fr 70px; } .bic.hide { display: none; } .btnic { width: 44px; border-radius: 10px; background: #f3f4f8; display: grid; place-items: center; box-shadow: inset 0 0 0 1px #e3e5ea; } .btnic.on { box-shadow: inset 0 0 0 2px #4f5ff0; } .btnic img, .btnic svg { width: 30px; height: 30px; object-fit: contain; }
.bic { margin-top: 10px; max-height: 260px; overflow-y: auto; padding: 4px; border-radius: 12px; background: #f6f7fa; } .bic button img { width: 80%; height: 80%; object-fit: contain; } .bic .bic-def { font-size: 11px; color: var(--sub); background: #fff; } /* bảng chọn icon nút công tắc */ .btnsc { align-self: center; color: var(--sub); font-size: 13px; text-align: center; } /* trang Sửa thiết bị: tên + công suất từng nút công tắc */
/* card rộng (2 ô) đo theo ảnh app gốc, tính theo bề ngang card (--u = 1% bề ngang cả card, kể cả lề 16px mỗi bên): icon svg = 28.6%, cách mép trên 4.6% / trái 4.9%;
   tên / dòng phụ lùi 9.6%; giá trị / nút nguồn canh giữa theo icon */
.tile.wide { container-type: inline-size; --u: calc(1cqw + .32px); }
.tile.wide .row1, .tile.lwide .row1 { align-items: center; }
.tile.wide .ic, .tile.lwide .ic { width: calc(28.6 * var(--u)); max-width: none; margin: calc(4.6 * var(--u) - 14px) 0 0 calc(4.9 * var(--u) - 16px); }
.tile.wide .val { margin-right: calc(6.5 * var(--u) - 16px); font-size: max(15px, 4.6 * var(--u)); font-weight: 500; }
.tile.wide .lpow { width: max(40px, 18.8 * var(--u)); height: max(40px, 18.8 * var(--u)); margin-right: calc(7.5 * var(--u) - 16px); } .tile.wide .lpow svg { width: 45%; height: 45%; }
.tile.wide .nm, .tile.wide .meta { margin-left: calc(9.6 * var(--u) - 16px); }
.tile.wide .nm { font-size: max(15px, 4.9 * var(--u)); margin-top: 0; } .tile.wide .meta { font-size: max(12px, 3.8 * var(--u)); margin-top: calc(2.2 * var(--u)); }
.tile.wide > div:last-child { margin-bottom: calc(9 * var(--u) - 12px); }
.lk2-note { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 2; max-width: calc(100% - 28px); padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; line-height: 1.3; text-align: center; pointer-events: none; } /* cửa cuốn: khung camera chỉ là minh hoạ */
/* công tắc màn hình V1, H1 Elite */
.v1tabs { grid-template-columns: auto auto; justify-content: center; gap: 56px; } .s1pan.two.three { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(86%, 340px); aspect-ratio: 1; } .s1pan.two.three .ic { width: 52px; height: 52px; margin-left: -26px; } /* S1 Plus: 3 nút */
.s1pan.two.v1 { aspect-ratio: 1.07; width: min(91%, 340px); margin-bottom: 72px; } .s1pan.two.v1 button:not(.on) { background: linear-gradient(180deg, #f1f2f6, #f8fafb); } .s1pan.two.v1 button:not(.on) .ic { filter: grayscale(1) brightness(1.2); }
.s1ic.v1a { position: relative; font-size: 17px; font-weight: 600; padding-bottom: 7px; box-sizing: border-box; } .s1ic.v1a i { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 8px; font-style: normal; letter-spacing: 1px; line-height: 1; }
.v1h { margin: 22px 2px 12px; } .v1h b { display: block; font-size: 16px; font-weight: 500; color: #33363d; } .v1h small { display: block; margin-top: 4px; color: #8b8f99; font-size: 13px; }
.v1g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 22px 16px; } .v1g button { aspect-ratio: 1; border-radius: 8px; border: 1px solid #e3e7ec; background: linear-gradient(180deg, #fbfcfd, #f3f4f8); box-shadow: 0 3px 0 #d7d9e0; color: #33363d; font-size: 14px; }
.v1n { margin: 12px 14px 0; color: #9a9ea8; font-size: 13px; line-height: 1.45; text-align: center; }
.v1t { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 12px; color: #33363d; } .v1t img { flex: none; width: 76px; height: 76px; border-radius: 8px; object-fit: cover; } .v1t .grow { flex: 1; min-width: 0; } .v1t b { display: block; font-weight: 400; font-size: 16px; line-height: 1.3; } .v1t small { display: block; margin-top: 8px; color: #8b8f99; font-size: 13px; }
.v1b { flex: none; min-width: 80px; height: 34px; padding: 0 12px; border-radius: 14px; border: 1px solid #4f5ff0; color: #4f5ff0; font-size: 14px; } .v1use { flex: none; display: flex; align-items: center; gap: 6px; color: #4f5ff0; font-size: 14px; } .v1use svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: #4f5ff0; color: #fff; }
.v1dl { flex: none; width: 80px; display: grid; place-items: center; } .v1dl i { width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid #cfd3e6; border-top-color: #4f5ff0; animation: ptrspin .7s linear infinite; }
.v1lib .s1b { padding-bottom: 90px; } .v1all { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); width: min(528px, calc(100% - 48px)); z-index: 2; } .v1all button { width: 100%; height: 44px; border-radius: 12px; background: #4f5ff0; color: #fff; font-size: 15px; }
/* núm xoay V1: danh sách màn hình điều khiển */
.v1lib.dial .v1t img, .s1th.round { border-radius: 50%; } .v1pad { padding-bottom: 80px; } .v1h.row { display: flex; align-items: center; justify-content: space-between; } .v1h.row b { font-size: 17px; color: #1f2128; } .v1h.row button { display: grid; color: #1f2128; } .v1h.row svg { width: 24px; height: 24px; }
.v1l { padding: 4px 16px; } .v1s { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 0; } .v1s + .v1s { border-top: 1px solid #e6e8f0; } .v1s .grow { flex: 1; min-width: 0; } .v1s b { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 400; color: #1f2128; } .v1s small { display: block; margin-top: 3px; color: #8b8f99; font-size: 13px; } .v1s em { flex: none; padding: 1px 8px; border: 1px solid #4f5ff0; border-radius: 999px; color: #4f5ff0; font-size: 11.5px; font-style: normal; }
/* kiểu bảo vệ màn hình */
.sheet:has(.s1p.svr), .s1p.svr { background: #f5f7f8; } .svg2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 22px; padding: 12px 22px 0; text-align: center; font-size: 14.5px; color: #1f2128; } .svg2 > div > button:first-child { position: relative; display: block; width: 100%; } .svg2 img { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; } .svg2 span { display: block; margin-top: 10px; }
.svg2 i { position: absolute; top: 7.5%; right: 7.5%; width: 23px; height: 23px; border-radius: 50%; background: #fff; color: transparent; display: grid; place-items: center; } .svg2 i svg { width: 16px; height: 16px; } .svg2 .on i { background: #4f5ff0; color: #fff; }
.svc { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; height: 31px; padding: 0 16px; border: 1px solid #4f5ff0; border-radius: 8px; color: #4f5ff0; font-size: 14px; } .svc svg { width: 13px; height: 13px; }
.s1wg.sv { gap: 26px 12px; } .s1wg.sv i { top: 0; right: 6.4%; margin-top: 6.4%; width: 14.2%; height: auto; aspect-ratio: 1; } /* phủ đúng vòng tròn có sẵn trong ảnh, tính theo bề ngang ô */ .s1wg.sv span { display: block; margin-top: 10px; text-align: center; font-size: 14.5px; color: #1f2128; }
/* cảm biến khói: radar */
.sheet:has(.smk), .s1p.smk { background: linear-gradient(180deg, #fff 0, #f8f8f9 100%); } .smk { --a: 96, 136, 240; --r1: #dfe8fc; --r2: #c2d3f8; --r3: #8fa9f0; --r4: #f6f7fb; text-align: center; } .smk.al { --a: 236, 88, 78; --r1: #fbe1de; --r2: #f8c7c2; --r3: #ef8f86; --r4: #fdf3f2; }
.smk-r { position: relative; display: block; width: min(70vw, 270px); aspect-ratio: 1; margin: 44px auto 0; border-radius: 50%; background: var(--r4); } .smk-r > i { position: absolute; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); } .smk-r .c3 { width: 74%; height: 74%; background: var(--r1); box-shadow: 0 0 0 1px rgba(var(--a), .3); } .smk-r .c2 { width: 47%; height: 47%; background: var(--r2); box-shadow: 0 0 0 1.5px rgba(var(--a), .55); } .smk-r .c1 { width: 25%; height: 25%; background: var(--r3); box-shadow: 0 0 0 1px rgba(var(--a), .6); }
.smk-r .sw2 { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(var(--a), 0) 0 120deg, rgba(var(--a), .05) 120deg, rgba(var(--a), .55) 359.8deg, rgba(var(--a), 0) 360deg); animation: ptrspin 3.2s linear infinite; } .smk-r .sw2::after { content: ""; position: absolute; left: calc(50% - 1px); top: 0; width: 2px; height: 50%; background: rgb(var(--a)); } .smk-r .sw2 b { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; }
.smk-r em { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: #d5def8; } .smk-t { margin-top: 22px; font-size: 16px; color: #33363d; } .smk.al .smk-t { color: #d9452f; } .smk-h { margin: 6px 0 40px; color: #a3a7b1; font-size: 12.5px; }
.smk .s1b { text-align: left; } .smk .s1m { min-height: 82px; } .smk-i { flex: none; width: 42px; height: 42px; } .smk .s1m b { font-size: 16px; } .smk b u { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 2px; border: 1.4px solid #7a7f8a; border-radius: 50%; color: #7a7f8a; font-size: 11px; text-decoration: none; vertical-align: 1px; } .smk-v { font-style: normal; color: #8b8f99; font-size: 14px; } .smk .swd-ic { width: 40px; height: 40px; }
/* trang chi tiết kịch bản (tab Tự động › bấm card): KHI / VÀ / THÌ như app */
.sheet.page.atp { background: #f2f3f7; }
.acard[data-act=autoPage] { cursor: pointer; }
.atp-nav { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; height: 44px; }
.atp-nav h2 { margin: 0; text-align: center; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atp-nav button { width: 40px; height: 40px; display: grid; place-items: center; color: #111; } .atp-nav button svg { width: 24px; height: 24px; } .atp-nav button:first-child svg { transform: rotate(180deg); }
.atp-h { font-size: 26px; font-weight: 700; margin: 22px 4px 0; letter-spacing: .3px; }
.atp-s { color: #8a8f99; font-size: 14px; margin: 6px 4px 12px; } .atp-s:empty { margin-top: 0; }
.atp-c { background: #fff; border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.atp-i { display: flex; align-items: center; gap: 14px; padding: 16px; }
.atp-i .ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; } .atp-i .ic img, .atp-i .ic > svg { width: 100%; height: 100%; object-fit: contain; } .atp-i .ic .aic { width: 40px; height: 40px; }
.atp-i .grow { flex: 1; min-width: 0; } .atp-i b { font-weight: 400; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.atp-i b em { font-style: normal; color: #5b63e6; background: #eef0fd; border-radius: 8px; padding: 1px 8px; font-size: 15px; }
.atp-i small { display: block; color: #8a8f99; font-size: 13px; margin-top: 5px; }
.atp-i .more { width: 30px; height: 30px; flex: none; color: #b4b8c1; display: grid; place-items: center; } .atp-i .more svg { width: 20px; height: 20px; }
.atp-f { border-top: 1px solid var(--line); margin-left: 16px; padding: 11px 16px 13px 0; color: #8a8f99; font-size: 13px; display: flex; gap: 6px; align-items: center; } .atp-f svg { width: 16px; height: 16px; flex: none; }
.atp-add { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; color: #5b63e6; font-size: 16px; text-align: left; }
.atp-add i { width: 32px; height: 32px; border-radius: 50%; background: #e9ebfb; display: grid; place-items: center; } .atp-add i svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.atp-r { display: flex; align-items: center; gap: 12px; padding: 16px; width: 100%; text-align: left; font-size: 16px; } .atp-r + .atp-r { border-top: 1px solid var(--line); }
.atp-r .grow { flex: 1; } .atp-r small { display: block; color: #8a8f99; font-size: 13px; margin-top: 4px; line-height: 1.35; }
.atp-v { color: #8a8f99; font-size: 15px; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .atp-r .chev { color: #b4b8c1; width: 18px; height: 18px; flex: none; } .atp-r .chev svg { width: 18px; height: 18px; }
.atp-top { margin-top: 18px; }
.atp-b { width: 100%; padding: 17px 16px; text-align: center; font-size: 16px; color: #5b63e6; } .atp-b.del { color: #e5484d; }
.atp-id { text-align: center; color: #b0b4bc; font-size: 13px; margin: 60px 0 30px; }
.aum-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .18); }
.aum { position: fixed; width: 220px; background: #fff; border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .14); overflow: hidden; }
.aum button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-size: 16px; color: #111; text-align: left; } .aum button + button { border-top: 1px solid var(--line); }
.aum button svg { width: 22px; height: 22px; color: #555; } .aum button.del, .aum button.del svg { color: #e5484d; }
button.atp-s { display: block; text-align: left; padding: 0; }
.aum.aos { left: 0; right: 0; bottom: 0; width: auto; max-width: 560px; margin: 0 auto; border-radius: 20px 20px 0 0; padding: 8px 0 calc(28px + var(--safe-b)); box-shadow: none; }
.aos-h { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 600; padding: 16px 16px 14px; }
.aum .aos-h button { width: auto; padding: 0; border: 0; color: #777; } .aum .aos-h svg { width: 22px; height: 22px; }
.aum button.aos-o { align-items: center; gap: 14px; padding: 14px 18px; border: 0; } .aos-o .grow { flex: 1; font-size: 16px; } .aos-o small { display: block; color: #8a8f99; font-size: 13px; margin-top: 4px; line-height: 1.35; }
.aum .aos-o svg { width: 24px; height: 24px; color: #5b63e6; flex: none; } .aos-o i { width: 24px; flex: none; }
.atp-t { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 16px; text-align: left; }
.atp-t .tic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; } .atp-t .tic svg { width: 24px; height: 24px; }
.tic.dv { background: #e3effd; color: #3d8be8; } .tic.tm { background: #e9ebfb; color: #5b63e6; } .tic.wx { background: #def5ee; color: #5fcfae; } .tic.geo { background: #efe5fb; color: #8c4fd9; }
.tic.mic { background: #e3effd; color: #3d8be8; } .tic.sec { background: #fde8e8; color: #e5484d; } .tic.au { background: #e9ebfb; color: #4a5be0; }
.atp-t .grow { flex: 1; min-width: 0; } .atp-t b { font-weight: 400; font-size: 17px; display: flex; align-items: center; gap: 6px; } .atp-t b .ti { width: 18px; height: 18px; color: #555; }
.atp-t small { display: block; color: #8a8f99; font-size: 14px; margin-top: 5px; line-height: 1.35; } .atp-t .chev { color: #b4b8c1; width: 18px; height: 18px; flex: none; } .atp-t .chev svg { width: 18px; height: 18px; }
.tic.ml { background: #def5ee; color: #4fc9a4; }
html.framed { --safe-t: 54px; --safe-b: 30px; } /* trong khung iPhone của liveview */
html.framed, html.framed * { scrollbar-width: none; } html.framed ::-webkit-scrollbar { display: none; } /* khung iPhone: không có thanh cuộn chiếm chỗ như trình duyệt máy tính */
.cam .view .cam3d { position: absolute; inset: 0; } .cam .view .cam3d canvas { width: 100%; height: 100%; display: block; } /* camera có cảnh 3D (live-3d.js): nhìn từ ống kính, phủ lên ảnh chụp sẵn */

/* giàn phơi C100 (như app gốc): đầu trang xanh đậm loang dần xuống nền sáng; hình giàn + 2 thanh treo, núm tròn giữa giàn kéo lên / xuống */
.sheet:has(.rkpage) { top: 0; max-height: none; max-width: 560px; border-radius: 0; padding: 0; background: linear-gradient(180deg, #2d53d8 0, #5a7ee6 300px, #a9bbf0 470px, #e4e9f8 600px, #f2f3f7 760px); }
.rk-top { padding-top: var(--safe-t); }
.rk-nav { position: relative; z-index: 2; display: flex; align-items: center; height: 52px; padding: 0 8px; color: #fff; } .rk-nav h2 { flex: 1; margin: 0; text-align: center; font-size: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-nav > button, .rk-nav > span { width: 40px; height: 40px; flex: none; display: grid; place-items: center; color: #fff; } .rk-nav > button svg { width: 24px; height: 24px; } .rk-nav > button:first-child svg { transform: rotate(180deg); }
.rk-hero { position: relative; margin: -52px 0 0; aspect-ratio: 360 / 300; } .rk-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rk-k { position: absolute; left: 50%; top: calc((97 + var(--p) * 1.55) / 300 * 100%); width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #4a63f5; border: 3px solid #fff; color: #fff; display: grid; place-items: center; touch-action: none; cursor: ns-resize; box-shadow: 0 4px 12px rgba(30,50,140,.3); } .rk-k svg { width: 26px; height: 26px; }
.rk-body { padding: 0 16px calc(24px + var(--safe-b, 0px)); } .rk-st { text-align: center; color: #3b4f9c; font-size: 14px; margin: 2px 0 12px; }
.rk-ops button i { background: #e6e9f0 !important; color: #2b2f38 !important; } .rk-ops button svg { width: 26px; height: 26px; }
.rk-sl { position: relative; height: 42px; border-radius: 14px; background: linear-gradient(90deg, #4a63f5 calc(21px + var(--v) * (1% - .42px)), #eef1f9 0); touch-action: none; cursor: pointer; }
.rk-sl b { position: absolute; top: 0; left: calc(var(--v) * (1% - .42px)); width: 42px; height: 42px; border-radius: 14px; background: #fff; border: 2px solid #4a63f5; box-sizing: border-box; }
.rk-play { width: 58px; height: 34px; border-radius: 999px; background: #e6e9f0; display: grid; place-items: center; color: #2b2f38; } .rk-play svg { width: 18px; height: 18px; fill: currentColor; }

.ldial.dimonly .ldisc { background: radial-gradient(circle at 50% 40%, #fff6e6, #f3e3c8 70%); } .ldial.dimonly .lknob { display: none; } /* Dimmer H2: đĩa giữa chỉ là mặt đèn, không chỉnh nhiệt độ màu */

/* trang Tôi (theo app Aqara): tài khoản, nhà + thành viên, 2 thẻ nhanh, banner diễn đàn, nhóm mục */
.me-pf { padding-top: 26px; }
.me-acc { display: flex; align-items: center; gap: 16px; width: 100%; padding: 0 4px; text-align: left; }
.me-ava { flex: none; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(160deg, #a9c3e6, #6f8fbf); display: grid; place-items: end center; overflow: hidden; box-shadow: 0 0 0 2px #fff; }
.me-ava svg { width: 82%; height: 82%; }
.me-ava.big { width: 64px; height: 64px; box-shadow: none; }
.me-ava.logo { background: #fff; place-items: center; } .me-ava.logo img { width: 100%; height: 100%; object-fit: cover; } .me-ava.logo.big { box-shadow: 0 0 0 1px rgba(0,0,0,.06); } /* tài khoản Matter Vietnam Demo: logo trên nền trắng */
.me-nm { flex: 1; min-width: 0; font-size: 20px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chev { flex: none; color: #9a9ea8; } .me-chev svg { width: 18px; height: 18px; }
.me-home { display: flex; align-items: center; margin: 34px 4px 30px; }
.me-hn { flex: 1; min-width: 0; text-align: left; } .me-hn b { display: block; font-size: 17px; font-weight: 500; } .me-hn small { display: block; margin-top: 4px; font-size: 14px; color: #7a7f8a; }
.me-sep { flex: none; width: 1px; height: 32px; background: #d5dae3; margin: 0 26px; }
.me-mem { display: flex; align-items: center; } .me-mem > * + * { margin-left: -6px; }
.me-add { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #4a4e57; box-shadow: 0 1px 4px rgba(30, 50, 90, .1); } .me-add svg { width: 18px; height: 18px; }
.me-qk { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.me-qk button { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 18px 16px; font-size: 15px; text-align: left; }
.me-qi { flex: none; width: 30px; height: 30px; } .me-qi svg { width: 100%; height: 100%; }
.me-ban { position: relative; overflow: hidden; border-radius: 16px; padding: 20px 20px 18px; margin-bottom: 14px; min-height: 112px; color: #fff; cursor: pointer;
  background: linear-gradient(100deg, #4f8ef5 0%, #6aa4f7 55%, #c7dafb 100%); }
.me-ban b { position: relative; z-index: 1; display: block; font-size: 18px; font-weight: 600; max-width: 72%; }
.me-join { position: relative; z-index: 1; display: inline-block; margin-top: 14px; padding: 6px 13px; border-radius: 999px; background: #3f5ff2; font-size: 12.5px; font-weight: 500; }
.me-cubes { position: absolute; right: -4px; bottom: -6px; width: 128px; height: auto; }
.me-grp { background: #fff; border-radius: 16px; padding: 0 18px; margin-bottom: 14px; }
.me-li { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 60px; padding: 10px 0; text-align: left; border-bottom: 1px solid #eceef2; }
.me-li:last-child { border-bottom: 0; }
.me-lic { flex: none; width: 24px; height: 24px; color: #22252b; } .me-lic svg { width: 100%; height: 100%; }
.me-lt { flex: 1; min-width: 0; font-size: 16px; }
.me-lr { flex: none; font-size: 14px; color: #8a8f99; }
.xp .me-card { background: #fff; }
.xp .btn { background: #fff; margin-bottom: 14px; }

/* Trung tâm tin nhắn + Tổng quan vật tư tiêu hao (trang Tôi) */
.sheet:has(.msgp) { background: #f2f3f7; }
.msgp { background: #f2f3f7; }
.msg-bar { position: relative; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: calc(var(--safe-t) + 10px) 10px 0; background: #fff; }
.msg-bar > button { width: 40px; height: 40px; display: grid; place-items: center; color: #1f2128; } .msg-bar > button svg { width: 24px; height: 24px; } .msg-bar > button:first-child svg { transform: scaleX(-1); }
.msg-tabs { display: flex; justify-content: space-around; }
.msg-tabs button { position: relative; height: 44px; font-size: 18px; color: #8b8f99; } .msg-tabs button.on { color: #1f2128; font-weight: 600; }
.msg-tabs button.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 34px; height: 3px; margin-left: -17px; border-radius: 2px; background: #4f5ff0; }
.msg-tabs button > i { position: absolute; top: 4px; right: -9px; width: 8px; height: 8px; border-radius: 50%; background: #ef6b6b; }
.msg-pop { position: absolute; right: 12px; top: calc(100% + 2px); z-index: 5; width: 220px; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(20, 30, 60, .16); display: none; overflow: hidden; }
.msg-pop.open { display: block; }
.msg-pop button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 18px; font-size: 15.5px; text-align: left; } .msg-pop button + button { border-top: 1px solid #eceef2; } .msg-pop svg { flex: none; width: 22px; height: 22px; }
.msg-f { display: flex; justify-content: space-around; padding: 16px 8px 14px; background: #fff; border-bottom: 1px solid #eceef2; } .msg-f.one { justify-content: center; }
.msg-f button { display: flex; align-items: center; gap: 8px; font-size: 16px; color: #1f2128; max-width: 40%; } .msg-f button i { flex: none; border: 5px solid transparent; border-top: 6px solid #1f2128; border-bottom: 0; }
.msg-w { padding: 12px 14px 0; }
.msg-q { margin-bottom: 12px; background: #e6e8ec; }
.msg-c { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.msg-h { display: flex; align-items: center; gap: 12px; } .msg-h b { flex: 1; min-width: 0; font-size: 16px; font-weight: 400; color: #1f2128; }
.msg-i { flex: none; width: 36px; height: 36px; } .msg-i svg { width: 100%; height: 100%; }
.msg-b { margin-top: 12px; font-size: 15px; color: #5d616b; line-height: 1.4; }
.msg-t { margin-top: 8px; font-size: 13px; color: #6d7079; }
.msg-img { display: block; width: 130px; height: 74px; object-fit: cover; border-radius: 8px; margin-top: 12px; }
.msg-p { display: flex; justify-content: flex-end; margin-top: 6px; } .msg-p span { padding: 7px 22px; border-radius: 999px; background: #eceef1; color: #fff; font-size: 14px; }
.msg-e { padding: 48px 0; text-align: center; color: #8a8f99; }
.cs-bar-h { background: #fff; padding-bottom: 10px; } .cs-bar-h h2 { font-size: 18px; }
.cs-c { background: #fff; border-radius: 14px; padding: 4px 18px 16px; margin-bottom: 12px; }
.cs-d { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid #eceef2; }
.cs-pic { flex: none; width: 46px; height: 46px; } .cs-pic svg, .cs-pic img { width: 100%; height: 100%; object-fit: contain; }
.cs-d b { display: block; font-size: 16px; font-weight: 500; } .cs-d small { display: block; margin-top: 2px; font-size: 13.5px; color: #7a7f8a; }
.cs-b { display: flex; align-items: center; gap: 16px; padding: 12px 0; font-size: 15.5px; } .cs-bi { flex: none; width: 40px; height: 40px; } .cs-bi svg { width: 100%; height: 100%; } .cs-n { color: #7a7f8a; font-size: 14px; }
.cs-bar { display: flex; gap: 3px; height: 8px; margin-top: 2px; } .cs-bar i { border-radius: 4px; background: #5cc9b0; } .cs-bar i:nth-child(1) { flex: 1; } .cs-bar i:nth-child(2) { flex: 2.4; } .cs-bar i:nth-child(3) { flex: 10.5; }
.cs-bar.low i { background: #f19a38; } .cs-bar.low i:nth-child(3) { background: #eceef1; }
.cs-bar.one { display: block; border-radius: 4px; background: #eceef1; } .cs-bar.one i { display: block; height: 100%; }
.cs-s { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13.5px; color: #7a7f8a; }
.cs-b .grow { flex: 1; min-width: 0; }
.cs-pic { position: relative; } .cs-pic img.mbadge { position: absolute; right: -4px; bottom: -4px; width: 42%; height: 42%; object-fit: contain; } /* huy hiệu Matter ở góc ảnh thiết bị */
/* Tôi > Cập nhật firmware (như app Aqara): tên nhà xám, thẻ thiết bị + nút Cập nhật viên thuốc, phiên bản, nội dung đánh số; nút Cập nhật tất cả dính đáy */
.fw-h { padding: 10px 16px 0; font-size: 14px; color: #9aa0aa; }
.fwp { min-height: 100%; display: flex; flex-direction: column; } .fwp .msg-w { flex: 1; padding-bottom: 12px; }
.fw-c { padding: 16px 18px 12px; } .fw-d { display: flex; align-items: center; gap: 16px; } .fw-d .grow { flex: 1; min-width: 0; }
.fw-d b { display: block; font-size: 16px; font-weight: 400; line-height: 1.35; } .fw-d small { display: block; font-size: 16px; color: #1d1f24; line-height: 1.35; }
.fw-up { flex: none; padding: 7px 14px; border-radius: 20px; background: #eef1fb; color: #4f5ff0; font-size: 15px; } .fw-up.busy { color: #7a7f8a; min-width: 56px; text-align: center; }
.fw-v { margin-top: 14px; font-size: 13.5px; line-height: 1.55; color: #9aa0aa; }
.fw-n { margin: 10px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.6; color: #1d1f24; } .fw-n li { padding-left: 2px; }
.fw-all { position: sticky; bottom: 0; padding: 12px 20px calc(14px + var(--safe-b)); background: #fff; border-top: 1px solid #eceef2; }
.fw-all button { width: 100%; padding: 14px; border-radius: 12px; background: #4f5ff0; color: #fff; font-size: 17px; } .fw-all button:disabled { background: #a7b3f0; }
/* footer dưới mọi tab (trên thanh menu nổi) */
#app { display: flex; flex-direction: column; } #app > #view { flex: none; } /* footer sát đáy khi trang ngắn */
.credit { margin: auto 0 0; padding-top: 28px; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.credit b { font-weight: 600; }
body.light .credit { color: #8a8f99; }
body.card-editing .credit { display: none; }
.xp-disc p + p { margin-top: 8px; }
.xp-play { display: flex; align-items: center; justify-content: center; gap: 10px; } .xp-play svg { width: 26px; height: 26px; color: #4f5ff0; } /* Chế độ khám phá: nút play cho biết bấm được */

/* ===== THEME TỐI trang Nhà (aqara.js aqTheme -> body.th-dark + body.th-<tên>): khung dùng chung (thẻ tối chữ trắng, nút tròn tối, thanh trượt màu nhấn, thẻ tắt trong mờ);
   mỗi theme chỉ đặt bộ màu: --thA nhấn (thanh trượt, chế độ đang chọn), --thC thẻ, --thT rãnh trượt, --thO thanh trượt khi tắt, --thOff thẻ đang tắt + nền trang */
body.th-clouds #view { --thA: #d9a066; --thC: #2c2624; --thT: #4a3d35; --thO: #6b5747; --thOff: rgba(150, 140, 135, .42); }
body.th-clouds::before { background: linear-gradient(180deg, #6b625e 0%, #77695f 18%, #8a6450 40%, #9a5f45 55%, #a5735a 72%, #8f6d5a 88%, #6f5a4e 100%); }
html:has(body.th-clouds) { background: #6b625e; } body.th-clouds .rooms.stuck { background: rgba(110, 98, 92, .84); }
/* Midnight Black (theo app thật): nền tím than -> tím mận đậm, thẻ gần đen, nhấn xanh dương rực; icon theo nhóm (icons/cards-midnight) */
body.th-midnight #view { --thA: #4a5cf0; --thC: #1c1b26; --thT: #34324a; --thO: #2f3478; --thOff: rgba(120, 112, 150, .32); }
body.th-midnight::before { background: linear-gradient(180deg, #2f2d52 0%, #3a3560 22%, #46365e 45%, #573a5c 62%, #5e3a50 78%, #3a2a3c 100%); }
html:has(body.th-midnight) { background: #2f2d52; } body.th-midnight .rooms.stuck { background: rgba(47, 45, 82, .86); }
/* khung theme tối (trang Nhà - body.th-dark, aqara.js aqTheme): nền nâu ấm như ảnh trời chiều, thẻ tối nâu, chữ trắng, thanh trượt / điểm nhấn cam.
   Biến chỉ đặt trong #view (trang Nhà) - bảng điều khiển / trang chi tiết mở đè lên vẫn màu sáng */
body.th-dark #view { --tile: var(--thC); --tile-off: var(--thC); --text: #fff; --sub: rgba(255, 255, 255, .55); --line: rgba(255, 255, 255, .08); --accent: var(--thA); --accent-soft: rgba(217, 160, 102, .18); color: #fff; }
body.th-dark #view .tile.off .ic { filter: grayscale(.6) brightness(.9); opacity: .6; }
/* Between Clouds: thanh trượt cam trên rãnh nâu tối, núm trắng; nút nguồn tròn tối icon trắng; cảm biến hiện diện theo nền tối (thẻ camera / Xem trực tiếp giữ thanh xanh tím than như app thật) */
body.th-dark #view .lsl:not(.v) { background: rgba(255, 255, 255, .1); } /* thanh dọc: rãnh là ::before (không tô nền cả khung - trước hiện khối vuông quanh rãnh) */
body.th-dark #view .lsl i, body.th-dark #view .lsl.v i, body.th-dark #view .lgt .lsl i { background: var(--thA); }
body.th-dark #view .lsl b, body.th-dark #view .lsl.v b { background: #fff; }
body.th-dark #view .lgt .lsl b { box-shadow: inset 0 0 0 1.5px var(--thA); }
body.th-dark #view .lsl.ct { background: linear-gradient(90deg, #f3d36a, #f8eccd 55%, #fff); }
body.th-dark #view .lsl.v::before { background: var(--thT); }
body.th-dark #view .tile.off .lsl i { background: var(--thO); } body.th-dark #view .tile.off .lsl.v::before, body.th-dark #view .tile.off.lgt .lsl { background: rgba(255, 255, 255, .1); }
body.th-dark #view .lpow, body.th-dark #view .lpow.on, body.th-dark #view .lpow.soft, body.th-dark #view .acc .lpow.on, body.th-dark #view .fanw .lpow.on, body.th-dark #view .tile.off .lpow { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
body.th-dark #view .lcard.curt .lsl { background: var(--thA); } body.th-dark #view .lcard.curt .lsl b { box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
body.th-dark #view .tile.prs { color: #fff; } body.th-dark #view .prs-l { border-right-color: rgba(255, 255, 255, .12); } body.th-dark #view .prs-r small { color: rgba(255, 255, 255, .55); }
body.th-dark #view .tile.en, body.th-dark #view .tile.wt { color: #fff; } body.th-dark #view .en small { color: rgba(255, 255, 255, .55); }
body.th-dark #view .tile.wt { background: var(--thC); } body.th-dark #view .tile.wt > i::before { background: rgba(255, 255, 255, .07); box-shadow: -30px 24px 0 -14px rgba(255, 255, 255, .05); }
body.th-dark #view .gd-m button { color: rgba(255, 255, 255, .85); } body.th-dark #view .gd-m i { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .7); } body.th-dark #view .gd-m .on i { background: var(--thA); color: #fff; }
body.th-dark #view .tile.gds { background: var(--tile); } body.th-dark #view .gds-ic { background: rgba(255, 255, 255, .1); }
body.th-dark #view .ve-l button, body.th-dark #view .tile.lg, body.th-dark #view .tile.lg .lg-r b { color: #fff; }
body.th-dark #view .lg-h { border-bottom-color: rgba(255, 255, 255, .12); } body.th-dark #view .lg-h span, body.th-dark #view .tile.lg .lg-r small { color: rgba(255, 255, 255, .55); }
/* Between Clouds: thẻ máy lạnh / rèm lớn theo app thật - nút ô tối; chế độ đang chọn icon cam; rèm: dải cam 2 bên, khe giữa nâu tối, núm trắng */
body.th-dark #view .lop svg, body.th-dark #view .acc .lop svg, body.th-dark #view .curt .lop svg { background: rgba(255, 255, 255, .1); }
body.th-dark #view .lop svg, body.th-dark #view .curt .lop svg { color: #fff; } body.th-dark #view .lop.on svg { background: rgba(255, 255, 255, .1); color: var(--thA); }
body.th-dark #view .acc .lop { color: rgba(255, 255, 255, .5); } body.th-dark #view .acc .lop svg { color: rgba(255, 255, 255, .5); } body.th-dark #view .acc .lop.on { color: #fff; } body.th-dark #view .acc .lop.on svg { color: var(--thA); }
body.th-dark #view .curt .lop { color: #fff; }
body.th-dark #view .lcs { background: linear-gradient(90deg, var(--thA) calc(var(--x) + 21px), var(--thT) 0, var(--thT) calc(100% - var(--x) - 21px), var(--thA) 0); } body.th-dark #view .lcs b { border-color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
body.th-dark #view .ac-lab { background: var(--thA); }
/* Between Clouds: thẻ thiết bị đang tắt = xám trong mờ (sáng hơn thẻ đang bật, như app thật); giá trị cảm biến / trạng thái chữ trắng (cảnh báo giữ đỏ) */
body.th-dark #view { --tile-off: var(--thOff); }
body.th-dark #view .tile.off { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.th-dark #view .tile.wide .val { color: #fff; } body.th-dark #view .tile.wide .val.alert { color: #ff6b5e; }
/* Between Clouds: thẻ lớn đang tắt (máy lạnh / đèn lớn) - nội dung mờ đi như app thật (nhiệt độ, nút chế độ, thanh trượt xám nhạt), nút nguồn vẫn rõ */
body.th-dark #view .tile.lbig.off .actemp, body.th-dark #view .tile.lbig.off .lops, body.th-dark #view .tile.lbig.off .lsl { opacity: .4; }
body.th-dark #view .tile.lbig.off .lop.on svg { color: rgba(255, 255, 255, .5); }
/* Between Clouds: icon thẻ + icon cảnh tông vàng be như bộ icon app thật (lọc màu bộ icon hiện có - sepia rồi chỉnh sắc / độ bão hoà); thiết bị tắt: nhạt + xám hơn */
/* icon thẻ: bộ vàng be riêng (icons/cards-gold) - không lọc; icon thiết bị / cảnh / hình vẽ (rèm...) chưa có bộ vàng: lọc màu */
body.th-clouds #view .ic img:not(.card-ic), body.th-clouds #view .ic > svg, body.th-clouds #view .scene img, body.th-clouds #view .scene .scene-ic { filter: sepia(.9) saturate(1.25) hue-rotate(-14deg) brightness(1.02) contrast(.95); }
body.th-dark #view .tile.off .ic img { filter: grayscale(.5) brightness(1.05); opacity: .7; }
/* trang chọn giao diện (tab Tôi > Giao diện) */
.thp .th-list { display: grid; gap: 10px; padding: 0 16px; }
.th-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; text-align: left; }
.th-opt b { display: block; font-size: 16px; } .th-opt small { color: var(--sub); font-size: 13px; }
.th-opt.on { box-shadow: 0 0 0 2px var(--accent) inset; }
.th-ck { color: var(--accent); width: 22px; height: 22px; flex: none; } .th-ck svg { width: 100%; height: 100%; }
.th-sw { flex: none; width: 54px; height: 72px; border-radius: 12px; padding: 8px 7px; display: grid; gap: 5px; align-content: end; }
.th-sw i { display: block; height: 12px; border-radius: 4px; }
.th-sw-def { background: linear-gradient(180deg, #8fbfce, #546f84 60%, #343b47); } .th-sw-def i { background: #fbfbfd; }
.th-sw-clouds { background: linear-gradient(180deg, #6b625e, #9a5f45 55%, #8f6d5a); } .th-sw-clouds i { background: #2c2624; } .th-sw-clouds i:first-child { background: #d9a066; width: 70%; }
.th-note { color: var(--sub); font-size: 13px; padding: 4px 18px; }
.th-sw-midnight { background: linear-gradient(180deg, #2f2d52, #46365e 55%, #5e3a50); } .th-sw-midnight i { background: #1c1b26; } .th-sw-midnight i:first-child { background: #4a5cf0; width: 70%; }
