/* Của tôi (26/09/2026) — tiền tố ctoi-. Chỉ token theme (7 theme), bo tối đa 8px, viền chỉ để phân tách, không thẻ lồng thẻ.
   Bố cục A (anh Nghĩa chọn 26/09/2026): dải số chính (một bề mặt, ô ngăn 1px) + mục chi tiết (2 cột ≥ 1024px, 1 cột điện thoại). */
.ctoi-trang { max-width: 1180px; margin: 0 auto; padding: 4px 0 24px; color: var(--text-main); min-width: 0; }
.ctoi-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; margin-bottom: 14px; }
.ctoi-head h1 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.ctoi-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--text-muted); }
.ctoi-ic { flex: none; }
.ctoi-nut { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-color); border-radius: 8px;
  background: var(--bg-card); color: var(--text-main); font: inherit; font-weight: 600; cursor: pointer; }
.ctoi-nut:hover { background: var(--bg-card-hover, var(--bg-card)); }
.ctoi-nut:focus-visible { outline: 2px solid var(--theme-accent-strong); outline-offset: 2px; }
.ctoi-dv { font-size: .55em; font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.ctoi-tt { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; background: var(--bg-input, var(--bg-card)); }
.ctoi-tt.is-ok { color: var(--txt-ok); } .ctoi-tt.is-warn { color: var(--txt-warn); } .ctoi-tt.is-bad { color: var(--txt-bad); }
.ctoi-am { color: var(--txt-bad); }
.ctoi-note { margin: 10px 0 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.ctoi-canh { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); color: var(--txt-warn); font-size: 13.5px; }
.ctoi-trong { display: grid; justify-items: center; gap: 8px; padding: 36px 16px; text-align: center; color: var(--text-muted); border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); }
.ctoi-trong p { margin: 0; max-width: 44ch; line-height: 1.5; }
.ctoi-trong strong { color: var(--text-main); }
.ctoi-trong.is-bad strong { color: var(--txt-bad); }
.ctoi-spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-color); border-top-color: var(--theme-accent-strong); animation: ctoi-quay .8s linear infinite; }
@keyframes ctoi-quay { to { transform: rotate(360deg); } }

/* Thanh tiến độ + vạch "đúng tiến độ hôm nay" */
.ctoi-bar { position: relative; height: 10px; margin: 10px 0 4px; border-radius: 6px; background: var(--bg-input, var(--border-color)); overflow: visible; }
.ctoi-bar i { display: block; height: 100%; border-radius: 6px; background: var(--theme-accent-strong); }
.ctoi-bar.is-tre i { background: var(--theme-warning, var(--txt-warn)); }
.ctoi-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text-main); border-radius: 1px; }
.ctoi-dong2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ctoi-mo { font-size: 12.5px; color: var(--text-muted); }

/* Danh sách nhãn / giá trị */
.ctoi-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 12px 0 0; }
.ctoi-dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border-color); min-width: 0; }
.ctoi-dl > div:nth-child(odd) { padding-right: 14px; }
.ctoi-dl > div:nth-child(even) { padding-left: 14px; }
.ctoi-dl dt { font-size: 13.5px; color: var(--text-muted); }
.ctoi-dl .ctoi-dv { font-size: 12px; }
.ctoi-dl dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ctoi-dl-1 { grid-template-columns: 1fr; }
.ctoi-dl-1 > div:nth-child(n) { padding-left: 0; padding-right: 0; }
.ctoi-h3 { margin: 16px 0 0; font-size: 14px; }
.ctoi-bang { width: 100%; border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ctoi-bang th, .ctoi-bang td { padding: 9px 8px; border-top: 1px solid var(--border-color); text-align: right; white-space: nowrap; }
.ctoi-bang thead th { border-top: 0; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.ctoi-bang th[scope="row"] { text-align: left; font-weight: 600; padding-left: 0; }
.ctoi-goi { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ctoi-goi-o { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.ctoi-goi-o b { font-variant-numeric: tabular-nums; }
.ctoi-chip { display: inline-flex; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--border-color); font-size: 12px; font-weight: 600; }

/* Hóa đơn của tôi — danh sách một bề mặt */
.ctoi-hd { list-style: none; margin: 4px 0 0; padding: 0; }
.ctoi-hd li { padding: 10px 0; border-top: 1px solid var(--border-color); display: grid; gap: 3px; }
.ctoi-hd li:first-child { border-top: 0; }
.ctoi-hd-1, .ctoi-hd-2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-width: 0; }
.ctoi-hd-1 strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctoi-tien { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctoi-hd-2 { font-size: 12.5px; color: var(--text-muted); }
.ctoi-hd-3 { font-size: 13px; color: var(--text-main); overflow-wrap: anywhere; }

/* Dải số chính (một bề mặt, ô ngăn 1px) + mục */
.ctoi-dai { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); margin-bottom: 16px; }
.ctoi-o { min-width: 0; padding: 14px 16px 12px; border-left: 1px solid var(--border-color); }
.ctoi-o:first-child { border-left: 0; }
.ctoi-nhan { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.ctoi-nhan span { overflow: hidden; text-overflow: ellipsis; }
.ctoi-so { margin-top: 6px; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctoi-phu { margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
.ctoi-cot { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.ctoi-cot-a, .ctoi-cot-b { display: grid; gap: 16px; min-width: 0; }
.ctoi-muc { border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); padding: 14px 16px; min-width: 0; }
.ctoi-a > .ctoi-muc { margin-top: 16px; }
.ctoi-muc h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 16px; }
.ctoi-muc h2 .ctoi-ic { color: var(--txt-accent); }

@media (max-width: 1023px) { .ctoi-cot { grid-template-columns: minmax(0, 1fr); } .ctoi-dai { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ctoi-o:nth-child(3) { border-left: 0; } .ctoi-o:nth-child(n+3) { border-top: 1px solid var(--border-color); } }
@media (max-width: 760px) {
  .ctoi-head h1 { font-size: 22px; }
  .ctoi-head .ctoi-nut span { display: none; }
  .ctoi-head .ctoi-nut { width: 44px; padding: 0; justify-content: center; }
  .ctoi-o { padding: 12px; }
  .ctoi-so { font-size: 22px; }
  .ctoi-dl { grid-template-columns: 1fr; }
  .ctoi-dl > div:nth-child(n) { padding-left: 0; padding-right: 0; }
  .ctoi-muc { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .ctoi-spin { animation: none; } }
.ctoi-mau { font-size: 12px; margin-top: 2px; }   /* Cửa hàng trải nghiệm: nguồn dữ liệu mẫu (28/09/2026) */
.ctoi-nut-ct { margin-top: 12px; }
/* Bảng lương của tôi (19/11/2026): chi tiết từng khoản + lịch sử chấm công hiện sẵn, rộng cả trang. Máy tính 2 cột (chi tiết | chấm công), điện thoại xếp dọc.
   Bên trong dùng lại lớp lct- (luong-chi-tiet.css) và bl-cc- (bảng chấm công của ngăn Bảng lương) — không tạo bề mặt lồng nhau. */
/* Ô tổng lương nổi bật (19/11/2026): nền pha màu nhấn của theme, số lớn, vệt sáng lướt MỘT lần; «giảm chuyển động» thì đứng yên. */
.ctoi-bl-hero { position: relative; overflow: hidden; display: grid; gap: 4px; margin-top: 8px; padding: 18px 20px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--theme-accent-strong) 35%, var(--border-color));
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent-strong) 16%, var(--bg-card)), color-mix(in srgb, var(--txt-ok) 10%, var(--bg-card))); }
.ctoi-bl-hero-n { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.ctoi-bl-hero-so { font-size: clamp(30px, 8vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--theme-accent-strong); overflow-wrap: anywhere; }
.ctoi-bl-hero-g { font-size: 12px; color: var(--text-muted); }
.ctoi-bl-hero-loi { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--theme-accent-strong) 22%, transparent);
  font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--text-main); }
.ctoi-bl-hero-loi svg { flex: none; margin-top: 2px; color: var(--theme-accent-strong); }
@media (prefers-reduced-motion: no-preference) {
  .ctoi-bl-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%);
    background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--bg-card) 70%, transparent) 50%, transparent 65%); animation: ctoi-luot 1.4s ease-out .25s 1 both; }
}
@keyframes ctoi-luot { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
.ctoi-bl { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; margin-top: 8px; }
.ctoi-bl-ct, .ctoi-bl-cc { min-width: 0; }
.ctoi-bl-cc .ctoi-h3 { margin-top: 0; }
.ctoi-bl-cc .bl-cc.is-luon-mo { margin-top: 6px; }
.ctoi-bl-cc .bl-cc-bao { max-height: none; }   /* hiện đủ mọi ngày của kỳ, không cuộn trong khung */
#ctoi-m-bangluong:focus { outline: none; }
@media (max-width: 1023px) { .ctoi-bl { grid-template-columns: minmax(0, 1fr); } }
/* Điện thoại hẹp: thu lề ô để bảng chấm công vừa bề ngang màn, không phải vuốt ngang. */
@media (max-width: 480px) { .ctoi-bl-cc .bl-cc-bang th, .ctoi-bl-cc .bl-cc-bang td { padding: 8px 6px; } .ctoi-bl-cc .bl-cc-bang { font-size: 13px; } }
/* Xem lại tháng cũ (01/11/2026): ô chọn tháng cạnh nút Làm mới; cùng cỡ chạm 44px, cùng viền / nền ô nhập như Bảng lương (.bl-sel). */
.ctoi-dk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ctoi-thang { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.ctoi-thang select { min-height: 44px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input); color: var(--text-main); font: inherit; font-weight: 600; }
.ctoi-thang select:focus-visible { outline: 2px solid var(--theme-accent-strong); outline-offset: 2px; }
.ctoi-thang-cu { font-size: 12px; margin-top: 2px; }
@media (max-width: 600px) { .ctoi-thang span { display: none; } }
/* Anh Nghĩa 19/11: màn nhân viên bỏ các dòng chú thích chi tiết (cách tính, ghi chú nhỏ) — chỉ giữ số và cảnh báo có biểu tượng. Màn Bảng lương của chủ không đổi. */
.ctoi-bl .lct-g, .ctoi-bl .lct-og, .ctoi-bl .lct-tom-g, .ctoi-bl .lct-d.is-khong:has(> th[colspan]), .ctoi-bl .bl-ghi, .ctoi-bl .lct-ghi:not(:has(svg)) { display: none; }
