/* ShiftWatch. Nền trắng ngà, mực đen, thẻ trắng, nhiều khoảng trống.
   Màu chỉ để báo trạng thái: xanh đang làm, vàng rảnh, lam nghỉ, đỏ mất kết nối.
   Chỉ dùng độ đậm 400 và 600 vì YaHei trên Windows không có độ đậm trung gian. */
:root {
  color-scheme: light dark;
  --bg: #FAFAF8; --surface: #FFFFFF; --sunken: #F3F2EE;
  --ink: #111110; --ink-2: #5C5B55; --ink-3: #8C8B83;
  --line: #E7E6E1; --line-2: #F0EFEB;
  --primary: #111110; --on-primary: #FFFFFF;
  --go: #12894A; --go-soft: #E4F4EA; --go-bar: #22A35E;
  --idle: #A86A00; --idle-soft: #FBF1DC; --idle-bar: #E2A63B;
  --brk: #2F5FD0; --brk-soft: #E7EDFB; --brk-bar: #7C9CE8;
  --lost: #C2362F; --lost-soft: #FBE9E7;
  --shadow: 0 1px 2px rgba(17,17,16,.04), 0 8px 24px rgba(17,17,16,.05);
  --sky-static: linear-gradient(165deg, #F7F6F2 0%, #F0F3F6 52%, #F6EFE7 100%);
  --r: 14px; --r-s: 9px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110; --surface: #1A1A18; --sunken: #232320;
    --ink: #F3F2EE; --ink-2: #AEADA5; --ink-3: #7F7E76;
    --line: #2C2C29; --line-2: #242421;
    --primary: #F3F2EE; --on-primary: #111110;
    --go: #4CC47F; --go-soft: #15301F; --go-bar: #38B26D;
    --idle: #E5B04E; --idle-soft: #33280F; --idle-bar: #C99432;
    --brk: #8FADF0; --brk-soft: #1B2642; --brk-bar: #5E80D2;
    --lost: #EE7B73; --lost-soft: #3A1A18;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.18);
    --sky-static: linear-gradient(165deg, #111110 0%, #14161B 55%, #17151A 100%);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
/* nền dashboard: gradient tĩnh; trên máy tính canvas của bg.js phủ lên trên lớp này */
html { background: var(--bg); }
body:not(.lp)::before { content: ""; position: fixed; inset: 0; z-index: -2; background: var(--sky-static); }
#sky { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; display: block; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
b, h1, h2, h3, th { font-weight: 600; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; }
input, select, button, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tabular, td, .stat b, .tl-sum, .tl-hours, .tabular-time { font-variant-numeric: tabular-nums; }

/* ---- khung trang ---- */
.logo { width: 26px; height: 26px; color: var(--ink); flex: none; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
/* cột menu bên trái; trên điện thoại chuyển thành thanh trên cùng */
.shell { display: flex; align-items: flex-start; min-height: 100vh; }
.sidebar { position: sticky; top: 0; flex: 0 0 240px; width: 240px; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 18px 12px 14px; overflow-y: auto; background: color-mix(in srgb, var(--surface) 72%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px); border-right: 1px solid var(--line); }
.sidebar .brand { padding: 0 10px; }
.main { flex: 1 1 auto; min-width: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; font-size: 17px; color: var(--ink-2); white-space: nowrap; transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); text-decoration: none; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav a.on { color: var(--on-primary); background: var(--primary); font-weight: 600; }
.ico { width: 20px; height: 20px; flex: none; }
.side-foot { display: flex; flex-direction: column; gap: 10px; padding: 12px 10px 2px; border-top: 1px solid var(--line); }
.side-who { min-width: 0; }
.side-who b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-who span { font-size: 14px; color: var(--ink-2); }
.side-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.langs { display: inline-flex; gap: 8px; font-size: 15px; color: var(--ink-3); }
.langs a.on { color: var(--ink); font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-2); font-size: 15px; }
.linkbtn:hover { color: var(--ink); text-decoration: underline; }
.page { max-width: 1360px; margin: 0 auto; padding: 20px 20px 48px; }
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 14px; min-height: 40px; }
.page-head .pagebar { margin: 0; }
.page-head h1 { font-size: 30px; letter-spacing: -.02em; line-height: 1.2; }
.spacer { flex: 1; }
.banner { padding: 9px 24px; font-size: 15px; text-align: center; background: var(--sunken); }
.banner a { text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; }
.banner.grace { background: var(--idle-soft); color: var(--idle); }
.banner.viewas { background: var(--brk-soft); color: var(--brk); }

/* ---- thành phần chung ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--ink-3); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); font-weight: 600; }
.btn.primary:hover { opacity: .86; }
.btn.danger { color: var(--lost); }
.btn.danger:hover { border-color: var(--lost); }
.btn.ghost { background: none; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: var(--ink); background: var(--sunken); }
.btn.small { height: 34px; padding: 0 12px; font-size: 15px; }
.btn.block { width: 100%; height: 46px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h2 { font-size: 19px; margin-bottom: 10px; }
.card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.section-title { font-size: 19px; margin: 20px 0 10px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 15px; }
.tiny { font-size: 14px; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.num { text-align: right; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 15px; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; height: 44px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); }
input:focus, select:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: transparent; }
input[type=date] { width: auto; }
.hint { display: block; font-size: 14px; color: var(--ink-3); margin-top: 5px; }
.flash { padding: 10px 14px; border-radius: var(--r-s); margin-bottom: 16px; font-size: 15px; background: var(--sunken); }
.flash.ok { background: var(--go-soft); color: var(--go); }
.flash.err { background: var(--lost-soft); color: var(--lost); }
.flash.warn { background: var(--idle-soft); color: var(--idle); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 14px; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.badge.b-ok { background: var(--go-soft); color: var(--go); }
.badge.b-warn { background: var(--idle-soft); color: var(--idle); }
.badge.b-err { background: var(--lost-soft); color: var(--lost); }
.badge.b-info { background: var(--brk-soft); color: var(--brk); }
.badge.b-muted { background: var(--sunken); color: var(--ink-3); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.empty { padding: 56px 24px; text-align: center; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px dashed var(--line); border-radius: var(--r); }
.empty .btn { margin-top: 14px; }
.code { font-family: var(--mono); font-size: 15px; word-break: break-all; }
.copyline { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--sunken); border-radius: var(--r-s); }
.copyline > :first-child { flex: 1; min-width: 0; }
.pagebar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pagebar form { display: inline-flex; align-items: center; gap: 8px; }
.seg-ctl { display: inline-flex; padding: 3px; gap: 2px; background: color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 9px; }
.seg-ctl a { padding: 5px 12px; border-radius: 7px; color: var(--ink-2); font-size: 15px; white-space: nowrap; }
.seg-ctl a:hover { color: var(--ink); text-decoration: none; }
.seg-ctl a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.daynav { display: inline-flex; align-items: center; gap: 6px; }
.daynav .btn { width: 40px; padding: 0; font-size: 19px; }
.daynav .btn.txt { width: auto; padding: 0 12px; font-size: 16px; }
.daynav .d { color: var(--ink-2); margin: 0 6px; }

/* ---- số tổng ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-bottom: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 12px 18px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); margin: -1px 0 0 -1px; }
.stat b { display: block; font-size: 30px; line-height: 1.2; letter-spacing: -.02em; }
.stat span { font-size: 15px; color: var(--ink-2); }
.stat.s-work b { color: var(--go); }
.stat.s-brk b { color: var(--brk); }
.stat.s-idle b { color: var(--idle); }
.stat.s-lost b { color: var(--lost); }

/* ---- bảng ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 15px; font-weight: 400; color: var(--ink-2); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--sunken) 55%, transparent); }
.tbl .name { font-weight: 600; }
.tbl .next { font-size: 13px; color: var(--brk); margin-left: 3px; }
.plain { width: 100%; border-collapse: collapse; }
.plain th { text-align: left; font-weight: 400; color: var(--ink-2); padding: 7px 16px 7px 0; white-space: nowrap; }
.plain td { padding: 7px 0; }
.bar-track { display: inline-block; width: 72px; height: 5px; border-radius: 3px; background: var(--sunken); margin-right: 10px; vertical-align: middle; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.chart { overflow-x: auto; padding: 12px 14px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; box-shadow: var(--shadow); }
.chart .axis { stroke: var(--line); }
.chart .bar { fill: var(--ink); opacity: .85; }
.chart .bar.today { fill: var(--go-bar); opacity: 1; }
.chart .lbl { fill: var(--ink-3); font-size: 13px; }
.add-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 12px 14px; }
.inline-form { display: flex; flex: 1 1 420px; flex-wrap: wrap; gap: 8px; }
.inline-form input { flex: 1 1 170px; width: auto; }
.inline-form select { flex: 0 1 130px; width: auto; }
.team-tabs { align-items: stretch; }
.tab-btn { background: none; border: 0; border-bottom: 2px solid transparent; margin-left: auto; cursor: pointer; }
.team-line { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.team-rename { display: flex; flex: 1; gap: 8px; min-width: 0; align-items: center; }
.team-rename input { flex: 1; min-width: 0; width: auto; }
.team-sub { margin: -4px 0 12px; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.45; margin: 4px 0 14px; color: var(--ink-2); }
.agree input { margin-top: 3px; flex: none; }
.dl-steps { margin: 10px 0 0; padding-left: 20px; list-style: decimal; }
.dl-steps li { margin-bottom: 4px; }
.dl-cmd { display: block; margin-top: 6px; padding: 8px 10px; font-size: 13px; overflow-x: auto; white-space: nowrap; }

/* ---- thẻ nhân viên ở trang Thực thời ---- */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.emp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.emp-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(17,17,16,.05), 0 16px 36px rgba(17,17,16,.1); }
.emp-shot { display: block; aspect-ratio: 16/9; background: var(--sunken); position: relative; }
.emp-shot img { width: 100%; height: 100%; object-fit: cover; }
.noshot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-size: 15px; color: var(--ink-3); }
.emp-body { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.emp-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.emp-name a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.st i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.st-work { color: var(--go); } .st-work i { background: var(--go-bar); }
.st-idle { color: var(--idle); } .st-idle i { background: var(--idle-bar); }
.st-break { color: var(--brk); } .st-break i { background: var(--brk-bar); }
.st-lost { color: var(--lost); } .st-lost i { background: var(--lost); }
.emp-meta { font-size: 15px; color: var(--ink-2); }
.emp-win { font-size: 14px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.steps li { color: var(--ink-3); }
.steps .no { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sunken); font-size: 14px; margin-bottom: 8px; }
.steps b { display: block; }
.steps p { font-size: 15px; margin: 2px 0 10px; }
.steps .now { color: var(--ink); }
.steps .now .no { background: var(--primary); color: var(--on-primary); }
.steps .done .no { background: var(--go-soft); color: var(--go); }

/* ---- dòng thời gian giờ làm ---- */
.tl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; box-shadow: var(--shadow); }
.tl-inner { min-width: 860px; }
.tl-row { display: grid; grid-template-columns: 180px 1fr 180px; align-items: center; border-bottom: 1px solid var(--line-2); }
.tl-row:last-child { border-bottom: 0; }
.tl-row > * { padding: 8px 14px; min-width: 0; }
.tl-head { color: var(--ink-3); font-size: 14px; border-bottom: 1px solid var(--line); }
.tl-who .n { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-who .p { display: block; font-size: 14px; color: var(--ink-3); }
.tl-who .carry { color: var(--brk); }
.tl-hours { position: relative; height: 22px; padding: 0 !important; }
.tl-hours span { position: absolute; top: 0; white-space: nowrap; transform: translateX(-1px); }
.tl-track { position: relative; height: 30px; padding: 0 !important; background: var(--sunken); border-radius: 6px; overflow: hidden; }
.tl-row > .tl-track { margin: 0; }
.tl-track .gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); opacity: .6; }
.tl-seg { position: absolute; top: 5px; bottom: 5px; background: var(--go-bar); border-radius: 3px; }
.tl-seg.idle { background: var(--idle-bar); }
.tl-seg.brk { background: repeating-linear-gradient(135deg, var(--brk-bar) 0 3px, transparent 3px 6px), var(--brk-soft); }
.tick { position: absolute; top: 0; bottom: 0; width: 7px; margin-left: -3px; }
.tick::after { content: ""; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; background: rgba(255,255,255,.75); }
.tick:hover::after { top: 0; bottom: 0; background: var(--ink); width: 2px; }
.tick.idle::after { background: rgba(0,0,0,.45); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--lost); }
.tl-sum { font-size: 15px; text-align: right; }
.tl-sum .t { color: var(--ink-2); font-size: 14px; }
.tl-sum b { display: block; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.tl-legend span { display: inline-flex; align-items: center; gap: 7px; }
.tl-legend i { width: 16px; height: 8px; border-radius: 2px; background: var(--go-bar); }
.tl-legend .lg-idle { background: var(--idle-bar); }
.tl-legend .lg-brk { background: repeating-linear-gradient(135deg, var(--brk-bar) 0 3px, var(--brk-soft) 3px 6px); }
.tl-legend .lg-shot { width: 2px; height: 12px; background: var(--ink-3); border-radius: 0; }
#tick-preview { position: fixed; z-index: 40; width: 280px; aspect-ratio: 16/9; pointer-events: none; background: var(--sunken); border-radius: 8px; border: 1px solid var(--line); box-shadow: var(--shadow); object-fit: contain; }

/* ---- tường ảnh ---- */
.tabs { display: flex; gap: 2px; overflow-x: auto; margin-bottom: 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tab { padding: 8px 12px; color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab em { font-style: normal; font-weight: 400; font-size: 14px; color: var(--ink-3); margin-left: 3px; }
.hour-group { margin-bottom: 16px; content-visibility: auto; contain-intrinsic-size: auto 340px; }
.hour-label { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.shot a { display: block; aspect-ratio: 16/9; background: var(--sunken); border-radius: 8px; overflow: hidden; outline: 1px solid var(--line); outline-offset: -1px; }
.shot img { width: 100%; height: 100%; object-fit: contain; transition: opacity .12s; }
.shot a:hover img { opacity: .88; }
.shot figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 15px; }
.shot .win-title { font-size: 14px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,9,.93); display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 24px 72px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 92px); min-width: 40vw; object-fit: contain; border-radius: 4px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 16px; top: 50%; margin-top: -22px; }
.lb-next { right: 16px; top: 50%; margin-top: -22px; }
.lb-cap { color: #D6D5CF; font-size: 15px; margin-top: 12px; text-align: center; }

/* ---- hộp popover ---- */
[popover] { width: min(440px, calc(100vw - 32px)); margin: auto; padding: 22px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
[popover]::backdrop { background: rgba(10,10,9,.4); }
.pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pop-head h3 { font-size: 18px; }
.pop-x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-3); }
.pop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
details.adv { margin-bottom: 16px; }
details.adv summary { cursor: pointer; color: var(--ink-2); font-size: 15px; margin-bottom: 14px; }

/* ---- đăng nhập, hoá đơn ---- */
.auth-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 28px 30px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.auth-card > .brand { margin-bottom: 20px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.01em; margin-bottom: 16px; }
.auth-foot { margin-top: 18px; font-size: 15px; color: var(--ink-2); }
.auth-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-lang { margin-top: 18px; }
.invoice-amount { font-size: 22px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.qr { display: inline-block; padding: 10px; background: #fff; border-radius: 8px; }

/* ---- trang chủ: cuộn trang là đi qua một ngày ----
   Máy tính: canvas WebGL cố định phía sau (bg.js), các phần trong suốt, màu chữ đổi theo trời.
   Di động: mỗi phần có gradient tĩnh riêng nối vào phần sau, không có script nền. */
.lp { background: #BCD8EF; color: #111110; overflow-x: clip; }
.lp-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.lp-top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; transition: background .35s; }
.sky-live .lp-top { -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.sky-live[data-tone="ink"] .lp-top { background: rgba(255,255,255,.22); }
.sky-live[data-tone="light"] .lp-top { background: rgba(8,10,30,.28); }
.lp-nav { display: flex; align-items: center; gap: 22px; height: 64px; }
.lp-links { display: flex; align-items: center; gap: 16px; font-size: 16px; margin-left: auto; white-space: nowrap; }
.lp-top .brand, .lp-top .logo, .lp-links, .lp-links .langs, .lp-links .langs a.on { color: var(--sky-ink, #111110); }
.lp-links .langs { opacity: .8; }
.lp-top .logo path { stroke: var(--logo-cut, #FFFFFF); }
.sky-live[data-tone="light"] .lp-top { --logo-cut: #111110; }
.lp-links .btn.primary, .sec .btn.primary { background: #111110; color: #fff; border-color: #111110; }
.lp .btn:not(.primary) { background: rgba(255,255,255,.72); color: #111110; border-color: rgba(17,17,16,.12); }
.btn.big { height: 46px; padding: 0 22px; font-size: 17px; }
.sec { --sky-ink: #111110; --sky-ink-2: rgba(17,17,16,.72); position: relative; color: var(--sky-ink); padding: 56px 0; background: linear-gradient(180deg, var(--a), var(--b)); transition: color .35s; }
.sec[data-tone-static="light"] { --sky-ink: #FFFFFF; --sky-ink-2: rgba(255,255,255,.78); }
.sec-hero { padding: 92px 0 48px; }
.sec-hero h1, .copy h2 { text-wrap: balance; }
/* tiếng Trung xuống dòng ở dấu câu, không cắt giữa cụm từ */
html[lang^="zh"] h1, html[lang^="zh"] h2 { word-break: keep-all; overflow-wrap: anywhere; }
.lead, .copy p { text-wrap: pretty; }
.sec-hero h1 { font-size: clamp(38px, 4.6vw, 62px); line-height: 1.14; letter-spacing: -.028em; margin: 0 0 16px; }
.lead { font-size: 21px; line-height: 1.55; color: var(--sky-ink-2); margin: 0 0 22px; }
.hero-cta { justify-content: center; }
.when { font-size: 17px; font-weight: 600; letter-spacing: .06em; color: var(--sky-ink-2); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.copy h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.16; letter-spacing: -.022em; margin-bottom: 12px; }
.copy p:not(.when) { font-size: 21px; line-height: 1.55; color: var(--sky-ink-2); max-width: 600px; }
.copy.center { text-align: center; margin-bottom: 26px; }
.copy.center p:not(.when) { margin: 0 auto; max-width: 760px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ticks { margin-top: 12px; }
.ticks li { position: relative; padding: 5px 0 5px 24px; font-size: 18px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 15px; width: 10px; height: 4px; border-radius: 2px; background: currentColor; opacity: .55; }
/* giờ đang cuộn tới, chỉ có trên máy tính */
.dayclock { display: none; }
.sky-live .dayclock { position: fixed; right: 26px; top: 50%; z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 12px; transform: translateY(-50%); color: var(--clock-ink, #111110); transition: color .35s; pointer-events: none; }
.dayclock b { font-size: 15px; font-variant-numeric: tabular-nums; writing-mode: vertical-rl; white-space: nowrap; letter-spacing: .04em; }
.dayclock-rail { width: 2px; height: 180px; border-radius: 2px; background: currentColor; opacity: .9; position: relative; overflow: hidden; background-color: rgba(127,127,127,.35); }
.dayclock-rail i { position: absolute; inset: 0; background: currentColor; transform-origin: top; transform: scaleY(0); }
/* trời thật: các phần trong suốt, màu chữ theo trời hiện tại */
.sky-live body.lp { background: none; }
.sky-live .sec { background: none; }
.sky-live[data-tone="ink"] { --clock-ink: #111110; }
.sky-live[data-tone="light"] { --clock-ink: #FFFFFF; }
.sky-live[data-tone="ink"] .sec, .sky-live[data-tone="ink"] .lp-top { --sky-ink: #111110; --sky-ink-2: rgba(17,17,16,.72); }
.sky-live[data-tone="light"] .sec, .sky-live[data-tone="light"] .lp-top { --sky-ink: #FFFFFF; --sky-ink-2: rgba(255,255,255,.8); }
.sky-live[data-tone="light"] .lp-links .btn.primary, .sky-live[data-tone="light"] .sec .btn.primary { background: #FFFFFF; color: #111110; border-color: #FFFFFF; }
.sky-live .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.sky-live .reveal.in { opacity: 1; transform: none; }
/* cửa sổ sản phẩm luôn sáng, không đổi theo trời */
.win { --ink: #111110; --ink-2: #5C5B55; --ink-3: #8C8B83; --line: #E7E6E1; --sunken: #F3F2EE; --surface: #FFFFFF; --go: #12894A; --go-bar: #22A35E; --idle: #A86A00; --idle-bar: #E2A63B; --brk: #2F5FD0; --brk-bar: #7C9CE8; color: #111110; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 6px rgba(20,20,40,.08), 0 30px 80px rgba(20,20,60,.22); text-align: left; }
.win-bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-bottom: 1px solid #EEEDE8; background: #FBFBF9; }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #E2E1DB; }
.win-bar span { margin-left: auto; font-size: 13px; color: #8C8B83; }
.win-body { padding: 16px 18px 18px; }
.stage { margin-top: 32px; }
.mini-stats { display: flex; gap: 32px; margin-bottom: 12px; }
.mini-stats b { display: block; font-size: 28px; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 14px; color: #8C8B83; }
.mini-stats .s-go b { color: #12894A; }
.mini-stats .s-br b { color: #2F5FD0; }
.mini-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mini-cards figure, .wall figure { min-width: 0; }
.mini-cards img, .wall img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #F0EFEB; outline: 1px solid rgba(17,17,16,.06); outline-offset: -1px; }
.mini-cards figcaption { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 15px; margin-top: 8px; }
.mini-cards .st { font-size: 14px; }
.wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.wall figcaption { font-size: 15px; margin-top: 8px; color: var(--sky-ink-2); font-variant-numeric: tabular-nums; }
.demo-tl { padding: 18px 24px; }
.demo-row { display: grid; grid-template-columns: 70px 1fr 84px; gap: 12px; align-items: center; padding: 6px 0; font-size: 15px; }
.demo-track { position: relative; height: 26px; background: #F3F2EE; border-radius: 6px; overflow: hidden; }
.demo-track i { position: absolute; top: 5px; bottom: 5px; background: #22A35E; border-radius: 3px; }
.demo-track i.b { background: #7C9CE8; }
.demo-track i.a { background: #E2A63B; }
.demo-row span { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.demo-row span.muted-live { font-weight: 400; color: #5C5B55; }
/* cửa sổ client */
.client-wrap { display: flex; justify-content: center; }
.client { --ink: #111110; --go: #12894A; --go-bar: #22A35E; --brk: #2F5FD0; --brk-bar: #7C9CE8; width: 340px; padding: 14px; background: #FAFAF8; color: #111110; border-radius: 16px; box-shadow: 0 2px 6px rgba(20,20,40,.08), 0 30px 70px rgba(20,20,60,.2); }
.c-name { font-weight: 600; margin-bottom: 12px; }
.c-card { background: #fff; border: 1px solid #E7E6E1; border-radius: 14px; padding: 16px; }
.c-time { font-size: 42px; font-weight: 600; letter-spacing: -.03em; line-height: 1.25; margin-top: 6px; font-variant-numeric: tabular-nums; }
.c-blue { color: #2F5FD0; }
.c-sub { font-size: 15px; color: #5C5B55; margin-bottom: 14px; }
.client .c-btn { display: flex; width: 100%; margin-top: 8px; pointer-events: none; }
.c-note { font-size: 14px; color: #5C5B55; margin-top: 12px; }
/* thanh ca đêm */
.nightbar { max-width: 860px; margin: 0 auto; }
.nb-track { position: relative; height: 64px; border-radius: 14px; background: #10163A; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.nb-mid { position: absolute; left: 50%; top: -10px; bottom: -10px; width: 1px; background: rgba(255,255,255,.4); }
.nb-shift { position: absolute; left: 16.6%; right: 16.7%; top: 12px; bottom: 12px; border-radius: 8px; background: linear-gradient(90deg, #E2A63B, #F4BE6A); display: flex; align-items: center; justify-content: center; }
.nb-shift em { font-style: normal; font-weight: 600; color: #1B1505; font-variant-numeric: tabular-nums; }
.nb-labels { position: relative; height: 34px; margin-top: 14px; font-size: 15px; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.nb-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.nb-note { text-align: center; font-size: 16px; color: rgba(255,255,255,.72); }
/* bảng giá ngay đầu trang */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: center; }
.hero-copy .btn-row { justify-content: flex-start; }
.hero-price { color: #111110; background: #fff; border-radius: 18px; padding: 22px 24px; box-shadow: 0 2px 6px rgba(20,20,40,.08), 0 24px 60px rgba(20,20,60,.18); }
.hero-price .amt, .price-main .amt { font-size: 68px; font-weight: 600; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-price .per { color: #5C5B55; font-size: 18px; margin: 4px 0 10px; }
.hero-price .ticks { margin: 0 0 14px; }
.hero-price .ticks li { font-size: 17px; }
.sec .hero-price .btn.primary, .sky-live[data-tone="light"] .sec .hero-price .btn.primary { background: #111110; color: #fff; border-color: #111110; }
.price-more { display: block; text-align: center; margin-top: 10px; font-size: 16px; color: #5C5B55; text-decoration: underline; text-underline-offset: 3px; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.roles article { color: #111110; background: #fff; border-radius: 14px; padding: 18px 20px; }
.roles h3 { font-size: 22px; margin-bottom: 6px; }
.roles p { font-size: 17px; color: #4A4A44; line-height: 1.5; }
.sec-end { padding-bottom: 56px; }
.sky-live .sec-end .btn:not(.primary) { background: rgba(255,255,255,.9); }
/* các trang giới thiệu dùng chung đầu và chân trang */
.site-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.site-links::-webkit-scrollbar { display: none; }
.site-links a { padding: 6px 12px; border-radius: 999px; font-size: 16px; white-space: nowrap; color: var(--sky-ink, var(--ink)); }
.site-links a:hover { text-decoration: none; background: color-mix(in srgb, currentColor 10%, transparent); }
.site-links a.on { font-weight: 600; background: color-mix(in srgb, currentColor 12%, transparent); }
body.site { --sky-ink: var(--ink); --sky-ink-2: var(--ink-2); --logo-cut: var(--bg); }
body.site .lp-top { position: sticky; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
body.site .lp-links .btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.site-main { min-height: 56vh; padding-top: 24px; padding-bottom: 40px; }
.site-hero { text-align: center; padding: 20px 0 22px; }
.site-hero h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.16; letter-spacing: -.025em; margin-bottom: 10px; text-wrap: balance; }
.site-hero .lead { color: var(--ink-2); margin: 0 auto 16px; max-width: 760px; text-wrap: pretty; }
.site-hero .hint { margin-top: 10px; }
.price-page { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 12px; align-items: start; }
.price-main .per { color: var(--ink-2); font-size: 18px; margin: 4px 0 12px; }
.calc-total { display: flex; align-items: baseline; gap: 8px; }
.calc-total b { font-size: 48px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.calc-total span { font-size: 18px; color: var(--ink-2); }
.steps-text { list-style: decimal; padding-left: 22px; font-size: 18px; }
.steps-text li { padding: 3px 0; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.feat-grid.two { grid-template-columns: repeat(2, 1fr); }
.feat-grid .card { margin: 0; }
.feat-grid h2 { font-size: 21px; margin-bottom: 6px; }
.feat-grid p { font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.num-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 600; margin-bottom: 8px; }
.faq { max-width: 900px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 0 18px; }
.faq summary { cursor: pointer; font-size: 19px; font-weight: 600; padding: 13px 0; }
.faq p { font-size: 18px; line-height: 1.55; color: var(--ink-2); padding-bottom: 14px; }
.legal { max-width: 860px; margin: 0 auto; padding: 12px 0; }
.legal h1 { font-size: 40px; letter-spacing: -.02em; margin-bottom: 4px; }
.legal h2 { font-size: 22px; margin: 18px 0 4px; }
.legal p { font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.legal p + p { margin-top: 10px; }
/* menu sổ xuống cho màn hình nhỏ */
.site-menu { display: none; position: relative; }
.site-menu summary { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -8px; cursor: pointer; list-style: none; color: var(--sky-ink, var(--ink)); border-radius: 10px; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary svg { width: 26px; height: 26px; }
.site-menu .menu-close { display: none; }
.site-menu[open] .menu-open { display: none; }
.site-menu[open] .menu-close { display: block; }
.menu-panel { --ink: #111110; --ink-3: #8C8B83; position: absolute; top: 50px; right: -8px; z-index: 40; width: min(320px, calc(100vw - 24px)); padding: 8px; color: #111110; background: #fff; border-radius: 16px; box-shadow: 0 2px 6px rgba(20,20,40,.1), 0 20px 50px rgba(20,20,60,.26); }
.menu-panel > a { display: block; padding: 12px 14px; font-size: 18px; border-radius: 10px; }
.menu-panel > a:hover { text-decoration: none; background: #F3F2EE; }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; padding: 12px 14px 8px; border-top: 1px solid #EEEDE8; }
.menu-foot .langs { width: 100%; gap: 14px; font-size: 16px; margin-bottom: 4px; color: #8C8B83; }
.menu-foot .langs a, .menu-foot .langs a.on { color: inherit; }
.menu-foot .langs a.on { color: #111110; font-weight: 600; }
.menu-foot .btn { flex: 1; height: 44px; }
.lp .menu-foot .btn:not(.primary) { background: #fff; color: #111110; border-color: #E7E6E1; }
.sky-live[data-tone="light"] .sec .menu-foot .btn.primary, .menu-foot .btn.primary { background: #111110; color: #fff; border-color: #111110; }
/* tìm nhân viên */
.side-search input { height: 40px; font-size: 15px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.emp-search { display: flex; gap: 8px; margin-bottom: 12px; }
.emp-search input { flex: 1; min-width: 0; width: auto; }
.search-note { font-size: 15px; color: var(--ink-2); margin-bottom: 10px; }
.search-note a { text-decoration: underline; text-underline-offset: 3px; margin-left: 8px; }
.narrow { max-width: 640px; }
.dl-grid .card h2 { font-size: 24px; margin-bottom: 4px; }
.dl-grid .btn { margin: 12px 0 8px; }
.buy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; margin-top: 12px; align-items: start; }
.buy-grid .card { margin: 0; }
.grid2.tight { grid-template-columns: 1fr 1fr; }
.order { margin: 4px 0 14px; padding: 12px 14px; background: var(--sunken); border-radius: 10px; }
.order h2 { font-size: 17px; margin-bottom: 8px; }
.order-row { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; font-size: 16px; }
.order-row[hidden] { display: none; }
.order-row span { color: var(--ink-2); }
.order-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-row.off b, .order-row.off span { color: var(--go); }
.order-row.total { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 18px; }
.order-row.total span { color: var(--ink); font-weight: 600; }
.order-sep { height: 1px; background: var(--line); margin: 6px 0; }
.order .hint { margin-top: 6px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.team-row > div { flex: 1; min-width: 0; }
.site-foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 26px 0 20px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 18px; }
.foot-grid b { display: block; margin-bottom: 6px; font-size: 17px; }
.foot-grid a:not(.brand) { display: block; padding: 3px 0; font-size: 16px; color: var(--ink-2); }
.foot-brand .logo { color: var(--ink); }
.foot-brand .logo path { stroke: var(--bg); }
.foot-brand p { margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.foot-end { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 15px; color: var(--ink-2); }

@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: sticky; z-index: 20; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 14px 6px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .sidebar .brand { padding: 0; }
  .side-foot { margin-left: auto; padding: 0; border: 0; }
  .side-who, .side-search { display: none; }
  .nav { order: 3; flex: 1 0 100%; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 12px; font-size: 16px; }
  .nav .ico { display: none; }
  .page { padding: 14px 14px 36px; }
  .lp-wrap { padding: 0 16px; }
  .lp-nav { height: 60px; justify-content: space-between; }
  /* gom cả menu vào nút bấm, chỉ còn logo và nút */
  .site-links, .lp-links { display: none; }
  .site-menu { display: block; }
  /* thanh trên nằm trong luồng trang: tiêu đề không bị che dù chữ dài ở ngôn ngữ nào */
  .lp-top { position: relative; }
  /* đồng hồ của ngày: thành nhãn nhỏ ở góc, không che nội dung */
  .sky-live .dayclock { top: auto; right: 12px; bottom: 12px; transform: none; padding: 3px 10px; border-radius: 999px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background: rgba(127,127,127,.22); }
  .dayclock b { writing-mode: horizontal-tb; }
  .dayclock-rail { display: none; }
  body.site .lp-top { position: relative; }
  .sec { padding: 36px 0; }
  .sec-hero { padding: 22px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .lead { font-size: 19px; margin-bottom: 16px; }
  .copy p:not(.when) { font-size: 19px; }
  .split { grid-template-columns: 1fr; gap: 22px; }
  .split.flip .client-wrap { order: 2; }
  .stage { margin-top: 24px; }
  .mini-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mini-stats { gap: 20px; }
  .win-body { padding: 14px; }
  .wall { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .demo-row { grid-template-columns: 50px 1fr 66px; gap: 8px; }
  .roles, .price-page, .feat-grid, .feat-grid.two { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .win, .client { box-shadow: 0 2px 6px rgba(20,20,40,.08), 0 14px 34px rgba(20,20,60,.16); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 24px; }
  .hide-m { display: none !important; }
  .auth-card { padding: 22px 20px 18px; }
  .lightbox { padding: 16px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; margin: 0; }
}
