:root {
  --bar: #1e2235; --bar-2: #2a2f48; --bar-fg: #e8eaf3; --bar-muted: #9aa0bd;
  --bg: #f2f3f8; --card: #fff; --line: #ebedf2; --text: #454754; --head: #2b2d38; --muted: #8b8fa3;
  --p-blue: #0067AC; --a-primary: #3398dc; --hl: #ff7a1a; --ok: #2AA27E; --err: #e24c4b; --note-bg: #fff6e5;
  --side-w: 256px;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a { color: var(--p-blue); text-decoration: none; }

/* ===== khung trang ===== */
.topbar { position: fixed; inset: 0 0 auto 0; height: 54px; background: var(--bar); color: var(--bar-fg); display: flex; align-items: center; gap: 14px; padding: 0 16px; z-index: 60; }
.topbar .brand { font-weight: 700; white-space: nowrap; color: #fff; display: flex; align-items: center; gap: 8px; }
.topbar .brand small { color: var(--bar-muted); font-weight: 400; }
.topbar .menu-btn { display: none; border: 0; background: var(--bar-2); color: #fff; border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 18px; }
.topbar .search { flex: 1; max-width: 460px; position: relative; }
.topbar .search input { width: 100%; height: 36px; border: 0; border-radius: 9px; background: var(--bar-2); color: #fff; padding: 0 12px 0 34px; outline: none; }
.topbar .search input::placeholder { color: var(--bar-muted); }
.topbar .search::before { content: "⌕"; position: absolute; left: 11px; top: 5px; color: var(--bar-muted); font-size: 18px; }
.topbar .sp { flex: 1; }
.topbar .lnk { color: var(--bar-fg); background: var(--bar-2); border-radius: 9px; padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.topbar .lnk:hover { color: #fff; }
.lang { display: flex; background: var(--bar-2); border-radius: 9px; padding: 3px; }
.lang button { border: 0; background: transparent; color: var(--bar-muted); padding: 5px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; }
.lang button.on { background: #fff; color: var(--bar); }

.side { position: fixed; top: 54px; left: 0; bottom: 0; width: var(--side-w); background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 10px 30px; z-index: 50; }
.side .home { display: flex; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 8px; font-weight: 600; color: var(--head); }
.side .home.on, .side .home:hover { background: #eef5fb; color: var(--p-blue); }
.side h4 { margin: 14px 8px 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.side h4 i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.side a.gi { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: 13px; line-height: 1.35; }
.side a.gi:hover { background: #f5f7fb; }
.side a.gi.on { background: #eef5fb; color: var(--p-blue); font-weight: 600; }
.side a.gi .ic { width: 20px; text-align: center; flex: none; }
.side a.gi .nm { flex: 1; }
.side a.gi .n { color: var(--muted); font-size: 11px; font-weight: 400; min-width: 16px; text-align: right; }
.side .none { color: var(--muted); padding: 14px 10px; font-size: 13px; }

.main { margin: 54px 0 0 var(--side-w); padding: 20px 20px 60px; min-height: calc(100vh - 54px); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tag.web { background: #e8f5e9; color: #2e7d32; } .tag.app { background: #e3f2fd; color: #1565c0; } .tag.role { background: #f3e9fb; color: #6a2ea0; }
.t1 { background: #e5484d; } .t2 { background: #f5a623; } .t3 { background: #8b8fa3; }

/* ===== trang chủ ===== */
.hero { background: linear-gradient(120deg, #1e2235, #0067AC); color: #fff; border-radius: 14px; padding: 24px 26px; margin-bottom: 22px; }
.hero h1 { margin: 0 0 6px; font-size: 24px; }
.hero p { margin: 0; opacity: .9; max-width: 820px; }
.hero .how { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.hero .how span { background: rgba(255,255,255,.14); border-radius: 20px; padding: 4px 12px; font-size: 12.5px; }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 10px; }
.sec-h h2 { margin: 0; font-size: 17px; color: var(--head); display: flex; align-items: center; gap: 8px; }
.sec-h h2 i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sec-h small { color: var(--muted); }
.flow8 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.flow8 a { background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.06); border-top: 4px solid var(--p-blue); color: var(--text); position: relative; transition: transform .15s; }
.flow8 a.app { border-top-color: var(--a-primary); }
.flow8 a:hover { transform: translateY(-3px); }
.flow8 a .n { font-size: 11px; color: var(--muted); }
.flow8 a b { display: block; color: var(--head); font-size: 13px; line-height: 1.25; margin: 2px 0 4px; }
.flow8 a small { font-size: 11px; color: #777; display: block; line-height: 1.35; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.gcard { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.06); color: var(--text); display: flex; flex-direction: column; gap: 6px; border: 1px solid transparent; transition: .15s; }
.gcard:hover { border-color: var(--p-blue); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,103,172,.14); }
.gcard .hd { display: flex; gap: 10px; align-items: center; }
.gcard .ic { width: 38px; height: 38px; border-radius: 10px; background: #eef5fb; display: grid; place-items: center; font-size: 19px; flex: none; }
.gcard b { color: var(--head); line-height: 1.25; }
.gcard p { margin: 0; font-size: 12.5px; color: #6b6f80; flex: 1; }
.gcard .ft { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.gcard .ft .go { margin-left: auto; color: var(--p-blue); font-weight: 600; font-size: 12.5px; }
.skipbox { background: #fff; border: 1px dashed #d8dbe6; border-radius: 12px; padding: 14px 18px; margin-top: 26px; color: #6b6f80; font-size: 13px; }
.skipbox b { color: var(--head); }
.skipbox ul { margin: 6px 0 0; padding-left: 18px; }

/* ===== trang hướng dẫn ===== */
.g-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.g-head .ic { width: 48px; height: 48px; border-radius: 12px; background: #fff; display: grid; place-items: center; font-size: 24px; box-shadow: 0 1px 6px rgba(0,0,0,.08); flex: none; }
.g-head .tx { flex: 1; min-width: 260px; }
.g-head h1 { margin: 0; font-size: 21px; color: var(--head); line-height: 1.25; }
.g-head .meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; align-items: center; }
.g-head p { margin: 0; color: #6b6f80; max-width: 900px; }
.g-head .pre { margin-top: 6px; font-size: 13px; background: #fff; border-left: 3px solid var(--a-primary); padding: 6px 10px; border-radius: 0 8px 8px 0; max-width: 900px; }
.g-nav { display: flex; gap: 6px; }
.g-nav a { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--text); white-space: nowrap; }
.g-nav a:hover { border-color: var(--p-blue); color: var(--p-blue); }

.ctrl { position: sticky; top: 54px; z-index: 30; background: rgba(242,243,248,.96); backdrop-filter: blur(4px); display: flex; align-items: center; gap: 8px; padding: 8px 0; flex-wrap: wrap; }
.ctrl .seg { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.ctrl .seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: #6b6f80; font-weight: 600; font-size: 13px; }
.ctrl .seg button.on { background: var(--p-blue); color: #fff; }
.ctrl .cb { border: 1px solid var(--line); background: #fff; border-radius: 9px; height: 36px; min-width: 38px; padding: 0 10px; cursor: pointer; color: var(--head); font-weight: 600; }
.ctrl .cb:hover { border-color: var(--p-blue); color: var(--p-blue); }
.ctrl .cb.pri { background: var(--hl); border-color: var(--hl); color: #fff; min-width: 96px; }
.ctrl .prog { flex: 1; min-width: 120px; height: 8px; background: #dfe2ec; border-radius: 6px; overflow: hidden; }
.ctrl .prog i { display: block; height: 100%; background: var(--hl); border-radius: 6px; transition: width .35s; }
.ctrl .cnt { font-weight: 700; color: var(--head); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctrl select { height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 0 6px; }

.stage { position: relative; display: flex; gap: 22px; align-items: flex-start; justify-content: center; padding: 16px 0 4px; }
.frame { position: relative; transition: opacity .3s, filter .3s; }
.frame .who { position: absolute; top: -11px; left: 16px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1px 10px; font-size: 11.5px; font-weight: 600; color: var(--head); z-index: 6; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.frame .who b { color: var(--p-blue); }
.frame.app .who b { color: var(--a-primary); }
.frame.idle { opacity: .55; filter: saturate(.6); }
.frame.active .who { border-color: var(--hl); box-shadow: 0 0 0 3px rgba(255,122,26,.18); }
.frame.web { flex: 1 1 0; min-width: 0; max-width: 1000px; background: #fff; border-radius: 12px; box-shadow: 0 10px 34px rgba(30,34,53,.16); }
.fbar { height: 30px; border-radius: 12px 12px 0 0; background: #e6e8f0; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.fbar i { width: 10px; height: 10px; border-radius: 50%; background: #f26b5e; } .fbar i:nth-child(2) { background: #f6c044; } .fbar i:nth-child(3) { background: #5ec65a; }
.fbar .url { flex: 1; background: #fff; border-radius: 6px; height: 19px; margin-left: 8px; font-size: 11px; color: #8b8fa3; padding: 1px 10px; overflow: hidden; white-space: nowrap; }
.fvp { position: relative; overflow: hidden; border-radius: 0 0 12px 12px; }
.fin { position: absolute; left: 0; top: 0; width: 980px; height: 600px; transform-origin: 0 0; font-size: 12.5px; color: #575962; }
.frame.app { flex: none; padding-top: 2px; }
.phone { width: 318px; height: 646px; background: #111; border-radius: 40px; padding: 10px; box-shadow: 0 18px 44px rgba(0,0,0,.26); }
.screen { width: 100%; height: 100%; background: #f4f6f9; border-radius: 31px; overflow: hidden; position: relative; display: flex; flex-direction: column; color: #222; font-size: 13px; }
.stage.only-app { justify-content: flex-start; }
.stage.only-app .sidecard { flex: 1; min-width: 0; }

/* con trỏ + bong bóng */
#cursor { position: absolute; left: 0; top: 0; width: 26px; height: 26px; z-index: 40; pointer-events: none; transition: transform .7s cubic-bezier(.3,.8,.3,1), opacity .25s; will-change: transform; }
#cursor svg { display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
#cursor.touch svg { display: none; }
#cursor.touch::before { content: ""; position: absolute; left: -13px; top: -13px; width: 30px; height: 30px; border-radius: 50%; background: rgba(51,152,220,.35); border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(51,152,220,.8); }
#cursor.hide { opacity: 0; }
#cursor.hint { animation: bob 1s ease-in-out infinite; }
#cursor::after { content: ""; position: absolute; left: -16px; top: -16px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--hl); opacity: 0; }
#cursor.click::after { animation: ripple .45s ease-out; }
@keyframes ripple { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes bob { 0%,100% { margin-top: 0; } 50% { margin-top: 7px; } }
#bubble { position: absolute; left: 0; top: 0; width: 310px; z-index: 39; background: #1e2235; color: #fff; border-radius: 12px; padding: 11px 13px 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: transform .5s cubic-bezier(.3,.8,.3,1), opacity .25s; font-size: 13px; line-height: 1.45; }
#bubble.hide { opacity: 0; pointer-events: none; }
#bubble.shake { animation: shake .35s; }
@keyframes shake { 25% { margin-left: -6px; } 75% { margin-left: 6px; } }
#bubble .bh { display: flex; gap: 6px; align-items: center; font-size: 11px; color: #aeb4d4; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
#bubble .bh .tag { text-transform: none; letter-spacing: 0; }
#bubble .bt { font-weight: 500; }
#bubble .br { margin-top: 7px; background: rgba(255,255,255,.1); border-radius: 8px; padding: 6px 8px; font-size: 12px; color: #dfe3f5; }
#bubble .bw { margin-top: 6px; background: rgba(245,166,35,.2); border-radius: 8px; padding: 6px 8px; font-size: 12px; color: #ffe0a6; }
#bubble .bf { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
#bubble .bf .do { color: #ffb37a; font-size: 12px; font-weight: 600; flex: 1; }
#bubble .bf button { border: 0; border-radius: 7px; padding: 5px 11px; cursor: pointer; font-weight: 600; font-size: 12px; background: var(--hl); color: #fff; }
#bubble .bf button.gh { background: rgba(255,255,255,.14); }
.hl { outline: 3px solid var(--hl) !important; outline-offset: 2px; border-radius: 6px; animation: pulse 1.2s ease-in-out infinite; position: relative; z-index: 3; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,122,26,.5); } 50% { box-shadow: 0 0 0 9px rgba(255,122,26,0); } }
.pressed { transform: scale(.96); filter: brightness(.9); transition: .12s; }
.follow .frame.active [data-h] { cursor: pointer; }

/* bảng bước */
.panel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.pcard { background: #fff; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.06); padding: 14px 16px; }
.pcard h3 { margin: 0 0 10px; font-size: 14px; color: var(--head); text-transform: uppercase; letter-spacing: .3px; }
ol.steps { list-style: none; margin: 0; padding: 0; }
ol.steps li { display: flex; gap: 10px; padding: 8px 8px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
ol.steps li:hover { background: #f6f8fc; }
ol.steps li .no { width: 24px; height: 24px; border-radius: 50%; background: #e6e9f2; color: #6b6f80; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
ol.steps li.done .no { background: #d5efe6; color: #1b7a5c; }
ol.steps li.on { background: #fff7f0; border-color: #ffd2b0; }
ol.steps li.on .no { background: var(--hl); color: #fff; }
ol.steps li .st { flex: 1; min-width: 0; }
ol.steps li .st .tag { margin-right: 4px; }
ol.steps li .ru, ol.steps li .wa { display: none; font-size: 12.5px; margin-top: 5px; padding: 6px 9px; border-radius: 8px; }
ol.steps li .ru { background: #f1f5fb; color: #3d4a66; }
ol.steps li .wa { background: var(--note-bg); color: #8a5a10; }
ol.steps li.on .ru, ol.steps li.on .wa, .showall ol.steps li .ru, .showall ol.steps li .wa { display: block; }
.rules ul { margin: 0; padding-left: 18px; }
.rules li { margin-bottom: 6px; font-size: 13px; }
.linkbtn { border: 0; background: transparent; color: var(--p-blue); cursor: pointer; font-size: 12.5px; padding: 0; float: right; text-transform: none; letter-spacing: 0; font-weight: 500; }
.donebox { display: none; background: #eaf7f1; border: 1px solid #bfe6d5; color: #1b6b4f; border-radius: 12px; padding: 14px 16px; margin-top: 14px; }
.donebox.on { display: block; animation: pop .35s; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.donebox b { font-size: 15px; }
.donebox .acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.donebox .acts button, .donebox .acts a { border: 1px solid #1b7a5c; background: #fff; color: #1b7a5c; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.donebox .acts .pri { background: #1b7a5c; color: #fff; }

/* ===== PORTAL (Metronic) trong khung web ===== */
.portal { display: flex; width: 100%; height: 100%; background: #f2f3f8; position: relative; }
.p-aside { width: 62px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding-top: 8px; gap: 1px; flex: none; }
.p-aside .logo { width: 36px; height: 36px; border-radius: 9px; background: var(--p-blue); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 8px; }
.p-aside button { width: 54px; border: 0; background: transparent; padding: 6px 0; border-radius: 8px; color: #868aa8; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 9px; line-height: 1.1; }
.p-aside button .ic { font-size: 16px; }
.p-aside button.on { background: #f0f4ff; color: var(--p-blue); }
.p-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-header { height: 46px; background: #fff; display: flex; align-items: center; padding: 0 18px; box-shadow: 0 1px 15px rgba(69,65,78,.08); gap: 10px; flex: none; z-index: 2; }
.p-header .title_header { font-size: 13.5px; font-weight: 600; color: #3f4047; }
.p-header .sp { flex: 1; }
.p-header .p-user { color: #6b6f80; font-size: 12px; }
.p-content { padding: 14px 16px; overflow: auto; flex: 1; }
.portlet { background: #fff; box-shadow: 0 1px 15px 1px rgba(69,65,78,.08); border-radius: 4px; }
.portlet-head { min-height: 48px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); gap: 8px; flex-wrap: wrap; }
.portlet-head h2 { font-size: 13px; font-weight: 600; color: #3f4047; margin: 0; text-transform: uppercase; }
.portlet-head .tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 0; }
.portlet-body { padding: 12px 16px 16px; }
.ptabs { display: flex; border-bottom: 1px solid var(--line); margin: -2px 0 12px; flex-wrap: wrap; }
.ptabs button { border: 0; background: transparent; padding: 8px 11px; color: #9699a2; border-bottom: 2px solid transparent; font-weight: 500; font-size: 12px; }
.ptabs button.on { color: var(--p-blue); border-bottom-color: var(--p-blue); }
.btn { border: 1px solid transparent; border-radius: 4px; padding: 6px 12px; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; background: #fff; }
.btn-primary { background: var(--p-blue); color: #fff; border-color: var(--p-blue); }
.btn-pill { border-radius: 60px; text-transform: uppercase; font-size: 11px; padding: 6px 14px; }
.btn-default { border-color: #dfe2ea; color: #575962; }
.btn-sm { padding: 3px 9px; font-size: 11.5px; }
.filter { display: flex; gap: 8px; background: #f7f8fa; padding: 10px; border-radius: 4px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
.filter .fc { width: 150px; }
.fc { height: 32px; border: 1px solid #dfe2ea; border-radius: 4px; padding: 0 9px; background: #fff; color: #575962; width: 100%; font-size: 12.5px; outline: none; }
.fc.sel { display: flex; align-items: center; justify-content: space-between; gap: 6px; white-space: nowrap; overflow: hidden; }
.fc.sel::after { content: "▾"; color: #9699a2; font-size: 10px; }
.fc.ph, .fc::placeholder { color: #b3b6c4; }
.fc.dis { background: #f4f5f8; color: #9699a2; }
.selwrap { position: relative; }
.selopts { position: absolute; left: 0; right: 0; top: 34px; background: #fff; border: 1px solid #dfe2ea; border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.14); z-index: 20; }
.selopts div { padding: 6px 10px; }
.selopts div:hover { background: #f4f6fb; }
table.pt { width: 100%; border-collapse: collapse; }
table.pt th { text-align: left; font-size: 10.5px; text-transform: uppercase; color: #3f4047; font-weight: 600; padding: 8px 7px; border-bottom: 1px solid var(--line); background: #fafbfc; }
table.pt td { padding: 8px 7px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.pt tr.new td { animation: rowin 1.2s; }
@keyframes rowin { from { background: #fff1c9; } }
.icon-btn { border: 0; background: transparent; color: #868aa8; font-size: 14px; padding: 2px 5px; border-radius: 4px; }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; background: #e5e7ef; border-radius: 20px; vertical-align: middle; transition: .2s; }
.switch::before { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: #34bfa3; } .switch.on::before { transform: translateX(16px); }
.ck { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #b9bdcc; border-radius: 3px; vertical-align: -3px; background: #fff; position: relative; flex: none; }
.ck.on { background: var(--p-blue); border-color: var(--p-blue); }
.ck.on::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ck.rd { border-radius: 50%; } .ck.rd.on::after { left: 3.5px; top: 3.5px; width: 6px; height: 6px; border: 0; background: #fff; border-radius: 50%; transform: none; }
.ckl { display: inline-flex; gap: 5px; align-items: center; margin-right: 10px; white-space: nowrap; }
.form-row { display: grid; grid-template-columns: 200px 1fr; gap: 6px 12px; align-items: center; margin-bottom: 8px; }
.form-row > label { font-weight: 500; color: #3f4047; }
.form-row.wide { grid-template-columns: 400px 1fr; }
.req { color: #f4516c; }
.unit { color: #9699a2; margin-left: 6px; }
.w-over { position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 30; display: flex; align-items: flex-start; justify-content: center; padding: 26px 16px; animation: fade .25s; }
.w-over.mid { align-items: center; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 4px; width: 640px; max-width: 100%; box-shadow: 0 5px 30px rgba(0,0,0,.2); animation: drop .3s; max-height: 100%; display: flex; flex-direction: column; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }
.modal.sm { width: 420px; } .modal.lg { width: 860px; }
.modal-h { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-h h3 { margin: 0; font-size: 13px; text-transform: uppercase; color: #3f4047; font-weight: 600; flex: 1; }
.modal-h .x { color: #999; font-size: 18px; }
.modal-b { padding: 14px 18px; overflow: auto; }
.modal-f { padding: 10px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.swal { background: #fff; border-radius: 8px; width: 400px; padding: 22px 22px 18px; text-align: center; box-shadow: 0 5px 30px rgba(0,0,0,.2); animation: drop .3s; }
.swal .ic { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-size: 28px; border: 4px solid; }
.swal .ic.success { color: #a5dc86; border-color: #c9eab7; } .swal .ic.error { color: #f27474; border-color: #f8bbbb; } .swal .ic.question { color: #87adbd; border-color: #c9dae1; }
.swal h3 { margin: 0 0 6px; color: #545454; font-size: 17px; }
.swal p { color: #545454; margin: 0; }
.swal .acts { margin-top: 14px; display: flex; justify-content: center; gap: 8px; }
.orig { display: block; font-size: 11px; opacity: .7; font-style: italic; margin-top: 2px; }

.grid-tws { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
.grid-tws th { background: #fafbfc; font-size: 11px; color: #3f4047; padding: 6px 4px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-weight: 600; }
.grid-tws th.today { background: #eef5fb; } .grid-tws th.holiday { color: #e02424; }
.grid-tws th.staff { width: 150px; text-align: left; }
.grid-tws td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 4px; vertical-align: top; height: 84px; }
.staff-cell { display: flex; gap: 6px; align-items: flex-start; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; font-size: 11px; background: #5b8def; }
.staff-cell .nm { font-weight: 600; color: var(--p-blue); font-size: 12px; }
.staff-cell .sub { font-size: 10.5px; color: #9699a2; line-height: 1.3; }
.cell { border-radius: 6px; padding: 5px 6px; font-size: 10.5px; color: #1e2235; position: relative; min-height: 74px; line-height: 1.3; transition: background .5s; }
.cell.dark { color: #fff; }
.cell.ot { box-shadow: inset 0 0 0 2px #ff0000; }
.cell.new { animation: pop .5s; }
.cell .sn { font-weight: 700; padding-right: 14px; }
.cell .br { font-weight: 600; opacity: .85; }
.cell .dots { position: absolute; right: 1px; top: 1px; color: inherit; font-size: 15px; width: 18px; height: 20px; text-align: center; border-radius: 4px; }
.cell .stt { display: inline-block; background: rgba(0,0,0,.2); border-radius: 9px; padding: 0 6px; font-size: 9.5px; font-weight: 600; margin-top: 2px; color: inherit; }
.cell-add { width: 100%; height: 74px; border: 1px dashed #d4d7e3; border-radius: 6px; background: transparent; color: #b5b9cc; font-size: 20px; }
.dropdown { position: absolute; right: 0; top: 22px; background: #fff; box-shadow: 0 4px 22px rgba(0,0,0,.2); border-radius: 6px; padding: 5px 0; z-index: 25; min-width: 190px; color: #3f4047; animation: fade .2s; }
.dropdown.lft { right: auto; left: 0; }
.dropdown button { display: flex; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 12px; color: #3f4047; font-size: 12px; gap: 8px; align-items: center; white-space: nowrap; }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 3px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 11px; align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.kvg { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.kv { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #eee; }
.kv b { color: #222; text-align: right; }
.board { display: grid; gap: 8px; }
.board .bx { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff; display: flex; gap: 10px; align-items: center; opacity: .35; transition: .4s; }
.board .bx.on { opacity: 1; border-color: #bcd7ee; box-shadow: 0 2px 10px rgba(0,103,172,.1); }
.board .bx .a { flex: 1; } .board .bx .ar { color: #9699a2; font-size: 16px; } .board .bx .b { flex: 1; font-weight: 600; color: #1e2235; }
.swatch { display: inline-block; min-width: 150px; padding: 5px 10px; border-radius: 6px; font-weight: 600; font-size: 11.5px; text-align: center; }
.wnote { background: var(--note-bg); border-radius: 6px; padding: 6px 10px; font-size: 11.5px; color: #8a5a10; margin-top: 8px; }

/* ===== APP (Flutter) trong khung điện thoại ===== */
.statusbar { height: 28px; background: var(--a-primary); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 11.5px; font-weight: 600; flex: none; }
.appbar { height: 46px; background: var(--a-primary); color: #fff; display: flex; align-items: center; padding: 0 6px; gap: 4px; flex: none; }
.appbar h1 { font-size: 15.5px; margin: 0 6px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar button { border: 0; background: transparent; color: #fff; font-size: 18px; width: 34px; height: 34px; border-radius: 50%; }
.abody { flex: 1; overflow: auto; padding: 10px; }
.abottom { padding: 8px 10px 14px; background: #fff; border-top: 1px solid #eee; display: flex; gap: 8px; flex: none; }
.abtn { flex: 1; border: 0; border-radius: 10px; padding: 10px; font-weight: 600; font-size: 13.5px; background: var(--a-primary); color: #fff; text-align: center; }
.abtn.sec { background: #fff; color: var(--a-primary); border: 1px solid var(--a-primary); }
.abtn.orange { background: #FF9800; } .abtn.red { background: #F44336; } .abtn.purple { background: #9C27B0; }
.acard { background: #fff; border-radius: 12px; padding: 10px 11px; margin-bottom: 9px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.acard.new, .sched.new { animation: pop .5s; }
.home-hero { background: var(--a-primary); color: #fff; padding: 12px 14px 38px; }
.home-hero .hi { font-size: 12px; opacity: .85; } .home-hero .nm { font-size: 16.5px; font-weight: 700; }
.tk-card { margin: -28px 10px 10px; background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.08); position: relative; }
.tk-card .sn { text-align: center; color: var(--a-primary); font-weight: 700; font-size: 14px; }
.tk-card .row { text-align: center; color: #555; font-size: 12.5px; margin-top: 3px; }
.tk-card .big { margin-top: 10px; width: 100%; border: 0; border-radius: 10px; padding: 11px; color: #fff; font-weight: 700; font-size: 14.5px; }
.tk-hidden { margin: -28px 10px 10px; border: 1.5px dashed #c9cfdd; border-radius: 14px; padding: 12px; text-align: center; color: #9aa0b3; font-size: 12px; background: rgba(255,255,255,.75); }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 4px 10px; }
.mi { background: #fff; border-radius: 12px; padding: 9px 3px; text-align: center; font-size: 10.5px; box-shadow: 0 1px 3px rgba(0,0,0,.05); line-height: 1.2; }
.mi .ic { font-size: 20px; display: block; margin-bottom: 3px; }
.chip { display: inline-block; padding: 1px 9px; border-radius: 12px; color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.chips { display: flex; gap: 5px; overflow-x: auto; padding: 4px 0 8px; }
.chips span { border: 1px solid #ddd; background: #fff; border-radius: 16px; padding: 3px 9px; white-space: nowrap; font-size: 11.5px; }
.chips span.on { color: #fff; border-color: transparent; }
.chips .cnt { background: rgba(0,0,0,.14); border-radius: 8px; padding: 0 5px; margin-left: 3px; }
.sched { background: #fff; border-radius: 12px; padding: 10px 11px; margin-bottom: 9px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.sched.ot { box-shadow: inset 0 0 0 2px #F44336; }
.sched .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; font-weight: 600; font-size: 12.5px; gap: 6px; }
.sched .ln { color: #444; font-size: 12px; margin: 2px 0; display: flex; gap: 5px; align-items: center; }
.sched .ln.orange { color: #FF9800; } .sched .ln.green { color: #1b7a5c; font-weight: 700; }
.sched .acts { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.sched .acts span { flex: 1; border: 1px solid var(--a-primary); color: var(--a-primary); background: #fff; border-radius: 8px; padding: 6px 3px; font-size: 11.5px; font-weight: 600; text-align: center; white-space: nowrap; }
.sched .acts span.fill { background: var(--a-primary); color: #fff; } .sched .acts span.or { background: #FF9800; border-color: #FF9800; color: #fff; }
.week-h { background: #fff; border-radius: 12px; padding: 8px 10px; margin-bottom: 9px; display: flex; align-items: center; gap: 6px; font-weight: 600; color: #333; font-size: 12.5px; }
.week-h span.bt { background: #eef6fc; color: var(--a-primary); border-radius: 8px; width: 26px; height: 26px; display: grid; place-items: center; flex: none; }
.week-h .lb { flex: 1; text-align: center; }
.afield { margin-bottom: 10px; }
.afield > label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 4px; color: #333; }
.ainp { width: 100%; border: 1px solid #dcdfe6; border-radius: 10px; padding: 9px 10px; background: #fff; min-height: 38px; font-size: 13px; color: #222; outline: none; display: flex; align-items: center; justify-content: space-between; }
.ainp.ph { color: #b3b6c4; }
div.ainp.sel::after { content: "▾"; color: #9aa0b3; font-size: 11px; }
.stepper { display: flex; gap: 6px; }
.stepper span { width: 40px; border: 1px solid #dcdfe6; background: #fff; border-radius: 10px; font-size: 17px; display: grid; place-items: center; flex: none; }
.stepper .ainp { text-align: center; }
.adialog-wrap { position: absolute; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 22px; animation: fade .2s; }
.adialog { background: #fff; border-radius: 16px; width: 100%; padding: 16px 16px 10px; animation: pop .25s; }
.adialog h4 { margin: 0 0 6px; font-size: 15px; }
.adialog p { margin: 0; color: #444; }
.adialog .acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.adialog .acts span { color: var(--a-primary); font-weight: 700; padding: 7px 10px; border-radius: 8px; }
.sheet-wrap { position: absolute; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; z-index: 15; animation: fade .2s; }
.sheet { background: #fff; border-radius: 18px 18px 0 0; width: 100%; max-height: 84%; overflow: auto; padding: 12px 12px 18px; animation: up .3s; }
@keyframes up { from { transform: translateY(40px); } }
.sheet h4 { margin: 0 0 10px; text-align: center; font-size: 14px; }
.cam { height: 210px; border: 2px solid var(--a-primary); border-radius: 10px; display: grid; place-items: center; color: var(--a-primary); background: #fff; overflow: hidden; text-align: center; position: relative; }
.cam.shot { background: linear-gradient(#9fb7c9, #5b7184); border-color: transparent; }
.cam .face { width: 92px; height: 92px; border-radius: 50%; background: #f1c9a5; box-shadow: 0 -22px 0 -4px #3b2b20 inset; }
.cam .wm { position: absolute; left: 8px; top: 6px; text-align: left; color: #fff; font-size: 10px; line-height: 1.45; font-weight: 600; text-shadow: 0 1px 2px #000; }
.map { height: 130px; border-radius: 10px; margin-top: 9px; background: #e7efe3; position: relative; overflow: hidden; }
.map .ring { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; border-radius: 50%; border: 2px dashed #3398dc; background: rgba(51,152,220,.08); transform: translate(-50%,-50%); }
.map .pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-100%); font-size: 20px; }
.map .me { position: absolute; left: 58%; top: 60%; width: 12px; height: 12px; border-radius: 50%; background: #4285f4; border: 3px solid #fff; box-shadow: 0 0 0 2px #4285f4; }
.map .lbl { position: absolute; left: 6px; bottom: 5px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 1px 6px; font-size: 10.5px; }
.roster { width: 100%; border-collapse: collapse; font-size: 10px; background: #fff; }
.roster th { padding: 5px 2px; border-bottom: 1px solid #eee; font-weight: 600; }
.roster th.today { background: #fdecea; }
.roster td { border: 1px solid #eee; padding: 2px; vertical-align: top; height: 52px; }
.roster .sh { border-left: 4px solid; padding: 1px 3px; border-radius: 3px; background: #fafafa; line-height: 1.25; }
.roster .add { color: #bbb; text-align: center; font-size: 15px; padding-top: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .h { text-align: center; font-size: 10.5px; color: #888; }
.cal .d { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: 11.5px; background: #fff; border: 2px solid transparent; position: relative; }
.cal .d.ot { border-color: #F44336; } .cal .d.sel { box-shadow: 0 0 0 2px var(--a-primary); }
.tl { position: relative; background: #fff; border-radius: 10px; padding: 6px 6px 8px; }
.tl .hrs { display: flex; margin-left: 62px; font-size: 9px; color: #999; }
.tl .hrs span { flex: 1; }
.tl .rw { display: flex; align-items: center; height: 30px; border-top: 1px solid #f0f0f0; }
.tl .rw b { width: 62px; font-size: 10.5px; flex: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tl .rw .tr { flex: 1; position: relative; height: 18px; background: repeating-linear-gradient(90deg, #f7f7f7 0 1px, transparent 1px 8.333%); }
.tl .rw .bk { position: absolute; top: 0; height: 18px; border-radius: 4px; font-size: 9px; color: #222; padding: 1px 4px; overflow: hidden; white-space: nowrap; }
.noti { display: flex; gap: 8px; align-items: flex-start; }
.noti .bell { width: 30px; height: 30px; border-radius: 50%; background: #e3f2fd; display: grid; place-items: center; flex: none; }
.noti b { display: block; font-size: 12.5px; } .noti div { font-size: 12px; color: #555; }

@media (max-width: 1180px) {
  .panel { grid-template-columns: 1fr; }
  .flow8 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: .25s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.nav .side { transform: none; }
  .main { margin-left: 0; padding: 16px 12px 50px; }
  .topbar .menu-btn { display: block; }
  .topbar .brand small { display: none; }
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar .sp { display: none; }
  .topbar .search { min-width: 0; }
  .lang { flex: none; }
  .lang button { padding: 5px 8px; font-size: 12px; }
  .g-nav { flex-wrap: wrap; max-width: 100%; }
  .g-nav a { white-space: normal; }
  .g-head .tx { min-width: 0; flex-basis: 70%; }
  .main { overflow-x: hidden; }
  .stage { flex-direction: column; align-items: center; }
  .frame.web { width: 100%; flex: none; }
  .flow8 { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; } }
