/* Sổ điểm danh — dùng token của mnhcm-theme (--mn-*), mọi selector nằm trong .oa để không ảnh hưởng theme. */
.oa {
  --oa-green: var(--mn-green, #1b6b47); --oa-green-dark: var(--mn-green-dark, #0f4530);
  --oa-soft: var(--mn-green-soft, #f4f8f4); --oa-tint: var(--mn-green-tint, #eaf3ec); --oa-pill: var(--mn-green-pill, #e3eee3);
  --oa-ink: var(--mn-ink, #16211a); --oa-body: var(--mn-body, #4b594e); --oa-muted: var(--mn-muted, #7c8a7f);
  --oa-line: var(--mn-line, #e3e8e1); --oa-line-soft: var(--mn-line-soft, #eff2ed); --oa-surface: #fff;
  --oa-radius: var(--mn-radius, 18px); --oa-radius-sm: var(--mn-radius-sm, 10px);
  --oa-shadow: var(--mn-shadow, 0 1px 2px rgba(15,26,17,.05), 0 6px 20px rgba(15,26,17,.06));
  --oa-late: #a8620b; --oa-late-soft: #fbf0d6; --oa-exc: #1f5fae; --oa-exc-soft: #e7f0fb; --oa-abs: #b42318; --oa-abs-soft: #fdecea;
  --oa-head: 72px; --oa-tap: 56px;
  font-family: var(--mn-font, "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 17px; line-height: 1.5; color: var(--oa-body); -webkit-font-smoothing: antialiased;
}
@media (max-width: 760px) { .oa { --oa-head: 64px; } }
.oa *, .oa *::before, .oa *::after { box-sizing: border-box; }
.oa [hidden] { display: none !important; }
.oa button, .oa input, .oa select, .oa textarea { font: inherit; color: inherit; }
.oa a { color: var(--oa-green); }
.oa h1, .oa h2, .oa h3 { color: var(--oa-ink); letter-spacing: -.015em; line-height: 1.25; }
.oa .muted { color: var(--oa-muted); }
.oa .small { font-size: 14px; }
.oa .loading { padding: 56px 16px; text-align: center; color: var(--oa-muted); }
.oa .center { text-align: center; }
.oa .ic { flex: none; }

/* Trang /diemdanh/, /dangnhap/ trong layout theme */
.oa--page { max-width: 760px; margin: 0 auto; padding: 0 0 calc(132px + env(safe-area-inset-bottom)); min-height: 60vh; }
.oa-center { display: flex; justify-content: center; padding: 40px 16px 64px; }
body.ori-att-page .mn-ai[data-mode="float"], body.oa-box-open .mn-ai[data-mode="float"], body.oa-box-open .mn-ctabar { display: none !important; }

/* Thẻ, nút, ô nhập */
.oa .card { background: var(--oa-surface); border: 1px solid var(--oa-line); border-radius: var(--oa-radius); box-shadow: var(--oa-shadow); padding: 22px; }
.oa .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--oa-tap); padding: 0 20px; border-radius: var(--mn-radius-pill, 999px); border: 1px solid var(--oa-line); background: #fff; color: var(--oa-ink); font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s; }
.oa .btn:hover { background: var(--oa-soft); }
.oa .btn:active { transform: scale(.98); }
.oa .btn--primary, .oa .btn--ok { background: var(--oa-green); border-color: var(--oa-green); color: #fff; }
.oa .btn--primary:hover, .oa .btn--ok:hover { background: var(--oa-green-dark); }
.oa .btn--danger { color: var(--oa-abs); border-color: #f1c4bf; }
.oa .btn--block { display: flex; width: 100%; }
.oa .btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.oa .btn[disabled] { opacity: .6; cursor: default; }
.oa .btn.is-busy { opacity: .6; cursor: progress; }
.oa .btn--done, .oa .btn--done[disabled] { opacity: 1; background: var(--oa-pill); border-color: var(--oa-pill); color: var(--oa-green-dark); }
.oa .btn--danger-solid { background: var(--oa-abs); border-color: var(--oa-abs); color: #fff; }
.oa .btn--danger-solid:hover { background: #8f1c13; }
.oa .field { display: block; margin: 0 0 14px; }
.oa .field > span:first-child, .oa .field__label { display: block; font-size: 15px; font-weight: 600; color: var(--oa-ink); margin: 0 0 6px; }
.oa .field__hint { display: block; margin-top: 4px; font-size: 13px; color: var(--oa-muted); }
.oa .field__err { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--oa-abs); }
.oa .field input, .oa .field select, .oa .field textarea, .oa .copy { width: 100%; min-height: var(--oa-tap); padding: 10px 16px; border: 1px solid var(--oa-line); border-radius: 14px; background: #fff; font-size: 17px; color: var(--oa-ink); }
.oa .field textarea { min-height: 150px; }
.oa .field input:focus, .oa .field select:focus, .oa .field textarea:focus { outline: 3px solid var(--oa-tint); border-color: var(--oa-green); }
.oa .field [aria-invalid="true"], .oa .field [aria-invalid="true"]:focus { border-color: var(--oa-abs); outline: 3px solid var(--oa-abs-soft); }
.oa .alert { background: var(--oa-abs-soft); color: var(--oa-abs); padding: 12px 14px; border-radius: 12px; }
.oa .note { display: flex; gap: 10px; align-items: flex-start; background: var(--oa-late-soft); color: #7a4a06; padding: 12px 14px; border-radius: 14px; margin: 12px 16px; font-size: 15px; }
.oa .note .ic { margin-top: 2px; }
.oa .note--info { background: var(--oa-tint); color: var(--oa-green-dark); }
.oa .banner { margin: 12px 16px 0; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--oa-late-soft); color: #7a4a06; display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; }
.oa .banner span { flex: 1; min-width: 0; }
.oa .banner--info { background: var(--oa-exc-soft); color: var(--oa-exc); }
.oa .banner .btn { flex: 0 0 auto; min-height: 36px; padding: 0 14px; font-size: 14px; background: #fff; border-color: transparent; }
.oa .pw { position: relative; display: block; }
.oa .pw input { padding-right: 78px; }
.oa .pw__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 42px; padding: 0 12px; border: 0; background: var(--oa-tint); color: var(--oa-green-dark); border-radius: 10px; font-weight: 700; cursor: pointer; }

/* Đăng nhập */
.oa .login { width: 100%; max-width: 440px; text-align: center; }
.oa .login form { text-align: left; margin-top: 18px; }
.oa .login h1 { margin: 0 0 4px; font-size: 24px; }
.oa .login > .muted { margin: 0; }
.oa .login .alert { margin: 16px 0 0; text-align: left; }
.oa .login__help { margin: 14px 0 0; }

/* Đầu sổ: dính ngay dưới header theme */
/* Đầu màn gọn: 1 dòng tiêu đề + ngày, nút bên phải; thanh tiến độ mảnh */
.oa .top { position: sticky; top: calc(var(--oa-head) + var(--oa-ab, 0px)); z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--oa-line-soft); padding: 10px 10px 10px 16px; }
.oa .top__row { display: flex; align-items: center; gap: 2px; }
.oa .top__title { flex: 1; min-width: 0; margin-right: 4px; }
.oa .top__title b { display: block; font-size: 18px; line-height: 1.3; color: var(--oa-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oa .top__title span { display: block; font-size: 13.5px; color: var(--oa-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oa .icon-btn { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--oa-ink); }
.oa .icon-btn:hover { background: var(--oa-soft); }
.oa .icon-btn[disabled] { opacity: .3; cursor: default; }
.oa .meter { margin: 8px 6px 0 0; }
.oa .progress { height: 6px; background: var(--oa-line-soft); border-radius: 99px; overflow: hidden; }
.oa .progress i { display: block; height: 100%; background: var(--oa-green); border-radius: 99px; transition: width .3s; }
.oa .count { font-size: 13.5px; color: var(--oa-muted); margin-top: 4px; }
.oa .count b { color: var(--oa-ink); }
.oa .top__pick { display: block; padding: 2px 6px 2px 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 8px; }
.oa .top__pick b { display: flex; align-items: center; gap: 4px; }
.oa .top__pick .ic { color: var(--oa-muted); }
.oa .top__pick:hover b { color: var(--oa-green-dark); }
.oa .seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 8px 6px 0 0; padding: 3px; border-radius: 12px; background: var(--oa-line-soft); }
.oa .seg2 button { min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--oa-muted); font-size: 14.5px; font-weight: 700; cursor: pointer; }
.oa .seg2 button[aria-selected="true"] { background: #fff; color: var(--oa-ink); box-shadow: 0 1px 3px rgba(15,26,17,.12); }
body.admin-bar .oa { --oa-ab: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { body.admin-bar .oa { --oa-ab: 0px; } } /* thanh admin không cố định trên điện thoại */

/* Danh sách bé */
.oa .list { list-style: none; margin: 8px 0 0; padding: 0 12px; }
.oa .kid { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--oa-line); border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; min-height: 72px; }
.oa .kid__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; min-height: var(--oa-tap); }
.oa .kid__main[disabled] { cursor: default; }
.oa .avatar { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 19px; color: #fff; }
.oa .kid__name { min-width: 0; }
.oa .kid__name b { display: block; font-size: 20px; color: var(--oa-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oa .kid__name span { display: block; font-size: 15px; color: var(--oa-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Đã điểm danh: nền nhạt + viền trái theo trạng thái, giờ đến ở dòng dưới — khác hẳn bé chưa điểm danh (nền trắng, nút Vắng) */
.oa .kid--present, .oa .kid--late, .oa .kid--excused, .oa .kid--absent { border-left-width: 5px; padding-left: 9px; }
.oa .kid--present { border-color: #b9d3c1; border-left-color: var(--oa-green); background: #eef6f0; }
.oa .kid--late { border-color: #f1d9a6; border-left-color: #d9a441; background: #fdf6e7; }
.oa .kid--excused { border-color: #c6d9f2; border-left-color: var(--oa-exc); background: #f0f5fc; }
.oa .kid--absent { border-color: #f1c4bf; border-left-color: var(--oa-abs); background: #fdf1ef; }
.oa .kid--present .kid__name span, .oa .kid--late .kid__name span { white-space: normal; line-height: 1.35; }
.oa .kid__name span b { display: inline; font-size: inherit; font-weight: 700; color: var(--oa-ink); }
.oa .kid--present .kid__name span b { color: var(--oa-green-dark); }
.oa .kid--late .kid__name span b { color: var(--oa-late); }
.oa .section-title--done { color: var(--oa-green-dark); }
.oa .chip { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; padding: 6px 11px 6px 9px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oa .chip--present { background: var(--oa-pill); color: var(--oa-green-dark); }
.oa .chip--late { background: var(--oa-late-soft); color: var(--oa-late); }
.oa .chip--excused { background: var(--oa-exc-soft); color: var(--oa-exc); }
.oa .chip--absent { background: var(--oa-abs-soft); color: var(--oa-abs); }
.oa .search { display: flex; align-items: center; gap: 8px; margin: 12px 12px 0; padding: 0 14px; min-height: 48px; border: 1px solid var(--oa-line); border-radius: 14px; background: #fff; color: var(--oa-muted); }
.oa .search:focus-within { border-color: var(--oa-green); outline: 3px solid var(--oa-tint); }
.oa .search input::-webkit-search-cancel-button { filter: grayscale(1); }
.oa .search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--oa-ink); min-height: 46px; }
.oa .wrap .search { margin: 0 0 4px; }
.oa .section-title { margin: 18px 16px 6px; font-size: 13px; font-weight: 700; color: var(--oa-muted); text-transform: uppercase; letter-spacing: .04em; }
.oa .section-title--flush { margin: 16px 4px 8px; }
.oa .empty { text-align: center; padding: 32px 16px; color: var(--oa-muted); }
.oa .empty .btn { margin-top: 14px; }

/* Thanh đáy (trang /diemdanh/) */
.oa .bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--oa-line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.oa .bottom > * { max-width: 736px; margin-left: auto; margin-right: auto; }
.oa .bottom .btn { display: flex; width: 100%; }

/* Cả trường, học sinh, cô giáo, ngày nghỉ */
.oa .wrap { padding: 14px 12px; }
.oa .klass { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--oa-line); border-radius: 16px; padding: 16px; margin-bottom: 10px; cursor: pointer; }
.oa .klass:hover { border-color: var(--mn-green-line, #b9d3c1); }
.oa .klass__head { display: flex; justify-content: space-between; align-items: center; font-size: 19px; font-weight: 700; color: var(--oa-ink); }
.oa .klass p { margin: 6px 0 0; font-size: 15px; color: var(--oa-muted); }
.oa .klass__count { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.oa .klass__count.is-full { color: var(--oa-green); }
.oa .klass__count .ic:last-child { color: var(--oa-muted); }
.oa .row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.oa .item { background: #fff; border: 1px solid var(--oa-line); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.oa .item__main { flex: 1; min-width: 0; }
.oa .item__main b { display: block; color: var(--oa-ink); }
.oa .item__main b { overflow: hidden; text-overflow: ellipsis; }
.oa .item__main span { display: block; font-size: 14px; color: var(--oa-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oa .item > .ic { color: var(--oa-muted); }
.oa .item--link { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.oa .item--link:hover { border-color: var(--mn-green-line, #b9d3c1); }
.oa .item.is-off { opacity: .55; }
.oa .badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--oa-tint); color: var(--oa-green-dark); font-size: 12px; font-weight: 700; font-style: normal; vertical-align: 2px; }
.oa .badge--warn { background: var(--oa-late-soft); color: #7a4a06; }
.oa .badge--off { background: var(--oa-line-soft); color: var(--oa-muted); }
.oa .gap { height: 12px; }
.oa .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.oa .actions .btn { padding: 0 10px; white-space: nowrap; }
@media (max-width: 400px) { .oa .actions .ic { display: none; } }
.oa .seg__add { border-style: dashed !important; color: var(--oa-green-dark); display: inline-flex; align-items: center; gap: 4px; }
.oa .quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; font-size: 14px; color: var(--oa-body); }
.oa .quick span { margin-right: auto; }
.oa .chipbtn { min-height: 40px; padding: 0 16px; border: 1px solid var(--oa-line); border-radius: 99px; background: #fff; font-weight: 700; cursor: pointer; }
.oa .chipbtn:hover { background: var(--oa-soft); }
.oa .icon-btn--danger { color: var(--oa-abs); }
.oa .icon-btn--danger:hover { background: var(--oa-abs-soft); }
.oa .seg { display: flex; gap: 6px; overflow-x: auto; padding: 12px 12px 0; }
.oa .seg button { flex: 0 0 auto; min-height: 42px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--oa-line); background: #fff; font-weight: 600; cursor: pointer; }
.oa .seg button[aria-pressed="true"] { background: var(--oa-green); border-color: var(--oa-green); color: #fff; }
.oa table.preview { width: 100%; border-collapse: collapse; font-size: 15px; }
.oa table.preview { margin: 8px 0 14px; }
.oa table.preview td { padding: 8px 6px; border-bottom: 1px solid var(--oa-line-soft); vertical-align: top; }
.oa table.preview td:last-child { text-align: right; width: 36px; }
.oa table.preview td.ok { color: var(--oa-green); }
.oa table.preview .err { display: block; color: var(--oa-abs); font-weight: 600; font-size: 14px; }
.oa .bad { color: var(--oa-abs); }

/* Thống kê */
.oa .statbar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.oa .seg--period { padding: 0; margin: 0; flex: none; }
.oa .daypick { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 10px 0 12px; border: 1px solid var(--oa-line); border-radius: 99px; background: #fff; color: var(--oa-muted); }
.oa .daypick select { flex: 1; min-width: 0; appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 700; color: var(--oa-ink); cursor: pointer; padding: 8px 0; }
.oa .daypick:focus-within { border-color: var(--oa-green); outline: 3px solid var(--oa-tint); }
.oa .card__action { margin-top: 12px; }
.oa .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.oa .kpi { background: #fff; border: 1px solid var(--oa-line); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.oa .kpi span { display: block; font-size: 13px; font-weight: 700; color: var(--oa-muted); text-transform: uppercase; letter-spacing: .03em; }
.oa .kpi b { display: block; font-size: 30px; line-height: 1.2; color: var(--oa-ink); font-variant-numeric: tabular-nums; }
.oa .kpi b small { font-size: 17px; color: var(--oa-muted); font-weight: 600; }
.oa .kpi em { display: block; font-style: normal; font-size: 13px; color: var(--oa-muted); }
.oa .kpi em.up { color: var(--oa-green); font-weight: 700; }
.oa .kpi em.down { color: var(--oa-abs); font-weight: 700; }
.oa .card { margin-bottom: 12px; }
.oa .wrap .card { padding: 14px 14px 12px; box-shadow: none; }
.oa .card__title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--oa-ink); }
.oa .chart { --plot: 132px; --axis: 22px; position: relative; display: flex; align-items: flex-end; gap: 6px; height: calc(var(--plot) + var(--axis)); }
.oa .bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; border-radius: 8px; }
.oa .bar:hover .bar__plot i { filter: brightness(.95); }
.oa .bar__plot { height: var(--plot); width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.oa .bar__plot em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--oa-muted); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.oa .bar__plot i { display: block; width: 72%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: #a9d2bb; }
.oa .bar.is-sel .bar__plot i { background: var(--oa-green); }
.oa .bar.is-sel .bar__plot em, .oa .bar.is-sel .bar__x { color: var(--oa-green-dark); font-weight: 800; }
.oa .bar.is-empty .bar__plot i { height: 3px !important; background: var(--oa-line); }
.oa .bar__x { height: var(--axis); line-height: var(--axis); font-size: 12px; font-weight: 600; color: var(--oa-muted); }
.oa .chart--dense { gap: 2px; }
.oa .chart--dense .bar__plot i { width: 80%; border-radius: 3px 3px 1px 1px; }
.oa .chart--dense .bar__x { font-size: 9.5px; }
.oa .chart__avg { position: absolute; left: 0; right: 0; border-top: 2px dashed #d9a441; pointer-events: none; }
.oa .chart__none { position: absolute; left: 0; right: 0; top: 40%; margin: 0; text-align: center; font-size: 14px; color: var(--oa-muted); }
.oa .chart__legend { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; color: var(--oa-muted); }
.oa .chart__legend i { width: 18px; border-top: 2px dashed #d9a441; }
.oa .breakdown { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 20px; font-size: 15px; }
.oa .breakdown li { display: flex; align-items: center; gap: 8px; }
.oa .breakdown b { margin-left: auto; color: var(--oa-ink); font-variant-numeric: tabular-nums; }
.oa .breakdown .is-zero { color: var(--oa-muted); }
.oa .breakdown .is-zero b { color: var(--oa-muted); font-weight: 500; }
.oa .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.oa .dot--present { background: var(--oa-green); } .oa .dot--late { background: #d9a441; } .oa .dot--sick { background: #e0794f; }
.oa .dot--excused { background: var(--oa-exc); } .oa .dot--absent { background: var(--oa-abs); } .oa .dot--unmarked { background: var(--oa-line); }

/* Bảng trượt + thông báo */
.oa .sheet { position: fixed; inset: 0; z-index: 10010; background: rgba(15, 26, 17, .45); display: flex; align-items: flex-end; }
.oa .sheet__panel { width: 100%; max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); }
.oa .sheet__head { display: flex; align-items: flex-start; gap: 8px; margin: 0 -6px 14px 0; }
.oa .sheet__head > div { flex: 1; min-width: 0; padding-top: 6px; }
.oa .sheet__panel h2 { margin: 0; font-size: 21px; }
.oa .sheet__panel .sub { margin: 4px 0 0; color: var(--oa-muted); font-size: 15px; }
.oa .sheet__err { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--oa-abs-soft); color: var(--oa-abs); font-weight: 600; font-size: 15px; }
.oa .sheet__panel .btn--block { margin: 4px 0 10px; }
.oa .sheet__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oa .opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--oa-tap); margin: 0 0 8px; padding: 0 16px; border: 1px solid var(--oa-line); border-radius: 14px; background: #fff; color: var(--oa-ink); font-size: 17px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.oa .opt:hover { background: var(--oa-soft); }
.oa .opt .ic { color: var(--oa-muted); }
.oa .opt--ok { background: var(--oa-green); border-color: var(--oa-green); color: #fff; }
.oa .opt--ok:hover { background: var(--oa-green-dark); }
.oa .opt--ok .ic { color: #fff; }
.oa .opt--danger, .oa .opt--danger .ic { color: var(--oa-abs); }
.oa .opt--on { border-color: var(--oa-green); }
.oa .opt--on .ic { color: var(--oa-green); }
.oa .opt[disabled] { opacity: .6; }
.oa .opts-sep { height: 1px; background: var(--oa-line-soft); margin: 8px 0 16px; }
.oa .rest { margin-bottom: 12px; }
.oa .rest .item { padding: 8px 10px; }
.oa .checks { display: grid; gap: 8px; margin-bottom: 16px; }
.oa .checks label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid var(--oa-line); border-radius: 14px; cursor: pointer; font-weight: 600; color: var(--oa-ink); }
.oa .checks input { width: 22px; height: 22px; accent-color: var(--oa-green); }
.oa .checks label:has(input:checked) { border-color: var(--oa-green); background: var(--oa-soft); }
.oa .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oa .more { margin: 0 0 14px; }
.oa .more summary { display: flex; align-items: center; min-height: 44px; color: var(--oa-green-dark); font-weight: 600; cursor: pointer; }
.oa .filepick { position: relative; display: block; margin-bottom: 8px; }
.oa .filepick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.oa .filepick .btn { cursor: pointer; border-style: dashed; border-width: 2px; min-height: 64px; }
.oa .filepick:focus-within .btn { outline: 3px solid var(--oa-tint); }
.oa .copy { min-height: 120px; margin-bottom: 10px; }
.oa .secret { font-size: 34px; font-weight: 800; letter-spacing: 4px; text-align: center; color: var(--oa-ink); margin: 4px 0 8px; }
.oa .steps { font-size: 17px; line-height: 1.7; padding-left: 22px; margin: 0; }
.oa .toast { position: fixed; left: 12px; right: 12px; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 10020; background: var(--oa-ink); color: #fff; border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-size: 16px; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); max-width: 560px; margin: 0 auto; }
.oa .toast span { flex: 1; }
.oa .toast button { background: none; border: 0; color: #9fe0b9; font-weight: 800; font-size: 16px; min-height: 44px; padding: 0 8px; cursor: pointer; text-transform: uppercase; }
.oa .pending { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #e2962e; margin-left: 6px; vertical-align: middle; }
.oa .offline { background: var(--oa-late-soft); color: #7a4a06; text-align: center; font-size: 14px; font-weight: 600; padding: 8px; }

@media (max-width: 760px) {
  .oa .sheet__panel::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 99px; background: var(--oa-line); margin: -8px auto 12px; }
}
@media (min-width: 761px) {
  .oa .sheet { align-items: center; justify-content: center; }
  .oa .sheet__panel { max-width: 520px; border-radius: 22px; }
}

/* Nút / thẻ điểm danh ở cột phải trang trường (dùng class nút của theme) */
.mn-att-entry { margin-top: 12px; }
.mn-att-card { margin-top: 16px; padding: 16px; border: 1px solid var(--mn-line, #e3e8e1); border-radius: var(--mn-radius, 18px); background: var(--mn-surface, #fff); font-size: 14px; }
.mn-att-card__head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; color: var(--mn-ink, #16211a); }
.mn-att-card__head a { font-size: 13px; font-weight: 600; }
.mn-att-card__row { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 6px; color: var(--mn-body, #4b594e); }
.mn-att-card__row b { color: var(--mn-ink, #16211a); font-variant-numeric: tabular-nums; }
.mn-att-card .mn-btn { margin-top: 10px; }

/* Hộp sổ điểm danh trên trang trường — cùng khuôn hộp Hỏi trợ lý (.mn-ai): 400×640, đầu xanh, avatar tròn 34px */
.oa-box { --oa-ab: 0px; position: fixed; right: 20px; bottom: 20px; z-index: 9995; font-family: var(--mn-font, "Be Vietnam Pro", sans-serif); font-size: 15px; line-height: 1.5; }
body.admin-bar .oa-box { --oa-ab: var(--wp-admin--admin-bar--height, 32px); }
.oa-box[hidden] { display: none; }
.oa-box__panel { display: flex; flex-direction: column; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 40px - var(--oa-ab))); background: var(--mn-surface, #fff); border: 1px solid var(--mn-line, #e3e8e1); border-radius: var(--mn-radius, 18px); box-shadow: 0 12px 40px rgba(15, 26, 17, .18); overflow: hidden; }
.oa-box__panel:not(:has(.oa-app)) { height: auto; max-height: calc(100vh - 40px - var(--oa-ab)); }
.oa-box__head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--mn-green, #1b6b47); color: #fff; }
.oa-box__icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #34a36d, #0f4530); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.oa-box__title { flex: 1; min-width: 0; }
.oa-box__title strong { display: block; font-size: 15px; }
.oa-box__title span { display: block; font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oa-box__btn { flex: none; display: inline-flex; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; }
.oa-box__btn:hover { background: rgba(255, 255, 255, .15); }
.oa-box__shrink, .oa-box.is-wide .oa-box__grow { display: none; }
.oa-box.is-wide .oa-box__shrink { display: block; }
.oa--box { flex: 1; min-height: 0; overflow-y: auto; background: var(--mn-green-soft, #f4f8f4); --oa-head: 0px; --oa-ab: 0px; font-size: 16px; }
.oa--box .oa-app { min-height: 100%; display: flex; flex-direction: column; }
.oa--box .top { top: 0; }
.oa--box .bottom { position: sticky; margin-top: auto; padding-bottom: 10px; }
.oa--box .oa-center { padding: 16px 14px; }
.oa--box .login > .muted:not(.login__help) { display: none; }
.oa--box .login h1 { font-size: 20px; }
.oa--box .card { box-shadow: none; }
.oa--box .toast { position: absolute; bottom: 84px; left: 12px; right: 12px; }
.oa--box .sheet { position: absolute; }
.oa--box .sheet__panel { max-height: 92%; }
.oa-box__panel { position: relative; }
/* Mở rộng: khung bên phải cao hết màn hình, trang trường vẫn ở bên trái */
.oa-box.is-wide { top: var(--oa-ab); right: 0; bottom: 0; }
.oa-box.is-wide .oa-box__panel { width: min(720px, 100vw); height: 100%; max-height: none; border-radius: 0; border-width: 0 0 0 1px; box-shadow: -12px 0 40px rgba(15, 26, 17, .14); }
.oa-box.is-wide .oa--box .oa-app { max-width: 720px; }
/* Điện thoại: toàn màn hình như Hỏi trợ lý, nằm trên thanh admin */
@media (max-width: 640px) {
  .oa-box, .oa-box.is-wide { inset: 0; z-index: 100000; }
  .oa-box__panel, .oa-box__panel:not(:has(.oa-app)), .oa-box.is-wide .oa-box__panel { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; box-shadow: none; }
  .oa-box__wide { display: none; }
  }
.oa .field--gap { margin-top: 14px; }
.oa .opt small { font-weight: 500; color: var(--oa-muted); }

/* Chọn cách điểm danh: 2 lựa chọn dạng thẻ, chọn sẵn "vừa vào lớp" */
.oa .choice { display: grid; gap: 8px; margin-bottom: 12px; }
.oa .choice__opt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 1.5px solid var(--oa-line); border-radius: 14px; background: #fff; cursor: pointer; }
.oa .choice__opt input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--oa-green); }
.oa .choice__opt b { display: block; font-size: 17px; color: var(--oa-ink); }
.oa .choice__opt small { display: block; font-size: 14px; color: var(--oa-muted); }
.oa .choice__opt:has(input:checked) { border-color: var(--oa-green); background: var(--oa-soft); }
.oa [data-at] { margin-bottom: 4px; }
.oa [data-at] .field__hint { margin: -6px 0 10px; }

/* Nút × xoá điểm danh ở góc phải thẻ bé đã điểm danh */
.oa .kid { position: relative; }
.oa .kid__x { position: absolute; top: -9px; right: -7px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--oa-line); border-radius: 50%; background: #fff; color: var(--oa-muted); box-shadow: 0 1px 4px rgba(15, 26, 17, .14); cursor: pointer; padding: 0; }
.oa .kid__x::before { content: ""; position: absolute; inset: -8px; } /* vùng chạm rộng hơn nút */
.oa .kid__x:hover, .oa .kid__x:focus-visible { color: var(--oa-abs); border-color: #f1c4bf; background: var(--oa-abs-soft); }

/* Điểm danh thành công: thẻ trắng viền xanh, ✓ tự vẽ, vòng sáng, thanh 3 giây; dòng bé sáng lên */
.oa .toast--ok { background: #fff; color: var(--oa-ink); border: 1px solid #b9d3c1; overflow: hidden; padding: 12px 14px 14px; animation: oa-pop .38s cubic-bezier(.2, .9, .3, 1.25); }
.oa .toast--ok b { display: block; font-size: 16px; }
.oa .toast--ok small { display: block; font-size: 13.5px; color: var(--oa-muted); }
.oa .toast--ok > span { min-width: 0; }
.oa .toast--ok b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oa .toast--ok button { flex: none; color: var(--oa-green-dark); text-transform: none; font-size: 15px; padding: 0 4px; }
.oa .ok-check { flex: none; width: 36px; height: 36px; border-radius: 50%; animation: oa-ring 1.1s .25s ease-out; }
.oa .ok-check circle { fill: var(--oa-green); transform-origin: center; animation: oa-scale .35s ease-out; }
.oa .ok-check path { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: oa-draw .4s .22s ease-out forwards; }
.oa .toast__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--oa-green); transform-origin: left; animation: oa-bar 3s linear forwards; }
.oa .kid.is-new { animation: oa-flash 1.6s ease-out; }
@keyframes oa-pop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes oa-scale { from { transform: scale(.4); } to { transform: scale(1); } }
@keyframes oa-draw { to { stroke-dashoffset: 0; } }
@keyframes oa-ring { from { box-shadow: 0 0 0 0 rgba(27, 107, 71, .45); } to { box-shadow: 0 0 0 14px rgba(27, 107, 71, 0); } }
@keyframes oa-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes oa-flash { 0% { box-shadow: 0 0 0 3px rgba(27, 107, 71, .35); background: #d6ecdd; } 100% { box-shadow: 0 0 0 0 rgba(27, 107, 71, 0); } }
@media (prefers-reduced-motion: reduce) {
  .oa .toast--ok, .oa .ok-check, .oa .ok-check circle, .oa .kid.is-new { animation: none; }
  .oa .ok-check path { animation: none; stroke-dashoffset: 0; }
}

/* Ghi chú / lý do nghỉ: tối đa 2 dòng, "Xem thêm" mở đầy đủ */
.oa .kid { flex-wrap: wrap; }
.oa .kid__note { flex-basis: 100%; display: flex; align-items: flex-end; gap: 6px; margin: 2px 0 2px 58px; font-size: 15px; color: var(--oa-body); }
.oa .kid__note span { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; }
.oa .kid__note.is-open span { display: block; -webkit-line-clamp: unset; }
.oa .kid__note .ic { color: var(--oa-muted); margin-right: 4px; vertical-align: -2px; }
.oa .kid__note button { flex: none; min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--oa-green-dark); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.oa .note-input { min-height: 96px !important; resize: vertical; }
.oa .field__hint.is-over { color: var(--oa-abs); font-weight: 700; }
/* Sắp xếp bé đã điểm danh */
.oa .section-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 12px 6px 16px; }
.oa .section-row .section-title { margin: 0; }
.oa .sorter { display: inline-flex; padding: 2px; border-radius: 99px; background: var(--oa-line-soft); }
.oa .sorter button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 99px; background: transparent; color: var(--oa-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.oa .sorter button[aria-pressed="true"] { background: #fff; color: var(--oa-ink); box-shadow: 0 1px 2px rgba(15, 26, 17, .12); }
.oa .kid__note.is-open { flex-direction: column; align-items: flex-start; }
.oa .section-hint { display: block; margin: 2px 0 0; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--oa-green-dark); }
.oa .linkbtn { flex: none; border: 0; background: none; padding: 0 6px; min-height: 36px; color: #7a4a06; font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Lời chào */
.oa .hello { display: flex; align-items: center; gap: 12px; margin: 12px 16px 10px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, #eef7f0, #f7fbf2); border: 1px solid #d7eadc; color: var(--oa-green-dark); }
.oa .hello .ic { flex: none; color: #d9a441; }
.oa .hello b { display: block; font-size: 16.5px; color: var(--oa-ink); }
.oa .hello span { display: block; font-size: 14.5px; color: var(--oa-body); }
/* Tiêu đề nhóm có icon */
.oa .section-title { display: flex; align-items: center; gap: 6px; }
.oa .section-title--todo .ic { color: var(--oa-muted); }
.oa .section-title--done .ic { color: var(--oa-green); }
/* Đã về: tím xám nhẹ, chữ dịu hơn */
.oa .kid--gone { background: #f5f4fa !important; border-color: #dedbee !important; border-left-color: #8b83b8 !important; }
.oa .kid--gone .kid__name b { color: #4a4566; }
.oa .chip--gone { background: #ebe9f6; color: #5b5490; }
.oa .btn--pickup { flex: none; gap: 6px; padding: 0 12px; border-color: #cfcae6; color: #5b5490; background: #fff; }
.oa .btn--pickup:hover { background: #f1effa; }
/* Khám sáng */
.oa .kid__tags { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0 58px; }
.oa .tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; background: var(--oa-line-soft); color: var(--oa-body); font-size: 13px; font-weight: 700; }
.oa .tag--warn { background: #fdecdf; color: #b4501a; }
.oa .tags-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.oa .tags-pick label { position: relative; cursor: pointer; }
.oa .tags-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.oa .tags-pick span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--oa-line); border-radius: 99px; background: #fff; font-weight: 700; color: var(--oa-ink); }
.oa .tags-pick input:checked + span { border-color: var(--oa-green); background: var(--oa-soft); color: var(--oa-green-dark); }
.oa .tags-pick input:focus-visible + span { outline: 3px solid var(--oa-tint); }
.oa .more.health summary { gap: 8px; }
.oa .more.health summary small { font-weight: 500; color: var(--oa-muted); }
.oa .more.health[open] { padding: 0 0 4px; }
.oa .kid--gone .kid__name span b { color: #5b5490; }
.oa .note--flush { margin: 0 0 12px; }

/* Bé đã về: xám xanh, avatar nhạt — xong buổi, chỉ xem */
.oa .kid--gone { background: #eef1f5 !important; border-color: #d5dbe3 !important; border-left-color: #64748b !important; }
.oa .kid--gone .avatar { filter: grayscale(.7); opacity: .65; }
.oa .kid--gone .kid__name b { color: #475569; }
.oa .kid--gone .kid__name span, .oa .kid--gone .kid__name span b { color: #64748b; }
.oa .chip--gone { background: #e2e8f0; color: #475569; }
/* Lịch trình trong ngày */
.oa .tl { list-style: none; margin: 4px 0 14px; padding: 0 0 0 4px; }
.oa .tl__step { position: relative; display: flex; gap: 12px; padding: 0 0 16px 0; }
.oa .tl__step::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--oa-line); }
.oa .tl__step:last-child::before { display: none; }
.oa .tl__step > .ic { flex: none; width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: var(--oa-tint); color: var(--oa-green-dark); }
.oa .tl__step--warn > .ic { background: #fdecdf; color: #b4501a; }
.oa .tl__step--note > .ic { background: var(--oa-line-soft); color: var(--oa-body); }
.oa .tl__step--out > .ic { background: #e2e8f0; color: #475569; }
.oa .tl__step b { display: block; font-size: 17px; color: var(--oa-ink); }
.oa .tl__step span { display: block; font-size: 15px; color: var(--oa-body); white-space: pre-line; }
.oa .linkbtn--center { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; color: var(--oa-muted); }

/* Số thứ tự trong nhóm: nhỏ, gọn, dễ tra soát */
.oa .kid__no { flex: none; width: 18px; margin-right: -4px; text-align: right; font-size: 13px; font-weight: 700; color: var(--oa-muted); font-variant-numeric: tabular-nums; }
.oa .kid__note, .oa .kid__tags { margin-left: 72px; }
.oa .section-title--gone { color: #475569; }
.oa .section-title--gone .ic { color: #64748b; }
.oa .kid__name em.warn { font-style: normal; font-weight: 700; color: #b4501a; }
.oa .dot--open { background: #e0794f; }

/* Cô phụ trách lớp */
.oa .top__teachers { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 13.5px; color: var(--oa-body); }
.oa .top__teachers .ic { color: var(--oa-muted); }
.oa .klass__teachers { display: flex; align-items: center; gap: 5px; margin: 4px 0 0 !important; font-size: 14px !important; color: var(--oa-body) !important; }
/* Dòng thời gian 1 ngày (Thống kê) */
.oa .tl--day { margin-bottom: 0; }
.oa .tl--day .tl__step b small { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--oa-muted); }
.oa .tl__line { display: block !important; margin-top: 3px; line-height: 1.55; }
.oa .tl__line .ic { display: inline-block; margin-right: 6px; vertical-align: -2px; color: var(--oa-muted); }
.oa .tl__line b { display: inline; font-size: inherit; font-weight: 700; color: var(--oa-ink); }
.oa .tl--day span small, .oa .tl__line small { font-size: 12px; color: var(--oa-muted); }
