@import url("/static/fonts/fonts.css");

:root {
  --navy: #0b2a5b;
  --navy-2: #12366f;
  --blue: #1554c0;
  --blue-50: #eef3fd;
  --orange: #f37021;
  --green: #1f9d55;
  --green-50: #e8f6ee;
  --amber: #b7791f;
  --amber-50: #fdf5e6;
  --red: #c8423b;
  --red-50: #fbeceb;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --border: #e3e8f0;
  --border-2: #d3dbe7;
  --text: #14213d;
  --muted: #5b6b85;
  --subtle: #8a97ad;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 64, .05), 0 4px 16px rgba(16, 32, 64, .04);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 600; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }

/* dải 3 màu nhận diện FPT */
.stripe { height: 4px; background: linear-gradient(90deg, var(--blue) 0 33.3%, var(--orange) 33.3% 66.6%, var(--green) 66.6% 100%); }

/* ─── logos */
.brand { display: flex; align-items: center; gap: 14px; }
.brand img.fpt { height: 26px; }
.brand img.fhn { height: 30px; }
.brand .sep { width: 1px; height: 26px; background: var(--border-2); }
.atl { display: flex; align-items: center; gap: 8px; }
.atl img { width: 30px; height: 30px; }
.atl .word { font-weight: 800; letter-spacing: .14em; font-size: 13px; line-height: 1.1; }
.atl .word small { display: block; font-weight: 500; letter-spacing: .08em; font-size: 9.5px; color: var(--muted); }

/* ─── buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: #f2f5fa; text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #1048a8; }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.success:hover { background: #1a8749; }
.btn.danger { color: var(--red); border-color: #efc9c6; }
.btn.danger:hover { background: var(--red-50); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label.lbl { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
label.lbl .req { color: var(--red); margin-left: 2px; }
.hint { font-size: 12px; color: var(--subtle); margin-top: 4px; }
input[type=text], input[type=password], input[type=date], input[type=month], input[type=number], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 8px;
  font: inherit; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 76px; padding: 9px 12px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 84, 192, .12); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: 9px; padding: 3px; background: #f7f9fc; gap: 3px; }
.seg input { display: none; }
.seg label { padding: 6px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg input:checked + label { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16, 32, 64, .12); }

/* ─── cards, badges */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-b { padding: 18px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: #eef1f6; color: var(--muted); }
.badge.ok { background: var(--green-50); color: var(--green); }
.badge.warn { background: var(--amber-50); color: var(--amber); }
.badge.err { background: var(--red-50); color: var(--red); }
.badge.info { background: var(--blue-50); color: var(--blue); }
.badge.demo { background: #f1ecfb; color: #6a4bb0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px;
  font-weight: 600; background: #eef1f6; color: var(--muted); }
.chip.on { background: var(--blue-50); color: var(--blue); }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 12.5px; flex: none; letter-spacing: .02em; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; border: 1px solid; }
.flash.ok { background: var(--green-50); border-color: #bfe3cc; color: #166c3b; }
.flash.error { background: var(--red-50); border-color: #f0c7c3; color: #9c2f29; }
.flash.warn { background: var(--amber-50); border-color: #f0d9ae; color: #7a5212; }
.flash.info { background: var(--blue-50); border-color: #c9d8f6; color: #163f8f; }
.hint.warn-t { color: var(--amber); }
.badge.ready { background: #e3f5ec; color: #11744a; box-shadow: inset 0 0 0 1px #b6e2cb; }

/* ─── login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-art { background: var(--navy); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-art .brand img.fpt { height: 30px; }
.login-art .brand img.fhn { height: 36px; }
.login-art .brand .sep { background: rgba(255, 255, 255, .25); }
.login-art h1 { font-size: 34px; line-height: 1.2; margin-top: auto; font-weight: 700; }
.login-art p { color: #c6d3ea; max-width: 440px; font-size: 15px; }
.login-art .waves { position: absolute; left: 0; right: 0; bottom: 0; height: 140px; opacity: .9; }
.login-art .atl .word small { color: #9fb3d6; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form .card { width: 100%; max-width: 380px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ─── intern layout */
.topbar { background: #fff; border-bottom: 1px solid var(--border); }
.topbar .in { max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 18px; }
.topnav { display: flex; gap: 2px; margin-left: 8px; }
.topnav a { padding: 7px 11px; border-radius: 7px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.topbar .in { gap: 14px; }
.topbar .btn, .topbar .row div { white-space: nowrap; }
.topnav a.active, .topnav a:hover { background: var(--blue-50); color: var(--blue); text-decoration: none; }
.page { max-width: 1120px; margin: 0 auto; padding: 24px; }
.page-h { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; }

.today-grid { display: grid; grid-template-columns: 372px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .today-grid { grid-template-columns: 1fr; } }
.clock { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.checkin-state { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; background: #f7f9fc; border: 1px solid var(--border); }
.checkin-state .ico { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }

.weekstrip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.weekstrip .d { border: 1px solid var(--border); border-radius: 9px; padding: 7px 3px; text-align: center; background: #fff; min-width: 0; }
.weekstrip .badge { padding: 0 5px; font-size: 11px; height: 20px; }
.weekstrip .rdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; border: 1.5px solid var(--border-2); }
.weekstrip .rdot.on { background: var(--green); border-color: var(--green); }
.weekstrip .d.today { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(21, 84, 192, .1); }
.weekstrip .d .n { font-weight: 700; }

.rep-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rep-fields .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .rep-fields { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 96px 130px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); align-items: start; }
.timeline li:first-child { border-top: 0; }

/* session picker */
.slots { display: grid; grid-template-columns: 80px repeat(5, 1fr); gap: 8px; align-items: center; }
.slots .hd { font-weight: 700; font-size: 12.5px; color: var(--muted); text-align: center; }
.slots .pl { font-weight: 600; color: var(--muted); }
.slot input { display: none; }
.slot label { display: flex; align-items: center; justify-content: center; height: 42px; border: 1px dashed var(--border-2);
  border-radius: 9px; cursor: pointer; color: var(--subtle); font-weight: 600; background: #fff; transition: all .12s; user-select: none; }
.slot label:hover { border-color: var(--blue); color: var(--blue); }
.slot input:checked + label { border: 1px solid var(--blue); background: var(--blue-50); color: var(--blue); }
.slot-count { font-weight: 700; color: var(--blue); }

.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.steps a { flex: 1; padding: 10px 12px; border-radius: 9px; background: #fff; border: 1px solid var(--border); color: var(--muted);
  font-weight: 600; font-size: 13px; }
.steps a b { display: block; font-size: 11px; color: var(--subtle); font-weight: 600; letter-spacing: .06em; }
.section { scroll-margin-top: 80px; }

/* ─── admin layout */
.adm { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #c9d6ee; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side .logos { padding: 20px 18px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.side .logos .brand img.fpt { height: 22px; }
.side .logos .brand img.fhn { height: 26px; }
.side .logos .brand .sep { background: rgba(255, 255, 255, .2); height: 22px; }
.side .logos .atl { margin-top: 16px; }
.side .logos .atl .word { color: #fff; }
.side .logos .atl .word small { color: #93a7cc; }
.side nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #c9d6ee; font-weight: 600; }
.side nav a svg { width: 17px; height: 17px; opacity: .85; }
.side nav a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.side nav a.active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--orange); }
.side .me { margin-top: auto; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; }
.side .me .btn { background: transparent; color: #c9d6ee; border-color: rgba(255, 255, 255, .2); }
.main { min-width: 0; }
.main .head { position: sticky; top: 0; z-index: 5; background: rgba(245, 247, 251, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.main .head .in { padding: 14px 28px; display: flex; align-items: center; gap: 14px; }
.main .body { padding: 22px 28px 48px; }

.kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1350px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .kpis, .kpis.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
a.kpi { color: inherit; text-decoration: none; display: block; }
a.kpi:hover { border-color: #b6e2cb; box-shadow: 0 0 0 3px rgba(31, 157, 85, .08); }
.kpi.ready .bar { background: #11744a; } .kpi.ready .v { color: #11744a; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; position: relative; overflow: hidden; }
.kpi .l { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.kpi .v small { font-size: 14px; color: var(--subtle); font-weight: 600; }
.kpi .s { font-size: 12px; color: var(--subtle); }
.kpi .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--blue); }
.kpi.ok .bar { background: var(--green); } .kpi.warn .bar { background: var(--amber); } .kpi.err .bar { background: var(--red); }

table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--subtle);
  font-weight: 700; padding: 10px 12px; background: #f8fafd; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr.main-row { cursor: pointer; }
table.t tr.main-row:hover td { background: #f8fafd; }
table.t tr.main-row.open td { background: #f4f7fd; border-bottom-color: transparent; }
table.t tr.detail td { background: #fbfcfe; padding: 0; }
table.t tr.detail .wrap { padding: 16px 18px 20px 58px; display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 22px; }
@media (max-width: 1200px) { table.t tr.detail .wrap { grid-template-columns: 1fr; padding-left: 18px; } }
.who { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.who .n { font-weight: 600; }
.who .n .nm { white-space: nowrap; }
.who .u { font-size: 12px; color: var(--subtle); }
.caret { width: 16px; color: var(--subtle); transition: transform .15s; }
tr.open .caret { transform: rotate(90deg); }

dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 500; }
.rep-box { border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.rep-box .rh { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.rep-box .rb { padding: 10px 12px; display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; font-size: 13px; }
.rep-box .rb .k { color: var(--muted); font-weight: 600; }
.rep-box .rb .v { white-space: pre-wrap; }

.mini-slots { display: inline-grid; grid-template-columns: repeat(5, 14px); grid-template-rows: 7px 7px; gap: 2px; vertical-align: middle; }
.mini-slots i { background: #e6eaf1; border-radius: 2px; }
.mini-slots i.on { background: var(--blue); }

.wk { width: 100%; border-collapse: separate; border-spacing: 0; }
.wk th { font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--border); background: #f8fafd; }
.wk th.today { color: var(--blue); }
.wk td { padding: 8px; border-bottom: 1px solid var(--border); text-align: center; }
.wk td.who-c { text-align: left; }
.cell { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 94px; padding: 7px 6px; border-radius: 8px; border: 1px solid transparent; font-size: 12px; }
.cell .t { font-weight: 700; font-size: 13px; }
.cell.ok { background: var(--green-50); color: #166c3b; }
.cell.warn { background: var(--amber-50); color: #8a5a10; }
.cell.pending { background: var(--blue-50); color: var(--blue); }
.cell.absent { background: #f3f0f7; color: #6a4bb0; }
.cell.missing { background: var(--red-50); color: var(--red); }
.cell.off { color: #b5bfce; }
.cell.future { color: var(--subtle); border: 1px dashed var(--border-2); }
.cell.pre { color: #b5bfce; background: repeating-linear-gradient(135deg, #f7f9fc 0 6px, #fff 6px 12px); }
.cell[data-hc] { cursor: default; }
.cell[data-hc]:hover { box-shadow: 0 0 0 2px rgba(21, 84, 192, .18); }
.hc-trig { display: inline-flex; cursor: default; }
.hc-trig:hover .badge { box-shadow: 0 0 0 2px rgba(31, 157, 85, .2); }
.rd[data-hc] { cursor: default; }
.rd[data-hc]:hover { outline: 2px solid rgba(21, 84, 192, .35); outline-offset: 1px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.tabpane { display: none; }
.tabpane.active { display: block; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search { position: relative; }
.search input { padding-left: 32px; width: 240px; height: 34px; }
.search svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--subtle); }
.heat { display: grid; grid-template-columns: 60px repeat(5, 1fr); gap: 6px; font-size: 12px; }
.heat .c { height: 34px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.scroll-x { overflow-x: auto; }
.wide td, .wide th { white-space: nowrap; }
.wide td.wrapc { white-space: normal; min-width: 260px; max-width: 360px; }

/* ─── thẻ thông tin khi rê chuột vào thành viên */
.who[data-hc] { cursor: default; display: inline-flex; min-width: 0; vertical-align: middle; }
.who[data-hc] .n { border-bottom: 1px dashed transparent; display: inline; }
.who[data-hc]:hover .n { border-bottom-color: var(--border-2); }
#hovercard { position: fixed; z-index: 50; width: 380px; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 32, 64, .16), 0 2px 6px rgba(16, 32, 64, .06); padding: 14px 16px; font-size: 13px;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; pointer-events: none; }
#hovercard.show { opacity: 1; transform: none; pointer-events: auto; }
#hovercard { max-height: calc(100vh - 24px); overflow: auto; }
#hovercard[data-kind="rep"] { width: 540px; }
#hovercard[data-kind="tr"] { width: 380px; }
.hc-rep { padding-top: 10px; }
.hc-rep .rep-box { border: 0; }
.hc-rep .rep-box .rh { padding: 0 0 8px; }
.hc-rep .rep-box .rb { padding: 8px 0 0; }
.hc-ready { margin-top: 10px; padding: 7px 10px; border-radius: 8px; background: #e3f5ec; color: #11744a; font-weight: 600; }
.hc-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.hc-name { font-weight: 700; font-size: 15px; }
.hc-sec { padding: 9px 0; border-bottom: 1px solid var(--border); }
.hc-t { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--subtle); margin-bottom: 5px; }
.hc-foot { padding-top: 8px; }
dl.kv.sm { grid-template-columns: 96px 1fr; gap: 3px 10px; }
.hc-road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hc-road div { border: 1px dashed var(--border-2); border-radius: 8px; padding: 5px 8px; color: var(--subtle); }
.hc-road div.on { border: 1px solid #c9d8f6; background: var(--blue-50); color: var(--blue); }
.hc-road b { display: block; font-size: 11px; letter-spacing: .03em; }
.hc-road span { font-weight: 600; font-size: 12.5px; }
.road { display: flex; align-items: center; gap: 0; }

.rd { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 3px; background: #e6eaf1; }
.rd.ok { background: var(--green); } .rd.absent { background: #a48bd6; } .rd.miss { background: #e7a29d; } .rd.off { background: #eef1f6; }

/* ─── lịch sử phiên bản */
del { background: #fbe4e2; color: #9c2f29; text-decoration: line-through; text-decoration-color: rgba(156,47,41,.5); border-radius: 3px; padding: 0 2px; }
ins { background: #ddf3e5; color: #166c3b; text-decoration: none; border-radius: 3px; padding: 0 2px; }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(11, 22, 45, .38); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; }
.modal-box { background: #fff; border-radius: 14px; width: min(860px, 100%); max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(11, 22, 45, .3); overflow: hidden; }
.hm-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.hm-body { padding: 8px 18px 18px; overflow: auto; }
ol.hist { list-style: none; margin: 0; padding: 0; position: relative; }
ol.hist:before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 10px; width: 2px; background: var(--border); }
.ev { position: relative; padding: 12px 0 12px 24px; border-bottom: 1px dashed var(--border); }
.ev:last-child { border-bottom: 0; }
.ev-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-dot { position: absolute; left: 0; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border-2); }
.ev.update .ev-dot { background: var(--amber); } .ev.absent .ev-dot { background: #a48bd6; } .ev.account .ev-dot { background: var(--blue); }
.ev-b { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin-top: 8px; font-size: 13px; }
.ev-b .k { color: var(--muted); font-weight: 600; }
.ev-b .v { white-space: pre-wrap; line-height: 1.6; }
.seg a.segl { padding: 6px 14px; border-radius: 6px; font-weight: 600; color: var(--muted); }
.seg a.segl.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16,32,64,.12); text-decoration: none; }
a.badge { text-decoration: none; cursor: pointer; }

/* ─── lộ trình đào tạo */
img.tech { object-fit: contain; flex: none; vertical-align: middle; }
.center { text-align: center; }
.pbar { height: 5px; border-radius: 3px; background: #e6eaf1; margin-top: 4px; width: 80px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.late-t { color: var(--red); font-weight: 600; }
.early-t { color: var(--green); font-weight: 600; }
table.trt th.mod, table.trt td.mod { text-align: center; padding-left: 4px; padding-right: 4px; }
table.trt th.mod { text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--text); min-width: 52px; }
table.trt td, table.trt th { padding-left: 7px; padding-right: 7px; }
table.trt th.mod, table.trt td.mod { padding-left: 2px; padding-right: 2px; }
table.trt td.who-c { width: 196px; }
table.trt .who { min-width: 0; }
table.trt .who .n .nm { white-space: normal; }
table.trt th.mod .pl { font-weight: 500; color: var(--subtle); font-size: 11px; }
table.trt th.mod img { margin-bottom: 2px; }
table.trt tfoot td { background: #f8fafd; border-bottom: 0; vertical-align: top; }
.trc { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 42px;
  border-radius: 8px; font-size: 11px; line-height: 1.2; border: 1px solid transparent; cursor: default; }
table.trt .trc { width: 52px; }
.trc span { white-space: nowrap; font-size: 10px; }
.trc b { font-size: 13px; }
.legend i.trc { width: 14px; height: 14px; border-radius: 4px; }
.trc.done { background: var(--green-50); color: #166c3b; border-color: #bfe3cc; }
.trc.done_late { background: #fff1e6; color: #b5541a; border-color: #f6cfae; }
.trc.doing { background: var(--blue-50); color: var(--blue); border-color: #c9d8f6; }
.trc.risk { background: var(--amber-50); color: #8a5a10; border-color: #f0d9ae; }
.trc.late { background: var(--red-50); color: var(--red); border-color: #f0c7c3; }
.trc.scheduled { color: var(--muted); border: 1px dashed var(--border-2); }
.trc.todo { color: #c2cad8; background: #f7f9fc; }
.trc[data-hc]:hover { box-shadow: 0 0 0 2px rgba(21, 84, 192, .2); }

.rstrip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.rs { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 5px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; font-size: 10.5px; font-weight: 600; color: var(--muted); position: relative; min-width: 0; }
.rs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rs.todo img, .rs.scheduled img { filter: grayscale(1); opacity: .45; }
.rs.done, .rs.done_late { border-color: #bfe3cc; background: var(--green-50); color: #166c3b; }
.rs.done_late { border-color: #f6cfae; background: #fff1e6; color: #b5541a; }
.rs.doing { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(21, 84, 192, .12); color: var(--blue); }
.rs.risk { border-color: #e9c27a; background: var(--amber-50); color: #8a5a10; }
.rs.late { border-color: #e7a29d; background: var(--red-50); color: var(--red); }
.rstrip.compact { gap: 3px; }
.rstrip.compact .rs { padding: 5px 0; }
.rstrip.compact .rs span { display: none; }
.rstrip.compact .rs img { width: 22px; height: 22px; }
.rs.done:after, .rs.done_late:after { content: "✓"; position: absolute; top: 2px; right: 4px; font-size: 10px; }

.trsum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.trsum > div { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; }
.trsum .l { font-size: 12px; font-weight: 600; color: var(--muted); }
.trsum .v { font-size: 20px; font-weight: 700; margin-top: 2px; }
.trsum .v small { font-size: 13px; color: var(--subtle); font-weight: 600; }
@media (max-width: 760px) { .trsum { grid-template-columns: 1fr 1fr; } .rstrip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.trlist { padding: 4px 18px; }
.tr-row { display: grid; grid-template-columns: 46px 118px 150px 92px 150px minmax(236px, 1fr) 124px; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border); }
.tr-row:last-child { border-bottom: 0; }
.tr-row label.lbl { font-size: 11.5px; color: var(--subtle); margin-bottom: 3px; }
.tr-row input[type=date] { height: 34px; padding: 0 8px; }
.tr-i { width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; background: #fff; }
.tr-row.todo .tr-i img { filter: grayscale(1); opacity: .5; }
.tr-row.doing .tr-i { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 84, 192, .1); }
.tr-row.late .tr-i { border-color: #e7a29d; }
.tr-row.done .tr-i, .tr-row.done_late .tr-i { border-color: #bfe3cc; background: var(--green-50); }
.tr-dl { font-weight: 600; height: 34px; display: flex; align-items: center; }
.donebox { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; cursor: pointer; height: 34px; }
.donebox input { width: 17px; height: 17px; accent-color: var(--green); }
.tr-st { text-align: right; }
@media (max-width: 1060px) { .tr-row { grid-template-columns: 46px 1fr 1fr; } .tr-st { text-align: left; } }

.ready-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border-2); border-radius: 10px; cursor: pointer; }
.ready-box:has(input:checked) { border-color: #9fd8bb; background: #f1faf5; }
.ready-box input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }
.ready-box > span { display: flex; flex-direction: column; gap: 3px; }
details.rename { margin: 4px 0 0 44px; }
details.rename summary { color: var(--blue); cursor: pointer; list-style: none; width: max-content; }
details.rename form { margin-top: 6px; gap: 6px; }
details.rename input { height: 30px; width: 240px; }

/* ─── điện thoại / màn hình hẹp */
.login-mbrand { display: none; }
@media (max-width: 860px) {
  .login-mbrand { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
}
@media (max-width: 760px) {
  .topbar .in { flex-wrap: wrap; padding: 10px 16px; gap: 10px 12px; }
  .topbar .tb-sep, .topbar .tb-name, .topbar .atl .word small { display: none; }
  .topbar .brand img.fpt { height: 22px; } .topbar .brand img.fhn { height: 25px; } .topbar .brand { gap: 10px; }
  .topbar .atl img { width: 26px; height: 26px; }
  .topbar .tb-user { gap: 6px; } .topbar .tb-user .btn { padding: 0 8px; }
  .topnav { order: 3; width: 100%; margin: 0; }
  .topnav a { flex: 1; text-align: center; padding: 7px 4px; }
  .page { padding: 16px; }
  .page-h { flex-wrap: wrap; }
  .card-h { flex-wrap: wrap; }
  .steps a { flex: 1 1 30%; }
  .slots { grid-template-columns: 52px repeat(5, minmax(0, 1fr)); gap: 5px; }
  .slot label { height: 38px; font-size: 12px; }
  .timeline li { grid-template-columns: 74px 1fr; }
  .timeline li > div:last-child { grid-column: 1 / -1; }
  .trsum { grid-template-columns: 1fr 1fr; }
  .trlist { padding: 4px 14px; }
  .tr-row { grid-template-columns: 46px 1fr 1fr; grid-template-areas: "i n st" "s s d" "e e e" "f f f"; gap: 8px 10px; }
  .tr-i { grid-area: i; } .tr-n { grid-area: n; } .tr-st { grid-area: st; text-align: right; }
  .tr-s { grid-area: s; } .tr-d { grid-area: d; } .tr-e { grid-area: e; } .tr-f { grid-area: f; }
  .tr-f input[type=date] { flex: 1; }
}
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side .logos { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
  .side .logos .atl { margin-top: 0; }
  .side nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  .side nav a { white-space: nowrap; }
  .side .me { display: none; }
  .main .head .in, .main .body { padding-left: 16px; padding-right: 16px; }
  .main .head .in { flex-wrap: wrap; }
}

/* ─── dải môn học gọn ở bảng Hôm nay */
.mstrip-w { display: inline-block; cursor: default; }
.mstrip { display: flex; gap: 2px; margin-bottom: 3px; }
.ms { position: relative; width: 21px; height: 21px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border-2); flex: none; vertical-align: middle; }
.ms img { width: 14px; height: 14px; object-fit: contain; }
.ms.todo, .ms.scheduled { background: #f4f6fa; border-color: #edf0f5; }
.ms.todo img, .ms.scheduled img { filter: grayscale(1); opacity: .3; }
.ms.done { background: var(--green-50); border-color: #9fd8bb; }
.ms.done_late { background: #fff1e6; border-color: #f2c49c; }
.ms.doing { border: 1.5px solid var(--blue); box-shadow: 0 0 0 2px rgba(21, 84, 192, .14); }
.ms.risk { border: 1.5px solid #e0a63a; }
.ms.late { background: var(--red-50); border: 1.5px solid var(--red); }
.ms i { position: absolute; right: -5px; bottom: -5px; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #fff;
  font-style: normal; font-size: 8px; font-weight: 800; line-height: 1; color: #fff; display: flex; align-items: center; justify-content: center; }
.ms.done i { background: var(--green); } .ms.done_late i { background: #e07a2e; } .ms.late i { background: var(--red); }
.mstrip-w:hover .mstrip { outline: 2px solid rgba(21, 84, 192, .18); outline-offset: 3px; border-radius: 6px; }
.mlegend { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; }
.mlegend .ms { width: 14px; height: 14px; border-radius: 4px; margin-left: 6px; }
.mlegend .ms i { width: 9px; height: 9px; font-size: 6px; right: -4px; bottom: -4px; border-width: 1px; }
.chip.sq { width: 20px; height: 18px; padding: 0; justify-content: center; margin-left: 2px; font-size: 11px; }
table.today-t th, table.today-t td { padding-left: 8px; padding-right: 8px; }
table.today-t .who { min-width: 200px; }
#hovercard[data-kind="trs"] { width: 440px; }
table.trmini { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
table.trmini th { text-align: left; font-size: 11px; color: var(--subtle); font-weight: 700; padding: 0 6px 4px 0; text-transform: uppercase; letter-spacing: .03em; }
table.trmini td { padding: 4px 6px 4px 0; border-top: 1px solid var(--border); white-space: nowrap; }
table.trmini tr.todo td, table.trmini tr.scheduled td { color: var(--subtle); }
table.trmini tr.todo img, table.trmini tr.scheduled img { filter: grayscale(1); opacity: .4; }
table.trmini .badge { height: 20px; font-size: 11px; }
