/* =====================================================================
   v20.4 – TÔNG MÀU GIAO DIỆN: lớp theme-* đặt trên thẻ <html>.
   Mặc định công ty: QTV chọn ở Cá nhân hóa; mỗi người có thể chọn riêng.
   Màu nhấn chính: --lagoon (nút, liên kết, mục đang chọn…).
   ===================================================================== */
html.theme-blue {
  --lagoon: #1d5fbf; --lagoon-600: #174f9f; --lagoon-700: #123f80; --lagoon-50: #e8f0fb; --lagoon-200: #a9c4ea; --brand-rgb: 29, 95, 191;
  --ink: #142a47; --ink-2: #1d3a63; --text: #1f2a37; --muted: #5f6b7a;
  --paper: #f4f7fb; --line: #e1e7f0; --line-strong: #c9d3e1; --nav-hover: #eef3fa; --nav-ink: #2f3d52; --nav-ico: #7b879a;
  --bs-link-hover-color-rgb: 23, 79, 159;
}
html.theme-sky {
  --lagoon: #0b7fa6; --lagoon-600: #096a8b; --lagoon-700: #075670; --lagoon-50: #e3f4fa; --lagoon-200: #9fd3e6; --brand-rgb: 11, 127, 166;
  --ink: #12303d; --ink-2: #184152; --text: #1f2d33; --muted: #5d6f77;
  --paper: #f3f8fa; --line: #e0eaee; --line-strong: #c6d6dd; --nav-hover: #edf5f8; --nav-ink: #2f4249; --nav-ico: #7a8c93;
  --bs-link-hover-color-rgb: 9, 106, 139;
}
html.theme-teal {
  --lagoon: #0b6e62; --lagoon-600: #095a50; --lagoon-700: #074a42; --lagoon-50: #e4f2ef; --lagoon-200: #9ccbc2; --brand-rgb: 11, 110, 98;
  --bs-link-hover-color-rgb: 9, 90, 80;
}
html.theme-green {
  --lagoon: #1f7a4d; --lagoon-600: #186240; --lagoon-700: #124e33; --lagoon-50: #e6f4ec; --lagoon-200: #a8d5bb; --brand-rgb: 31, 122, 77;
  --ink: #16301f; --ink-2: #1f4029; --text: #212d25; --muted: #607066;
  --paper: #f4f8f5; --line: #e2eae4; --line-strong: #c9d7cd; --nav-hover: #eef5f0; --nav-ink: #33443a; --nav-ico: #7b8b80;
  --bs-link-hover-color-rgb: 24, 98, 64;
}
html.theme-navy {
  --lagoon: #2c4a9a; --lagoon-600: #233c7e; --lagoon-700: #1b2f63; --lagoon-50: #eaeefa; --lagoon-200: #b2bfe6; --brand-rgb: 44, 74, 154;
  --ink: #161f3d; --ink-2: #212c52; --text: #222838; --muted: #626a7d;
  --paper: #f5f6fa; --line: #e3e6ef; --line-strong: #cbd0de; --nav-hover: #eff1f8; --nav-ink: #333a4f; --nav-ico: #7e8497;
  --bs-link-hover-color-rgb: 35, 60, 126;
}
/* Các chỗ còn ghi cứng màu xanh ngọc */
html[class*="theme-"] .alert-success { --bs-alert-bg: var(--green-50); }
html[class*="theme-"] .ws-bar span, html[class*="theme-"] .checkin-day-track span { background: var(--lagoon); }
html[class*="theme-"] .avatar:not(.sp-av) { background: var(--lagoon); }

/* ---------- Ảnh đại diện ---------- */
.avatar > .av-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.avatar { position: relative; }
.avatar:has(> .av-img) { color: transparent; }
.avatar .pres-dot { z-index: 1; }
/* Trang Cá nhân hóa */
.me-av { width: 120px; height: 120px; font-size: 2.2rem; }
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.theme-opt { position: relative; display: flex; flex-direction: column; gap: .4rem; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.theme-opt:hover { border-color: var(--line-strong); }
.theme-opt input { position: absolute; opacity: 0; }
.theme-opt:has(input:checked) { border-color: var(--lagoon); box-shadow: 0 0 0 2px var(--lagoon); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--lagoon); outline-offset: 2px; }
.theme-sw { display: flex; height: 34px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .06); }
.theme-sw span { flex: 1; }
.theme-sw .s1 { flex: 2; }
.tsw-blue .s1 { background: #1d5fbf; } .tsw-blue .s2 { background: #e8f0fb; } .tsw-blue .s3 { background: #142a47; }
.tsw-sky .s1 { background: #0b7fa6; } .tsw-sky .s2 { background: #e3f4fa; } .tsw-sky .s3 { background: #12303d; }
.tsw-teal .s1 { background: #0b6e62; } .tsw-teal .s2 { background: #e4f2ef; } .tsw-teal .s3 { background: #15322e; }
.tsw-green .s1 { background: #1f7a4d; } .tsw-green .s2 { background: #e6f4ec; } .tsw-green .s3 { background: #16301f; }
.tsw-navy .s1 { background: #2c4a9a; } .tsw-navy .s2 { background: #eaeefa; } .tsw-navy .s3 { background: #161f3d; }
.theme-opt b { font-size: .88rem; }
.theme-opt small { color: var(--muted); font-size: .74rem; }
.tsw-none .s1 { background: repeating-linear-gradient(135deg, #e1e7f0 0 6px, #f4f7fb 6px 12px); } .tsw-none .s2 { background: #f4f7fb; } .tsw-none .s3 { background: #c9d3e1; }
/* v20.4: Bàn làm việc – bấm ảnh để đổi; khối card visit */
.ws-av-link { position: relative; display: inline-block; }
.ws-av-edit { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--lagoon); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ws-av-edit .ico { width: 14px; height: 14px; }
.ws-vc .card-header .ico { width: 16px; height: 16px; color: var(--lagoon); }
.ws-vc-qr { width: 76px; height: 76px; flex: none; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: #fff; }
.min-w-0 { min-width: 0; }
.vc-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #1f2f2c; color: #fff; padding: 9px 16px; border-radius: 10px; font-size: .86rem; z-index: 2100; }
.af-days { width: 4.5rem; }
