/* ═══════════════════════════════════════════════════════════════════
   Quik AI · Admin Dashboard CSS
   Brand: Navy #1E3A8A logo Quik + Orange #FF8C00 accent
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --adm-brand-navy: #1E3A8A;
  --adm-brand-navy-hover: #152B6E;
  --adm-brand-navy-soft: rgba(30, 58, 138, 0.06);
  --adm-brand-orange: #FF8C00;
  --adm-brand-gradient: linear-gradient(135deg, #1E3A8A 0%, #FF8C00 100%);

  --adm-text: #0F1424;
  --adm-text-soft: #475569;
  --adm-text-muted: #94A3B8;

  --adm-bg: #F8FAFC;
  --adm-surface: #FFFFFF;
  --adm-surface-2: #F1F5F9;

  --adm-border: rgba(15, 20, 36, 0.08);
  --adm-border-strong: rgba(15, 20, 36, 0.14);

  --adm-success: #10B981;
  --adm-warning: #F59E0B;
  --adm-danger:  #EF4444;
  --adm-info:    #06B6D4;
  --adm-purple:  #8B5CF6;
  --adm-pink:    #EC4899;

  --adm-shadow-sm: 0 1px 2px rgba(15, 20, 36, 0.04);
  --adm-shadow-md: 0 4px 12px -4px rgba(15, 20, 36, 0.08);
  --adm-shadow-lg: 0 12px 32px -8px rgba(15, 20, 36, 0.12);
  --adm-shadow-navy: 0 8px 24px -8px rgba(30, 58, 138, 0.32);

  --adm-side-w: 280px;
  --adm-radius: 12px;
  --adm-radius-lg: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--adm-bg);
  color: var(--adm-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── ẨN HOÀN TOÀN scrollbar (vẫn CUỘN được bằng trackpad/phím) — UI dùng FULL bề ngang,
   không bị thanh cuộn chiếm chỗ (macOS "always show scrollbars" cũng không lộ thanh). ── */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }

.hidden { display: none !important; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── App layout ─────────────────────────────────────────────────── */
.adm-app {
  display: grid;
  grid-template-columns: var(--adm-side-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Collapsed state — sidebar thu nhỏ thành strip 56px chứa toggle button.
   Tránh được vấn đề float toggle che mei-mode-switch của iframe. */
.adm-app.is-side-collapsed {
  grid-template-columns: 56px 1fr;
}
.adm-app.is-side-collapsed .adm-side {
  width: 56px;
  overflow: hidden;
  background: transparent;            /* clean — bỏ nền trắng */
  border-right: none;                 /* clean — không kẻ dọc */
}
/* Ẩn nội dung sidebar khi collapsed — chỉ giữ toggle button visible */
.adm-app.is-side-collapsed .adm-side-head {
  padding: 14px 12px;
  justify-content: center;
}
.adm-app.is-side-collapsed .adm-brand,
.adm-app.is-side-collapsed .adm-nav,
.adm-app.is-side-collapsed .adm-side-divider,
.adm-app.is-side-collapsed .adm-new-chat,
.adm-app.is-side-collapsed .adm-search,
.adm-app.is-side-collapsed .adm-history-wrap,
.adm-app.is-side-collapsed .adm-side-foot {
  display: none !important;
}
.adm-side {
  transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Sidebar ─────────────────────────────────────────────────────── */
.adm-side {
  background: var(--adm-surface);
  border-right: 1px solid var(--adm-border);
  display: flex; flex-direction: column;
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
}
.adm-side::-webkit-scrollbar { width: 6px; }
.adm-side::-webkit-scrollbar-thumb { background: rgba(15, 20, 36, 0.15); border-radius: 999px; }

.adm-side-head {
  padding: 14px 14px 14px;
  display: flex; align-items: center; gap: 10px;
}
.adm-brand {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
}
.adm-brand-logo {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--adm-brand-gradient);
}
.adm-brand-text {
  display: flex; flex-direction: column; line-height: 1.2;
}
.adm-brand-text strong {
  font-size: 16px; font-weight: 800;
  color: var(--adm-brand-navy);
  letter-spacing: 0.3px;
}
.adm-brand-text span {
  font-size: 11px;
  color: var(--adm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.adm-nav {
  padding: 4px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.adm-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--adm-text-soft);
  font: 600 13.5px/1.2 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}
.adm-nav-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--adm-text-muted);
  transition: color 0.15s;
}
.adm-nav-item:hover {
  background: var(--adm-brand-navy-soft);
  color: var(--adm-brand-navy);
}
.adm-nav-item:hover .material-symbols-outlined {
  color: var(--adm-brand-navy);
}
.adm-nav-item.is-active {
  background: var(--adm-brand-navy);
  color: #fff;
  box-shadow: var(--adm-shadow-navy);
}
.adm-nav-item.is-active .material-symbols-outlined {
  color: #fff;
}

.adm-side-divider {
  height: 1px;
  background: var(--adm-border);
  margin: 14px 18px;
}

/* New chat button — primary CTA */
.adm-new-chat {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 14px 12px;
  padding: 11px 14px;
  background: var(--adm-brand-gradient);
  color: #fff;
  border: none;
  border-radius: 10px;
  font: 700 13px/1.2 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
  box-shadow: var(--adm-shadow-navy);
}
.adm-new-chat:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(30, 58, 138, 0.45);
}
.adm-new-chat .material-symbols-outlined {
  font-size: 19px;
  color: #fff;
}

/* Search */
.adm-search {
  display: flex; align-items: center; gap: 8px;
  margin: 0 14px 12px;
  padding: 8px 12px;
  background: var(--adm-surface-2);
  border-radius: 10px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.adm-search:focus-within {
  background: #fff;
  border-color: var(--adm-brand-navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}
.adm-search .material-symbols-outlined {
  font-size: 18px;
  color: var(--adm-text-muted);
}
.adm-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--adm-text);
}
.adm-search input::placeholder { color: var(--adm-text-muted); }

/* History */
.adm-history-wrap {
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 0;
}
.adm-history-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--adm-text-muted);
  padding: 8px 18px 6px;
}
.adm-history {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 12px;
}
.adm-history-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  font-size: 12.5px;
  color: var(--adm-text-soft);
  text-align: left;
  text-decoration: none;
}
.adm-history-item:hover {
  background: var(--adm-brand-navy-soft);
  color: var(--adm-brand-navy);
}
.adm-history-icon {
  font-size: 16px !important;
  color: var(--adm-text-muted);
  flex-shrink: 0;
}
.adm-history-item:hover .adm-history-icon {
  color: var(--adm-brand-navy);
}
.adm-history-text {
  display: flex; flex-direction: column;
  min-width: 0;
  flex: 1;
}
.adm-history-title {
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-history-time {
  font-size: 10.5px;
  color: var(--adm-text-muted);
  margin-top: 1px;
}
.adm-history-empty {
  padding: 16px 14px;
  text-align: center;
  font-size: 12px;
  color: var(--adm-text-muted);
  font-style: italic;
}

/* Global sync bar (above profile) */
.adm-sync-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--adm-border);
  background: rgba(30, 58, 138, 0.02);
}
/* Auto-only variant — không có nút manual, chỉ indicator */
.adm-sync-bar--auto {
  cursor: default;
  font-size: 11px;
  color: var(--adm-text-soft);
  font-weight: 600;
}
.adm-sync-bar--auto > span:last-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-app.is-side-collapsed .adm-sync-bar { display: none !important; }
.adm-sync-meta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--adm-text-soft);
  font-weight: 600;
  min-width: 0;
  cursor: help;
}
.adm-sync-meta > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-sync-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #94A3B8;
  flex-shrink: 0;
  transition: background 0.3s;
}
.adm-sync-dot.is-fresh {
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: adm-sync-pulse 2.4s ease-out infinite;
}
.adm-sync-dot.is-syncing {
  background: var(--adm-brand-orange);
  animation: adm-sync-pulse 1s ease-out infinite;
}
.adm-sync-dot.is-error { background: #EF4444; }
.adm-sync-dot.is-flash {
  background: var(--adm-brand-orange);
  box-shadow: 0 0 0 8px rgba(255, 140, 0, 0);
  animation: adm-sync-flash 1.2s ease-out;
}
@keyframes adm-sync-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@keyframes adm-sync-flash {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.55); }
  50% { transform: scale(1.5); box-shadow: 0 0 0 12px rgba(255, 140, 0, 0); }
  100% { transform: scale(1); }
}
.adm-sync-btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid rgba(30, 58, 138, 0.12);
  border-radius: 999px;
  color: var(--adm-brand-navy);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.adm-sync-btn:hover { background: var(--adm-brand-navy); color: #fff; transform: rotate(90deg); }
.adm-sync-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.adm-sync-btn .material-symbols-outlined { font-size: 15px; }
.adm-sync-btn.is-spinning .material-symbols-outlined { animation: adm-spin 0.8s linear infinite; }

/* Profile foot */
.adm-side-foot {
  border-top: 1px solid var(--adm-border);
  padding: 10px 12px;
  position: relative;
}
.adm-profile-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
}
.adm-profile-btn:hover { background: var(--adm-surface-2); }
.adm-profile-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--adm-brand-gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.adm-profile-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  text-align: left;
}
.adm-profile-info strong {
  font-size: 13px; font-weight: 700;
  color: var(--adm-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-profile-info span {
  font-size: 11px;
  color: var(--adm-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-profile-caret {
  font-size: 18px;
  color: var(--adm-text-muted);
  transition: transform 0.15s;
}
.adm-profile-btn[aria-expanded="true"] .adm-profile-caret { transform: rotate(180deg); }

.adm-profile-menu {
  position: absolute;
  bottom: calc(100% - 8px); left: 12px; right: 12px;
  background: #fff;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  box-shadow: var(--adm-shadow-lg);
  padding: 4px;
  z-index: 20;
}
.adm-profile-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--adm-text);
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}
.adm-profile-item:hover { background: var(--adm-brand-navy-soft); color: var(--adm-brand-navy); }
.adm-profile-item .material-symbols-outlined { font-size: 18px; color: var(--adm-text-muted); }
.adm-profile-item:hover .material-symbols-outlined { color: var(--adm-brand-navy); }
.adm-profile-item--logout { color: var(--adm-danger); }
.adm-profile-item--logout .material-symbols-outlined { color: var(--adm-danger); }

/* ─── Main canvas ─────────────────────────────────────────────────── */
.adm-main {
  padding: 28px 32px 48px;
  min-width: 0;
  position: relative;
  /* An toàn — không cho phép horizontal scroll trang ngay cả khi 1 chart
     canvas có min-width vô tình lớn hơn cột */
  overflow-x: hidden;
}
/* Toggle button — chung style */
.adm-side-toggle {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--adm-text-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.adm-side-toggle:hover {
  background: var(--adm-brand-navy-soft);
  color: var(--adm-brand-navy);
}
/* Variant 1: inline trong sidebar head — visible khi sidebar mở */
.adm-side-toggle--inline {
  /* không position absolute, layout flex bên cạnh brand */
}
/* Variant 2: floating đã bỏ — collapsed strip 56px chứa inline toggle */
.adm-side-toggle--float { display: none !important; }
/* Chat view fullscreen override — toggle vẫn visible nhờ z-index 30 */
.adm-view--chat { margin-top: -64px; }

/* Giữ search + history visible khi chat view (history sync qua postMessage
   từ iframe → render trong admin sidebar). */

.adm-view-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--adm-border);
}
.adm-view-title {
  margin: 0 0 4px;
  font-size: 24px; font-weight: 800;
  color: var(--adm-text);
  letter-spacing: -0.2px;
}
.adm-view-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--adm-text-soft);
}
.adm-view-meta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--adm-text-muted);
}
.adm-view-meta .material-symbols-outlined { font-size: 16px; }

.adm-pill-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--adm-border-strong);
  border-radius: 10px;
  color: var(--adm-brand-navy);
  font-weight: 600;
  font-size: 12.5px;
  text-decoration: none;
  transition: all 0.15s;
}
.adm-pill-link:hover {
  background: var(--adm-brand-navy);
  border-color: var(--adm-brand-navy);
  color: #fff;
}
.adm-pill-link:hover .material-symbols-outlined { color: #fff; }
.adm-pill-link .material-symbols-outlined { font-size: 16px; }

/* ─── KPI cards ───────────────────────────────────────────────────── */
.adm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.adm-kpi {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--adm-surface);
  border-radius: var(--adm-radius);
  border: 1px solid var(--adm-border);
  box-shadow: var(--adm-shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.adm-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--adm-shadow-md);
}
.adm-kpi-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.adm-kpi-icon .material-symbols-outlined {
  font-size: 22px;
}
.adm-kpi-body { min-width: 0; }
.adm-kpi-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--adm-text);
  line-height: 1.1;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.adm-kpi-label {
  font-size: 12px;
  color: var(--adm-text-soft);
  font-weight: 600;
  margin-top: 4px;
}

.adm-kpi--navy .adm-kpi-icon { background: rgba(30, 58, 138, 0.10); color: var(--adm-brand-navy); }
.adm-kpi--navy .adm-kpi-icon .material-symbols-outlined { color: var(--adm-brand-navy); }
.adm-kpi--orange .adm-kpi-icon { background: rgba(255, 140, 0, 0.12); }
.adm-kpi--orange .adm-kpi-icon .material-symbols-outlined { color: var(--adm-brand-orange); }
.adm-kpi--success .adm-kpi-icon { background: rgba(16, 185, 129, 0.10); }
.adm-kpi--success .adm-kpi-icon .material-symbols-outlined { color: var(--adm-success); }
.adm-kpi--purple .adm-kpi-icon { background: rgba(139, 92, 246, 0.10); }
.adm-kpi--purple .adm-kpi-icon .material-symbols-outlined { color: var(--adm-purple); }
.adm-kpi--cyan .adm-kpi-icon { background: rgba(6, 182, 212, 0.10); }
.adm-kpi--cyan .adm-kpi-icon .material-symbols-outlined { color: var(--adm-info); }
.adm-kpi--pink .adm-kpi-icon { background: rgba(236, 72, 153, 0.10); }
.adm-kpi--pink .adm-kpi-icon .material-symbols-outlined { color: var(--adm-pink); }

/* Compact KPI mini — for HR top stats */
.adm-kpi-grid--compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 16px; }
.adm-kpi-mini {
  padding: 14px 16px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  text-align: center;
}
.adm-kpi-mini span {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--adm-brand-navy);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.adm-kpi-mini small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--adm-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Chart grid + cards ──────────────────────────────────────────── */
.adm-chart-grid {
  display: grid;
  /* minmax(0, 1fr) thay vì 1fr — bảo đảm grid items không vượt cột,
     tránh horizontal scroll trên trang khi resize */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1280px) {
  .adm-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .adm-chart-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-app { grid-template-columns: 1fr; }
  .adm-side { position: fixed; top: 0; left: 0; transform: translateX(-100%); transition: transform 0.2s; }
  .adm-side.is-open { transform: translateX(0); }
}

.adm-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 20px;
  box-shadow: var(--adm-shadow-sm);
  /* Tránh card overflow ra ngoài cột grid */
  min-width: 0;
  overflow: hidden;
}
.adm-card--span-2 { grid-column: span 2; }
@media (max-width: 1280px) { .adm-card--span-2 { grid-column: span 2; } }
@media (max-width: 768px) { .adm-card--span-2 { grid-column: span 1; } }

.adm-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.adm-card-head h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--adm-text);
}
.adm-card-meta {
  font-size: 11px;
  color: var(--adm-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.adm-chart-wrap {
  position: relative;
  width: 100%;
}

/* Empty state */
.adm-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--adm-text-muted);
  text-align: center;
}
.adm-empty .material-symbols-outlined {
  font-size: 48px;
  color: var(--adm-text-muted);
  opacity: 0.6;
}
.adm-empty p {
  margin: 0;
  font-size: 13px;
  max-width: 360px;
}

/* Chat view — iframe full canvas (offset adm-main padding) */
.adm-view--chat {
  margin: -28px -32px -48px;          /* match adm-main padding: 28/32/48 */
  height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Override .hidden cho chat view: GIỮ iframe loaded + JS chạy
   (broadcast history), chỉ đẩy off-screen khi user không xem.
   Khi removed .hidden → trở về vị trí bình thường. */
.adm-view--chat.hidden {
  display: flex !important;
  position: absolute !important;
  left: -200vw !important;
  top: 0 !important;
  width: 100vw;
  pointer-events: none;
  visibility: hidden;
}
.adm-chat-frame-wrap {
  flex: 1;
  display: flex;
  background: var(--adm-surface);
  border-radius: 0;
  overflow: hidden;
}
.adm-chat-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--adm-surface);
}

/* ─── Mei tag inline trong tiêu đề view ────────────────────────── */
.adm-mei-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 12px;
  background: var(--adm-brand-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.2px;
  vertical-align: middle;
}

/* ─── Finance indicators grid — Mei extension ──────────────────── */
.adm-finance-section {
  margin-bottom: 24px;
}
.adm-finance-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--adm-text);
}
.adm-finance-title .material-symbols-outlined {
  font-size: 20px;
  color: var(--adm-brand-orange);
}
.adm-finance-title small {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--adm-text-soft);
  margin-left: 4px;
}
.adm-finance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.adm-fin-card {
  position: relative;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 14px 14px 12px;
  box-shadow: var(--adm-shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-align: left;
  width: 100%;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}
.adm-fin-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--adm-shadow-md);
  border-color: rgba(30, 58, 138, 0.20);
}
/* Static card — không click */
.adm-fin-card--static { cursor: default; }
.adm-fin-card--static:hover {
  transform: none;
  box-shadow: var(--adm-shadow-sm);
  border-color: var(--adm-border);
}
/* Hint badge "Click xem chi tiết" trên click cards */
button.adm-fin-card::after {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  width: 6px; height: 6px;
  background: var(--adm-brand-orange);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s;
}
button.adm-fin-card:hover::after { opacity: 1; }
button.adm-fin-card--learn:hover::after { background: var(--adm-brand-navy); }

/* ─── Detail modal popup ────────────────────────────────────────── */
.adm-detail-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.adm-detail-modal.hidden { display: none !important; }
.adm-detail-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 20, 36, 0.55);
  backdrop-filter: blur(2px);
}
.adm-detail-dialog {
  position: relative;
  width: min(720px, 92vw);
  max-height: 86vh;
  background: var(--adm-surface);
  border-radius: var(--adm-radius-lg);
  box-shadow: 0 32px 64px -16px rgba(15, 20, 36, 0.30);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: admDetailIn 0.18s ease-out;
}
@keyframes admDetailIn {
  from { transform: translateY(12px) scale(.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.adm-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--adm-border);
}
.adm-detail-head h3 {
  margin: 0 0 4px;
  font-size: 17px; font-weight: 700;
  color: var(--adm-text);
}
.adm-detail-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--adm-text-soft);
}
.adm-detail-close {
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--adm-text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.adm-detail-close:hover { background: var(--adm-surface-2); color: var(--adm-text); }
.adm-detail-close .material-symbols-outlined { font-size: 20px; }
.adm-detail-body {
  padding: 14px 22px 22px;
  overflow-y: auto;
}
.adm-detail-list {
  display: flex; flex-direction: column;
  gap: 8px;
}
.adm-detail-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--adm-surface-2);
  border: 1px solid transparent;
  transition: border-color 0.12s;
}
.adm-detail-item:hover { border-color: rgba(30, 58, 138, 0.18); }
.adm-detail-stt {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--adm-brand-navy);
  color: #fff;
  font-weight: 700;
  font-size: 11.5px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.adm-detail-text { flex: 1; min-width: 0; }
.adm-detail-name {
  font-size: 13px; font-weight: 700;
  color: var(--adm-text);
  display: flex; align-items: center; gap: 6px;
}
.adm-detail-name .vt-pill {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(30, 58, 138, 0.10);
  color: var(--adm-brand-navy);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.adm-detail-meta {
  font-size: 11.5px;
  color: var(--adm-text-soft);
  margin-top: 2px;
  line-height: 1.4;
}
.adm-detail-context {
  font-size: 11.5px;
  color: var(--adm-text-soft);
  margin-top: 4px;
  padding: 6px 10px;
  background: var(--adm-surface);
  border-left: 3px solid var(--adm-brand-orange);
  border-radius: 4px;
  font-style: italic;
}
.adm-detail-section + .adm-detail-section { margin-top: 18px; }
.adm-detail-section-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--adm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.adm-detail-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.adm-detail-tag {
  padding: 4px 12px;
  background: rgba(30, 58, 138, 0.06);
  border: 1px solid rgba(30, 58, 138, 0.16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-brand-navy);
}
.adm-fin-icon {
  width: 32px; height: 32px;
  background: rgba(255, 140, 0, 0.10);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.adm-fin-icon .material-symbols-outlined {
  font-size: 18px;
  color: var(--adm-brand-orange);
}
.adm-fin-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--adm-text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
.adm-fin-percent {
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-brand-orange);
  margin-top: 2px;
}
.adm-fin-label {
  font-size: 11.5px;
  color: var(--adm-text-soft);
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.35;
  /* Bảo đảm label luôn nằm trên chart, không bị bubble đè */
  position: relative;
  z-index: 2;
  display: block;
  word-break: break-word;
  hyphens: auto;
}
/* Khi card có mini-chart, label cần độ cao đủ + chữ rõ */
.adm-fin-card:has(.adm-mini-chart) .adm-fin-label {
  font-size: 12px;
  margin-bottom: 2px;
  color: var(--adm-text);
  font-weight: 700;
  min-height: calc(1.35em * 2);
}
.adm-fin-tiny {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--adm-text-muted);
  margin-top: 2px;
}
/* Mei overview caption — appears below label */
.adm-fin-caption {
  font-size: 11px;
  line-height: 1.45;
  color: var(--adm-text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(30, 58, 138, 0.12);
  font-style: italic;
  text-align: left;
  min-height: 30px;
  font-weight: 500;
  letter-spacing: 0.05px;
}
.adm-fin-card--learn .adm-fin-caption {
  border-top-color: rgba(30, 58, 138, 0.16);
  color: var(--adm-text-soft);
}

/* ─── Mini chart cho HR cards — bars vertical/horizontal ────────── */
.adm-mini-chart {
  margin-top: 10px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden; /* không cho bubble overflow ra label area */
}
/* Mei behavioral cards — full-width stacked layout cho clearer charts */
.adm-finance-grid--att-stacked {
  grid-template-columns: 1fr;
  gap: 14px;
}
.adm-fin-card--wide {
  padding: 18px 20px 16px;
}
.adm-mini-chart--wide {
  margin-top: 14px;
  min-height: 180px;
}
@media (min-width: 1280px) {
  /* Trên màn rộng cho 2 cards/row vẫn rộng hơn 4 cards/row ban đầu */
  .adm-finance-grid--att-stacked {
    grid-template-columns: 1fr 1fr;
  }
}
.adm-mini-chart-empty {
  font-size: 11px;
  color: var(--adm-text-muted);
  font-style: italic;
  padding: 12px 0;
  text-align: center;
}

/* Vertical bars — dùng cho 2-4 categories */
/* ─── V7 — AI Platform Style Charts ─────────────────────────────────
 * Gradient + glow + shadow + staggered animation cho look chuyên nghiệp.
 * Color coding semantic: bar tự nhận màu phù hợp dựa trên data-severity. */

/* === Vertical bars (Card 3: Giờ ra ngoài, Card 4: Phân bố điểm) === */
.adm-mini-bars-v {
  display: flex;
  flex-direction: column;
  height: 180px;
  box-sizing: border-box;
  gap: 6px;
  position: relative;
}
/* Subtle grid lines cho reference */
.adm-mini-bars-v::before {
  content: '';
  position: absolute;
  inset: 22px 0 24px 0;
  background-image:
    linear-gradient(to top,
      transparent 0%, transparent 24%,
      rgba(30, 58, 138, 0.04) 25%, rgba(30, 58, 138, 0.04) 25.5%,
      transparent 26%, transparent 49%,
      rgba(30, 58, 138, 0.06) 50%, rgba(30, 58, 138, 0.06) 50.5%,
      transparent 51%, transparent 74%,
      rgba(30, 58, 138, 0.04) 75%, rgba(30, 58, 138, 0.04) 75.5%,
      transparent 76%);
  pointer-events: none;
  z-index: 0;
}
.adm-mini-bars-v-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-height: 0;
  padding-top: 22px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.adm-mini-bars-v-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.adm-mini-bar-v {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  justify-content: flex-end;
}
.adm-mini-bar-v-fill {
  width: 100%;
  background: linear-gradient(180deg,
    rgba(245, 158, 11, 0.95) 0%,
    rgba(245, 158, 11, 1) 40%,
    rgba(217, 119, 6, 1) 100%);
  border-radius: 6px 6px 3px 3px;
  position: relative;
  transition: height 0.6s cubic-bezier(.22,.61,.36,1),
    box-shadow 0.2s, filter 0.2s;
  min-height: 4px;
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.35) inset,
    0 4px 12px -2px rgba(245, 158, 11, 0.35),
    0 0 0 1px rgba(245, 158, 11, 0.1);
  animation: adm-mini-bar-v-rise 0.7s cubic-bezier(.22,.61,.36,1) backwards;
}
@keyframes adm-mini-bar-v-rise {
  from { height: 4px !important; opacity: 0; }
  to { opacity: 1; }
}
/* Staggered animation delay */
.adm-mini-bar-v:nth-child(1) .adm-mini-bar-v-fill { animation-delay: 0.05s; }
.adm-mini-bar-v:nth-child(2) .adm-mini-bar-v-fill { animation-delay: 0.10s; }
.adm-mini-bar-v:nth-child(3) .adm-mini-bar-v-fill { animation-delay: 0.15s; }
.adm-mini-bar-v:nth-child(4) .adm-mini-bar-v-fill { animation-delay: 0.20s; }
.adm-mini-bar-v:nth-child(5) .adm-mini-bar-v-fill { animation-delay: 0.25s; }
.adm-mini-bar-v:nth-child(6) .adm-mini-bar-v-fill { animation-delay: 0.30s; }
.adm-mini-bar-v:nth-child(7) .adm-mini-bar-v-fill { animation-delay: 0.35s; }
.adm-mini-bar-v:nth-child(8) .adm-mini-bar-v-fill { animation-delay: 0.40s; }
.adm-mini-bar-v:nth-child(9) .adm-mini-bar-v-fill { animation-delay: 0.45s; }
.adm-mini-bar-v:nth-child(10) .adm-mini-bar-v-fill { animation-delay: 0.50s; }
.adm-mini-bar-v:nth-child(11) .adm-mini-bar-v-fill { animation-delay: 0.55s; }
.adm-mini-bar-v:nth-child(12) .adm-mini-bar-v-fill { animation-delay: 0.60s; }
.adm-mini-bar-v:hover .adm-mini-bar-v-fill {
  filter: brightness(1.08);
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.4) inset,
    0 6px 18px -3px rgba(245, 158, 11, 0.55),
    0 0 0 1px rgba(245, 158, 11, 0.2);
}
.adm-mini-bar-v-fill::before {
  content: attr(data-val);
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--adm-text);
  white-space: nowrap;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-variant-numeric: tabular-nums;
}
.adm-mini-bar-v-label {
  flex: 1 1 0;
  min-width: 0;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--adm-text-muted);
  text-align: center;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.2;
  letter-spacing: 0.05px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-top: 4px;
}
/* Navy variant cho compliance scores */
.adm-fin-card--learn .adm-mini-bar-v-fill {
  background: linear-gradient(180deg,
    rgba(30, 58, 138, 0.95) 0%,
    rgba(30, 58, 138, 1) 40%,
    rgba(23, 44, 102, 1) 100%);
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.35) inset,
    0 4px 12px -2px rgba(30, 58, 138, 0.35),
    0 0 0 1px rgba(30, 58, 138, 0.1);
}
.adm-fin-card--learn .adm-mini-bar-v:hover .adm-mini-bar-v-fill {
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.4) inset,
    0 6px 18px -3px rgba(30, 58, 138, 0.55),
    0 0 0 1px rgba(30, 58, 138, 0.2);
}
/* Semantic color coding qua data-severity attribute trên bar */
.adm-mini-bar-v-fill[data-severity="good"] {
  background: linear-gradient(180deg, #16A34A 0%, #15803D 100%);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.35) inset, 0 4px 12px -2px rgba(22,163,74,0.4);
}
.adm-mini-bar-v-fill[data-severity="ok"] {
  background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.35) inset, 0 4px 12px -2px rgba(37,99,235,0.4);
}
.adm-mini-bar-v-fill[data-severity="warn"] {
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.35) inset, 0 4px 12px -2px rgba(245,158,11,0.4);
}
.adm-mini-bar-v-fill[data-severity="bad"] {
  background: linear-gradient(180deg, #DC2626 0%, #B91C1C 100%);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.35) inset, 0 4px 12px -2px rgba(220,38,38,0.4);
}
.adm-mini-bar-v-fill[data-severity="neutral"] {
  background: linear-gradient(180deg, #94A3B8 0%, #64748B 100%);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.35) inset, 0 4px 12px -2px rgba(100,116,139,0.4);
}

/* === Horizontal bars (Card 1: Xu hướng, Card 2: Phân bố muộn) === */
.adm-mini-bars-h {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 4px 0 0;
}
.adm-mini-row {
  display: grid;
  grid-template-columns: minmax(70px, 30%) 1fr 50px;
  gap: 12px;
  align-items: center;
  font-size: 11.5px;
  min-width: 0;
}
.adm-mini-row-label {
  color: var(--adm-text-soft);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.adm-mini-row-track {
  height: 10px;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.04), rgba(30, 58, 138, 0.08));
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.adm-mini-row-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,
    rgba(245, 158, 11, 0.85) 0%,
    rgba(245, 158, 11, 1) 50%,
    rgba(217, 119, 6, 1) 100%);
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(.22,.61,.36,1),
    filter 0.2s;
  box-shadow:
    0 0 8px rgba(245, 158, 11, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  animation: adm-mini-row-grow 0.8s cubic-bezier(.22,.61,.36,1) backwards;
  position: relative;
}
.adm-mini-row-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%);
  border-radius: 999px;
  opacity: 0;
  animation: adm-mini-row-shimmer 2.5s ease-in-out 1.2s 1;
}
@keyframes adm-mini-row-grow {
  from { width: 0 !important; }
}
@keyframes adm-mini-row-shimmer {
  0% { opacity: 0; transform: translateX(-100%); }
  20% { opacity: 0.6; }
  100% { opacity: 0; transform: translateX(100%); }
}
.adm-mini-row:nth-child(1) .adm-mini-row-bar { animation-delay: 0.05s; }
.adm-mini-row:nth-child(2) .adm-mini-row-bar { animation-delay: 0.10s; }
.adm-mini-row:nth-child(3) .adm-mini-row-bar { animation-delay: 0.15s; }
.adm-mini-row:nth-child(4) .adm-mini-row-bar { animation-delay: 0.20s; }
.adm-mini-row:nth-child(5) .adm-mini-row-bar { animation-delay: 0.25s; }
.adm-mini-row:nth-child(6) .adm-mini-row-bar { animation-delay: 0.30s; }
.adm-mini-row:nth-child(7) .adm-mini-row-bar { animation-delay: 0.35s; }
.adm-mini-row:nth-child(8) .adm-mini-row-bar { animation-delay: 0.40s; }
.adm-mini-row:hover .adm-mini-row-bar { filter: brightness(1.08); }
.adm-mini-row-val {
  font-weight: 800;
  color: var(--adm-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
/* Navy variant cho compliance */
.adm-fin-card--learn .adm-mini-row-bar {
  background: linear-gradient(90deg,
    rgba(30, 58, 138, 0.85) 0%,
    rgba(30, 58, 138, 1) 50%,
    rgba(23, 44, 102, 1) 100%);
  box-shadow: 0 0 8px rgba(30, 58, 138, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
/* Semantic color coding cho horizontal */
.adm-mini-row-bar[data-severity="good"] {
  background: linear-gradient(90deg, #22C55E, #16A34A);
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}
.adm-mini-row-bar[data-severity="warn"] {
  background: linear-gradient(90deg, #F59E0B, #D97706);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}
.adm-mini-row-bar[data-severity="bad"] {
  background: linear-gradient(90deg, #EF4444, #DC2626);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}
.adm-mini-row-bar[data-severity="critical"] {
  background: linear-gradient(90deg, #B91C1C, #7F1D1D);
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.5), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* Progress single — dùng cho coverage % */
.adm-mini-progress {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm-mini-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.adm-mini-progress-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--adm-brand-navy);
  letter-spacing: -0.5px;
  line-height: 1;
}
.adm-fin-card--learn .adm-mini-progress-num {
  color: var(--adm-brand-navy);
}
.adm-mini-progress-meta {
  font-size: 10.5px;
  color: var(--adm-text-muted);
  font-weight: 600;
}
.adm-mini-progress-track {
  height: 10px;
  background: rgba(30, 58, 138, 0.07);
  border-radius: 999px;
  overflow: hidden;
}
.adm-mini-progress-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--adm-brand-navy), #2C4FB8 60%, var(--adm-brand-orange));
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(.65,.05,.36,1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.adm-mini-progress-foot {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--adm-text-soft);
  font-weight: 500;
}

/* Multi-segment bar — dùng cho NOC/SOC/Khác hoặc HĐ 30d/60d/expired */
.adm-mini-segments {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(30, 58, 138, 0.06);
  margin: 8px 0 8px;
}
.adm-mini-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  min-width: 4px;
  transition: width 0.5s cubic-bezier(.65,.05,.36,1);
}
.adm-mini-segments-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--adm-text-soft);
}
.adm-mini-seg-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* Cards có mini-chart cần đủ chiều cao + breathing room */
.adm-fin-card:has(.adm-mini-chart) {
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  min-height: 250px;
}
.adm-fin-card:has(.adm-mini-chart) .adm-mini-chart {
  flex: 1;
}

/* Đảm bảo dot indicator click không đè vào chart */
button.adm-fin-card:has(.adm-mini-chart)::after {
  top: 14px; right: 14px;
}

/* ─── Help tooltip (?) cho compliance score ──────────────────────── */
.adm-att-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(30, 58, 138, 0.08);
  border: 1px solid rgba(30, 58, 138, 0.15);
  color: var(--adm-brand-navy);
  cursor: help;
  position: relative;
  margin-left: 6px;
  vertical-align: middle;
  padding: 0;
  transition: background 0.15s;
}
.adm-att-help:hover, .adm-att-help:focus {
  background: var(--adm-brand-navy);
  color: #fff;
  outline: none;
}
.adm-att-help .material-symbols-outlined {
  font-size: 14px;
}
.adm-att-help-tip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: min(380px, 90vw);
  background: #fff;
  color: var(--adm-text);
  border: 1px solid rgba(15, 20, 36, 0.10);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 16px 40px -10px rgba(15, 20, 36, 0.25);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 500;
  z-index: 50;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  white-space: normal;
}
.adm-att-help-tip::before {
  content: '';
  position: absolute;
  bottom: 100%; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border: 7px solid transparent;
  border-bottom-color: #fff;
  filter: drop-shadow(0 -1px 0 rgba(15, 20, 36, 0.10));
}
.adm-att-help:hover .adm-att-help-tip,
.adm-att-help:focus .adm-att-help-tip,
.adm-att-help-tip:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
/* CHỈ outer strong (title) block — inner strong trong li giữ inline */
.adm-att-help-tip > strong {
  display: block;
  font-size: 12.5px;
  color: var(--adm-brand-navy);
  margin-bottom: 4px;
  font-weight: 700;
}
.adm-att-help-tip li strong,
.adm-att-help-tip li em {
  display: inline;
  font-weight: 700;
}
.adm-att-help-tip > em {
  display: block;
  font-style: normal;
  color: var(--adm-text-soft);
  font-size: 11.5px;
  font-weight: 600;
  margin: 8px 0 4px;
  line-height: 1.5;
}
.adm-att-help-tip ul {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
}
.adm-att-help-tip li {
  padding: 4px 0 4px 14px;
  position: relative;
  font-size: 11.5px;
  color: var(--adm-text);
  line-height: 1.6;
  word-spacing: 0;
  white-space: normal;
}
.adm-att-help-tip li::before {
  content: '';
  position: absolute;
  left: 4px; top: 11px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--adm-brand-navy);
}

/* ─── Shift schedule (NOC/SOC/Đặc biệt) NEW STYLES ─────────────── */
.adm-att-shift-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(30, 58, 138, 0.08);
  color: var(--adm-brand-navy);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}
.adm-att-shift-time {
  font-size: 11px;
  color: var(--adm-text-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.adm-att-shift-day {
  margin-bottom: 16px;
}
.adm-att-shift-day:last-child { margin-bottom: 0; }
.adm-att-shift-day-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-brand-navy);
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.08), rgba(30, 58, 138, 0.02));
  border-left: 3px solid var(--adm-brand-navy);
  border-radius: 4px;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.adm-att-shift-day-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adm-att-shift-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  flex-wrap: wrap;
}
.adm-att-shift-row:hover {
  border-color: var(--adm-brand-navy);
  transform: translateY(-1px);
  box-shadow: var(--adm-shadow-sm);
}
.adm-att-shift-row-info { flex: 1; min-width: 200px; }
.adm-att-shift-row-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.adm-att-shift-row-meta {
  font-size: 11.5px;
  color: var(--adm-text-soft);
  font-weight: 500;
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.adm-att-shift-row-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.adm-att-score-num.is-na {
  color: var(--adm-text-muted);
  font-size: 18px;
}

/* ─── LIVE tag cho bảng ra-vào trong ngày ──────────────────────── */
.adm-att-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.10), rgba(220, 38, 38, 0.04));
  color: #DC2626;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  letter-spacing: 0.5px;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
}
.adm-att-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #DC2626;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5);
  animation: adm-live-pulse 2.4s ease-out infinite;
}
.adm-att-live-dot.is-pulse {
  animation: adm-live-flash 1.4s ease-out;
}
@keyframes adm-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
@keyframes adm-live-flash {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
  50% { transform: scale(1.6); box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* ─── Attendance — Daily realtime table ──────────────────────────── */
.adm-att-daily-controls {
  align-items: center;
  flex-wrap: wrap;
}
.adm-att-daily-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-text-soft);
}
.adm-att-daily-label .material-symbols-outlined { font-size: 16px; color: var(--adm-brand-navy); }
/* V6: Today-only pill — thay thế date picker + nav buttons */
.adm-att-daily-today-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(30, 58, 138, 0.06);
  border: 1px solid rgba(30, 58, 138, 0.20);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--adm-brand-navy);
}
.adm-att-daily-today-pill .material-symbols-outlined {
  font-size: 16px;
}
.adm-att-filter--prev,
.adm-att-filter--next {
  padding: 4px 6px;
}
.adm-att-daily-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.04), rgba(255, 140, 0, 0.04));
  border: 1px solid rgba(30, 58, 138, 0.08);
  border-radius: 10px;
}
.adm-att-daily-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-text);
  padding: 4px 12px;
  background: #fff;
  border-radius: 999px;
  border: 1px solid var(--adm-border);
}
.adm-att-daily-pill strong { color: var(--adm-brand-navy); font-weight: 800; }
.adm-att-daily-pill--late strong { color: #B45309; }
.adm-att-daily-pill--danger strong { color: #DC2626; }
.adm-att-daily-pill--good strong { color: #16A34A; }
.adm-att-daily-pill .material-symbols-outlined { font-size: 14px; color: var(--adm-text-muted); }
.adm-att-daily-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.adm-att-daily-searchbar .adm-att-search {
  flex: 1 1 280px;
  min-width: 240px;
}
.adm-att-daily-count {
  font-size: 12px;
  color: var(--adm-text-soft);
  font-weight: 600;
  white-space: nowrap;
}
.adm-att-daily-count strong { color: var(--adm-brand-navy); font-weight: 700; }
.adm-att-daily-table-wrap {
  max-height: 540px;
  overflow: auto;
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  background: #fff;
}
.adm-att-daily-table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.adm-att-daily-table-wrap::-webkit-scrollbar-thumb { background: rgba(15, 20, 36, 0.15); border-radius: 999px; }
.adm-att-daily-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.adm-att-daily-table thead th {
  position: sticky;
  top: 0;
  z-index: 20; /* V64: > mọi z-index timeline (đã isolate) → header luôn che khi cuộn */
  /* Opaque solid background — phải đặc để rows phía dưới khi cuộn không
     hiện xuyên qua sticky header. */
  background-color: #EEF1F8;
  background-image: linear-gradient(rgba(30, 58, 138, 0.06), rgba(30, 58, 138, 0.06));
  font-weight: 700;
  text-align: left;
  padding: 11px 14px;
  color: var(--adm-text);
  border-bottom: 2px solid rgba(30, 58, 138, 0.20);
  box-shadow: 0 2px 4px -2px rgba(15, 20, 36, 0.10);
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.adm-att-daily-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(15, 20, 36, 0.045);
  color: var(--adm-text);
  vertical-align: middle;
}
.adm-att-daily-table tbody tr {
  transition: background 0.12s, box-shadow 0.12s;
  cursor: pointer;
}
/* V65: zebra rất nhạt → dễ dò theo hàng; hàng "đang làm" có vạch xanh trái. */
.adm-att-daily-table tbody tr:nth-child(even) { background: rgba(30, 58, 138, 0.016); }
.adm-att-daily-table tbody tr.is-live-row { box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.55); }
.adm-att-daily-table tbody tr:hover { background: rgba(30, 58, 138, 0.05); box-shadow: inset 3px 0 0 var(--adm-brand-navy); }
/* V63: layout 6 cột — Họ tên · Mã NV · Vào–Ra(3) · Timeline(4) · Ra>15p(5) · Trạng thái(6) */
.adm-att-daily-table tbody tr.is-late .adm-att-daily-cell-vr,
.adm-att-daily-table tbody tr.is-early-leave .adm-att-daily-cell-vr {
  color: #B45309;
}
.adm-att-daily-table tbody tr.is-long-leave .adm-att-daily-cell-ra {
  color: #DC2626;
}
.adm-att-daily-cell-name { font-weight: 700; }
.adm-att-daily-cell-id { color: var(--adm-brand-navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.adm-att-daily-cell-vr { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-att-daily-cell-vr small { color: var(--adm-text-muted); font-weight: 500; margin: 0 1px; }
.adm-att-daily-live-out { color: var(--adm-brand-navy); font-weight: 700; }
.adm-att-daily-cell-tl { min-width: 248px; width: 30%; }
.adm-att-daily-cell-ra { white-space: nowrap; font-weight: 600; }
.adm-att-daily-cell-ra b { color: #C2410C; }
.adm-att-daily-ra-min { color: var(--adm-text-muted); font-weight: 500; }
/* V65: cột Trạng thái = flex-wrap → các chip căn đều, cách nhau gap nhất quán,
   xuống dòng gọn gàng (không bị dính/lệch như white-space:nowrap cũ). */
.adm-att-daily-cell-status { min-width: 132px; }
.adm-att-daily-cell-status .adm-att-daily-status-wrap {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
}
.adm-att-daily-cell-empty { color: var(--adm-text-muted); font-style: italic; }
.adm-att-daily-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  border: 1px solid transparent;
}
.adm-att-daily-status--ok { background: rgba(34, 197, 94, 0.12); color: #166534; border-color: rgba(34, 197, 94, 0.22); }
.adm-att-daily-status--late { background: rgba(245, 158, 11, 0.12); color: #B45309; border-color: rgba(245, 158, 11, 0.26); }
.adm-att-daily-status--early { background: rgba(96, 165, 250, 0.15); color: #1E40AF; border-color: rgba(96, 165, 250, 0.30); }
.adm-att-daily-status--long { background: rgba(234, 88, 12, 0.12); color: #C2410C; border-color: rgba(234, 88, 12, 0.26); }
.adm-att-daily-status--live {
  background: rgba(22, 163, 74, 0.12); color: #15803D;
}
/* V65: chấm xanh TĨNH (bỏ animation pulse) — gọn, không nhấp nháy. */
.adm-att-daily-status--live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #22C55E; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

/* ─── V63: Legend + Timeline bar (Bảng ra-vào trong ngày) ──────────── */
.adm-att-daily-legend {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 16px; margin: 0 0 12px;
  padding: 9px 14px;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.035), rgba(30, 58, 138, 0.01));
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  font-size: 11.5px; font-weight: 600; color: var(--adm-text-soft, #475569);
}
.adm-att-daily-legend span { display: inline-flex; align-items: center; }
.adm-tl-lg {
  display: inline-block; width: 15px; height: 11px; border-radius: 3px;
  margin-right: 5px; vertical-align: -1px;
}
.adm-tl-lg-present { background: linear-gradient(180deg, #22C55E, #16A34A); }
.adm-tl-lg-present.is-live {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.40) 0, rgba(255, 255, 255, 0.40) 2px, transparent 2px, transparent 5px),
    linear-gradient(180deg, #22C55E, #16A34A);
}
.adm-tl-lg-leave { background: linear-gradient(180deg, #F97316, #EA580C); }
.adm-tl-lg-lunch { background: repeating-linear-gradient(45deg, #E2E8F0, #E2E8F0 3px, #CBD5E1 3px, #CBD5E1 6px); }
.adm-tl-lg-miss { background: repeating-linear-gradient(45deg, #FEE2E2, #FEE2E2 3px, #FECACA 3px, #FECACA 6px); }
.adm-tl-lg-ref { width: 3px; height: 13px; border-radius: 1px; background: var(--adm-text-soft, #475569); margin-right: 6px; }

.adm-tl {
  position: relative; height: 20px; border-radius: 6px;
  background: #F1F5F9; overflow: hidden; min-width: 230px;
  box-shadow: inset 0 0 0 1px var(--adm-border);
  /* V64: isolate → tạo stacking context RIÊNG, nhốt mọi vạch/dải bên trong
     (kể cả tl-ref z-index:5) → KHÔNG bao giờ đè xuyên qua sticky <thead> khi cuộn. */
  isolation: isolate;
  z-index: 0;
}
.adm-tl > span { position: absolute; top: 0; bottom: 0; }
.adm-tl-miss { background: repeating-linear-gradient(45deg, #FEE2E2, #FEE2E2 3px, #FECACA 3px, #FECACA 6px); z-index: 1; }
.adm-tl-present { background: linear-gradient(180deg, #22C55E, #16A34A); z-index: 2; border-radius: 2px; }
/* V65: "đang làm" — vân chéo TĨNH (KHÔNG animation) phủ nhẹ lên nền xanh đặc → vẫn
   phân biệt rõ "đang diễn ra" nhưng sạch, không nhấp nháy gây rối mắt. */
.adm-tl-present.is-live {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.30) 0, rgba(255, 255, 255, 0.30) 4px, transparent 4px, transparent 9px),
    linear-gradient(180deg, #22C55E, #16A34A);
}
.adm-tl-leave { background: linear-gradient(180deg, #F97316, #EA580C); z-index: 3; box-shadow: 0 0 0 .5px #C2410C; border-radius: 1px; }
.adm-tl-lunch { background: repeating-linear-gradient(45deg, #E2E8F0, #E2E8F0 3px, #CBD5E1 3px, #CBD5E1 6px); z-index: 4; }
.adm-tl-ref { top: 0; bottom: 0; width: 2px; z-index: 5; }
.adm-tl-ref.in { background: rgba(21, 128, 61, 0.75); }
.adm-tl-ref.out { background: rgba(220, 38, 38, 0.75); }
.adm-tl-axis {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--adm-text-muted); font-weight: 600;
  margin-top: 2px; font-variant-numeric: tabular-nums;
}
.adm-att-daily-th-tl { min-width: 248px; }

/* ─── V64: Popup chi tiết check-in/check-out realtime (bấm 1 dòng) ──── */
.adm-io-tlwrap { margin-bottom: 10px; }
.adm-io-tlwrap .adm-tl { height: 26px; border-radius: 8px; }
.adm-io-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  font-size: 11px; font-weight: 600; color: var(--adm-text-soft);
  margin-bottom: 14px;
}
.adm-io-legend span { display: inline-flex; align-items: center; }
.adm-io-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 520px) { .adm-io-stats { grid-template-columns: 1fr; } }
.adm-io-stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; border: 1px solid var(--adm-border); border-radius: 12px;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.04), rgba(30, 58, 138, 0.01));
}
.adm-io-stat-k { font-size: 11px; color: var(--adm-text-muted); font-weight: 600; }
.adm-io-stat-v { font-size: 18px; font-weight: 800; color: var(--adm-text); font-variant-numeric: tabular-nums; }
.adm-io-stat-sub { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--adm-text-muted); margin-left: 2px; }
.adm-io-stat-sub--bad { color: #B45309; }

/* V67: Hành trình ra-vào DỌC (timeline đứng) — thay lưới pill, rõ từng mốc chấm. */
.adm-io-journey { position: relative; margin: 2px 0 2px; }
.adm-io-jnode { position: relative; padding-left: 28px; display: flex; align-items: baseline; gap: 9px; min-height: 22px; }
.adm-io-jnode::before {
  content: ''; position: absolute; left: 5px; top: 4px;
  width: 11px; height: 11px; border-radius: 50%; background: #94A3B8;
  border: 2px solid #fff; box-shadow: 0 0 0 1.5px #94A3B8; z-index: 1;
}
.adm-io-jnode.is-in { color: #15803D; }
.adm-io-jnode.is-in::before { background: #22C55E; box-shadow: 0 0 0 1.5px rgba(34,197,94,.55); }
.adm-io-jnode.is-out { color: #DC2626; }
.adm-io-jnode.is-out::before { background: #EF4444; box-shadow: 0 0 0 1.5px rgba(239,68,68,.5); }
.adm-io-jnode.is-now { color: var(--adm-brand-navy); }
.adm-io-jnode.is-now::before { background: var(--adm-brand-navy); box-shadow: 0 0 0 1.5px rgba(30,58,138,.45); }
.adm-io-jtime { font-weight: 800; font-size: 14px; color: var(--adm-text); font-variant-numeric: tabular-nums; min-width: 44px; }
.adm-io-jlabel { font-size: 12px; font-weight: 700; }
.adm-io-jlabel em { font-style: normal; font-weight: 500; color: var(--adm-text-muted); font-size: 11px; }
.adm-io-jgap { position: relative; padding-left: 28px; min-height: 24px; display: flex; align-items: center; }
.adm-io-jgap::before {
  content: ''; position: absolute; left: 9.5px; top: -5px; bottom: -5px;
  width: 2px; border-radius: 1px; background: var(--adm-border-strong);
}
.adm-io-jgap-txt { font-size: 11.5px; font-weight: 600; padding: 4px 0; color: var(--adm-text-soft); }
.adm-io-jgap-txt b { font-weight: 800; }
.adm-io-jgap.is-work::before { background: linear-gradient(180deg, #86EFAC, #34D399); }
.adm-io-jgap.is-leave::before { background: linear-gradient(180deg, #FB923C, #EA580C); }
.adm-io-jgap.is-leave .adm-io-jgap-txt { color: #C2410C; }
.adm-io-jgap.is-leave .adm-io-jgap-txt b { color: #9A3412; }
.adm-io-jgap.is-lunch::before { background: repeating-linear-gradient(180deg, #CBD5E1, #CBD5E1 3px, #E2E8F0 3px, #E2E8F0 6px); }
.adm-io-jgap.is-lunch .adm-io-jgap-txt { color: var(--adm-text-muted); }
.adm-io-jgap.is-short::before { background: var(--adm-border-strong); }
.adm-io-jgap.is-short .adm-io-jgap-txt { color: var(--adm-text-muted); }
.adm-io-jgap.is-worknow::before { background: repeating-linear-gradient(180deg, var(--adm-brand-navy), var(--adm-brand-navy) 3px, #93C5FD 3px, #93C5FD 6px); }
.adm-io-jgap.is-worknow .adm-io-jgap-txt { color: var(--adm-brand-navy); font-weight: 700; }

.adm-io-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.adm-io-note { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.adm-io-note--ok { background: rgba(34, 197, 94, 0.12); color: #166534; }
.adm-io-note--late { background: rgba(245, 158, 11, 0.14); color: #B45309; }
.adm-io-note--early { background: rgba(96, 165, 250, 0.16); color: #1E40AF; }
.adm-io-note--leave { background: rgba(234, 88, 12, 0.12); color: #C2410C; }
.adm-io-note--live { background: rgba(30, 58, 138, 0.12); color: var(--adm-brand-navy); }
.adm-io-sec { margin-bottom: 14px; }
.adm-io-sec-h { font-size: 12px; font-weight: 700; color: var(--adm-text); margin-bottom: 8px; }
.adm-io-leaves { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.adm-io-leaves li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; border-radius: 9px;
  background: rgba(234, 88, 12, 0.06); border: 1px solid rgba(234, 88, 12, 0.16);
}
.adm-io-leave-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.adm-io-leave-time small { color: var(--adm-text-muted); margin: 0 3px; }
.adm-io-leave-min { font-weight: 700; color: #C2410C; font-size: 12px; }
.adm-io-punches {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.adm-io-punch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px 6px 8px; border-radius: 999px;
  border: 1px solid var(--adm-border); background: #fff;
  font-variant-numeric: tabular-nums;
}
.adm-io-punch .adm-io-punch-ic { font-size: 16px; }
.adm-io-punch.is-in { background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.28); }
.adm-io-punch.is-in .adm-io-punch-ic { color: #15803D; }
.adm-io-punch.is-out { background: rgba(220, 38, 38, 0.06); border-color: rgba(220, 38, 38, 0.24); }
.adm-io-punch.is-out .adm-io-punch-ic { color: #DC2626; }
.adm-io-punch-time { font-weight: 800; font-size: 13px; }
.adm-io-punch-lbl { font-size: 10.5px; font-weight: 700; color: var(--adm-text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.adm-io-hint { font-size: 10.5px; color: var(--adm-text-muted); margin-top: 8px; line-height: 1.5; }
/* V67.1: 2 nút hành động chia ĐỀU chiều ngang popup (flex:1) → cân đối, vừa vặn layout. */
.adm-io-actions { display: flex; gap: 10px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--adm-border); }
.adm-io-btn {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; border-radius: 11px; cursor: pointer;
  font-size: 13px; font-weight: 700; font-family: inherit; white-space: nowrap;
  border: 1.5px solid var(--adm-brand-navy); background: #fff; color: var(--adm-brand-navy);
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
.adm-io-btn .material-symbols-outlined { font-size: 18px; }
.adm-io-btn:hover { background: var(--adm-brand-navy); color: #fff; box-shadow: 0 4px 12px -4px rgba(30, 58, 138, 0.45); }
.adm-io-btn--mei { border-color: var(--adm-brand-orange); color: #C2410C; }
.adm-io-btn--mei:hover { background: var(--adm-brand-orange); color: #fff; box-shadow: 0 4px 12px -4px rgba(255, 140, 0, 0.45); }
@media (max-width: 480px) { .adm-io-actions { flex-direction: column; } }

.adm-att-daily-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--adm-text-muted);
  font-style: italic;
}

/* ─── Snapshot badge cho rankings (tuần) ────────────────────────── */
/* ─── V68.1: Biểu đồ chấm công trực quan (trend tỷ-lệ% + distribution) ─── */
.sev-good { background: linear-gradient(180deg, #22C55E, #16A34A); }
.sev-ok { background: linear-gradient(180deg, #3B82F6, #2563EB); }
.sev-warn { background: linear-gradient(180deg, #FBBF24, #D97706); }
.sev-bad { background: linear-gradient(180deg, #FB923C, #EA580C); }
.sev-critical { background: linear-gradient(180deg, #F87171, #DC2626); }
.sev-navy { background: linear-gradient(180deg, #3B5BB5, #1E3A8A); }
.sev-neutral { background: linear-gradient(180deg, #CBD5E1, #94A3B8); }
/* trend: cột tỷ lệ % theo ngày */
.adm-att-trendbars { width: 100%; }
.adm-att-trend-plot { position: relative; height: 130px; display: flex; align-items: flex-end; gap: 4px; padding: 16px 4px 0; border-bottom: 1px solid var(--adm-border); }
.adm-att-trend-avg { position: absolute; left: 4px; right: 4px; border-top: 1.5px dashed rgba(30, 58, 138, 0.45); z-index: 2; pointer-events: none; }
.adm-att-trend-avg span { position: absolute; right: 0; top: -8px; font-size: 9.5px; font-weight: 800; color: var(--adm-brand-navy); background: #fff; padding: 0 4px; border-radius: 4px; }
.adm-att-tcol { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.adm-att-tval { position: absolute; left: -3px; right: -3px; bottom: var(--h); text-align: center; font-size: 10px; font-weight: 800; margin-bottom: 3px; white-space: nowrap; background: none !important; }
.adm-att-tval small { font-size: 7.5px; font-weight: 700; }
.adm-att-tval.sev-good { color: #15803D; }
.adm-att-tval.sev-warn { color: #C2410C; }
.adm-att-tval.sev-bad { color: #DC2626; }
.adm-att-tbar { width: 100%; height: var(--h); border-radius: 4px 4px 0 0; transition: height 0.5s cubic-bezier(0.22, 0.61, 0.36, 1); }
.adm-att-tbar.is-max { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4); }
.adm-att-tbar.is-min { box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.4); }
.adm-att-trend-xrow { display: flex; gap: 4px; padding: 5px 4px 0; }
.adm-att-trend-xrow span { flex: 1; text-align: center; font-size: 9px; color: var(--adm-text-muted); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; }
/* distribution: cột số + % + tô đậm cột quan trọng */
.adm-att-distchart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 20px 2px 0; }
.adm-att-dcol { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.adm-att-dval { font-size: 12px; font-weight: 800; color: var(--adm-text); margin-bottom: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-att-dval small { font-size: 9px; font-weight: 600; color: var(--adm-text-muted); }
.adm-att-dbar { width: 100%; max-width: 62px; height: var(--h); border-radius: 7px 7px 3px 3px; transition: height 0.5s cubic-bezier(0.22, 0.61, 0.36, 1); }
.adm-att-dbar.is-hot { box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.3), 0 5px 14px -5px rgba(220, 38, 38, 0.55); }
.adm-att-dx { font-size: 10px; color: var(--adm-text-soft); font-weight: 600; margin-top: 7px; text-align: center; white-space: nowrap; }

/* ─── V68: Radar cảnh báo — watch-list "cần nhắc nhở" (brain core) ──── */
.adm-att-radar {
  margin: 0 0 18px; border: 1px solid var(--adm-border); border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.04), #fff); overflow: hidden;
}
.adm-radar-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--adm-border);
}
.adm-radar-title { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--adm-brand-navy); }
.adm-radar-title .material-symbols-outlined { font-size: 20px; }
.adm-radar-kpis { display: flex; flex-wrap: wrap; gap: 7px; }
.adm-radar-kpi { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(15, 20, 36, 0.05); color: var(--adm-text-soft); }
.adm-radar-kpi b { font-size: 14px; }
.adm-radar-kpi.is-warn { background: rgba(234, 88, 12, 0.12); color: #C2410C; }
.adm-radar-kpi.is-ok { background: rgba(34, 197, 94, 0.12); color: #166534; }
.adm-radar-kpi.is-bad { background: rgba(220, 38, 38, 0.10); color: #B91C1C; }
.adm-radar-kpi.is-good { background: rgba(34, 197, 94, 0.12); color: #166534; }
.adm-radar-forecast .material-symbols-outlined { font-size: 17px; }
.adm-radar-forecast.is-improving { background: rgba(34, 197, 94, 0.12); color: #15803D; }
.adm-radar-forecast.is-worsening { background: rgba(220, 38, 38, 0.12); color: #B91C1C; }
.adm-radar-forecast.is-stable { background: rgba(100, 116, 139, 0.12); color: #475569; }
.adm-radar-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px 16px; }
@media (max-width: 820px) { .adm-radar-list { grid-template-columns: 1fr; } }
.adm-radar-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 11px; border-radius: 11px; cursor: pointer; border: 1px solid var(--adm-border); background: #fff; font-family: inherit; transition: background 0.12s, box-shadow 0.12s; }
.adm-radar-row:hover { background: rgba(30, 58, 138, 0.045); box-shadow: 0 2px 10px -5px rgba(15, 20, 36, 0.3); }
.adm-radar-row.level-warn { border-left: 3px solid #DC2626; }
.adm-radar-row.level-watch { border-left: 3px solid #EA580C; }
.adm-radar-rank { font-size: 11px; font-weight: 800; color: var(--adm-text-muted); min-width: 15px; }
.adm-radar-av { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: linear-gradient(135deg, var(--adm-brand-navy), #2563EB); color: #fff; }
.adm-radar-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.adm-radar-name { font-size: 13px; font-weight: 700; color: var(--adm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-radar-name small { color: var(--adm-text-muted); font-weight: 500; font-size: 11px; }
.adm-radar-stat { font-size: 11.5px; color: var(--adm-text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-radar-tr { font-style: normal; font-weight: 700; margin-left: 3px; }
.adm-radar-tr.tr-worsening { color: #DC2626; }
.adm-radar-tr.tr-improving { color: #15803D; }
.adm-radar-tr.tr-stable { color: var(--adm-text-muted); }
.adm-radar-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.adm-radar-risk { font-size: 10.5px; color: var(--adm-text-muted); font-weight: 600; white-space: nowrap; }
.adm-radar-risk b { font-size: 15px; color: #B91C1C; }
.adm-radar-row.level-watch .adm-radar-risk b { color: #C2410C; }
.adm-radar-act { font-size: 10px; font-weight: 700; color: var(--adm-brand-navy); white-space: nowrap; }
.adm-radar-empty { padding: 18px 16px; text-align: center; color: #166534; font-weight: 600; font-size: 13px; }
.adm-radar-foot { padding: 0 16px 12px; font-size: 10.5px; color: var(--adm-text-muted); line-height: 1.5; }

/* ─── V68.2: Bản đồ tiến bộ tuân thủ theo ngày (heatmap NV × ngày) ──── */
.adm-cmap { margin-top: 16px; border: 1px solid var(--adm-border); border-radius: 16px; background: #fff; overflow: hidden; }
.adm-cmap-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; }
.adm-cmap-title { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--adm-brand-navy); }
.adm-cmap-title .material-symbols-outlined { font-size: 20px; }
.adm-cmap-kpis { display: flex; flex-wrap: wrap; gap: 7px; }
.adm-cmap-kpi { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(15, 20, 36, 0.05); color: var(--adm-text-soft); }
.adm-cmap-kpi b { font-size: 14px; }
.adm-cmap-kpi.is-good { background: rgba(34, 197, 94, 0.12); color: #15803D; }
.adm-cmap-kpi.is-bad { background: rgba(220, 38, 38, 0.12); color: #B91C1C; }
.adm-cmap-kpi.is-ok { background: rgba(30, 58, 138, 0.1); color: var(--adm-brand-navy); }
.adm-cmap-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0 16px 10px; font-size: 11px; font-weight: 600; color: var(--adm-text-soft); }
.adm-cmap-legend span { display: inline-flex; align-items: center; }
.adm-cmap-legend i { width: 13px; height: 13px; border-radius: 3px; margin-right: 5px; }
.cm-clean { background: #22C55E; }
.cm-minor { background: #FBBF24; }
.cm-major { background: #EF4444; }
.cm-absent { background: #E2E8F0; }
.adm-cmap-scroll { max-height: 440px; overflow: auto; border-top: 1px solid var(--adm-border); }
.adm-cmap-grid { min-width: 520px; }
.adm-cmap-rowhdr, .adm-cmap-row { display: flex; align-items: center; }
.adm-cmap-rowhdr { position: sticky; top: 0; background: #F8FAFC; z-index: 2; border-bottom: 1px solid var(--adm-border); }
.adm-cmap-name { flex: 0 0 168px; width: 168px; display: flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.adm-cmap-name .adm-cmap-nm { overflow: hidden; text-overflow: ellipsis; }
.adm-cmap-name small { color: var(--adm-text-muted); font-weight: 500; font-size: 10px; margin-left: auto; padding-left: 4px; }
.adm-cmap-rowhdr .adm-cmap-name { font-weight: 700; color: var(--adm-text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2px; }
.adm-cmap-cells { flex: 1; display: flex; gap: 2px; padding: 3px 8px 3px 2px; min-width: 0; }
.adm-cmap-cell { flex: 1; height: 16px; border-radius: 3px; min-width: 6px; }
.adm-cmap-dh { flex: 1; text-align: center; font-size: 8.5px; color: var(--adm-text-muted); font-weight: 700; min-width: 6px; overflow: hidden; }
.adm-cmap-tr { font-style: normal; font-weight: 800; font-size: 10px; flex-shrink: 0; }
.adm-cmap-tr.tr-worsening { color: #DC2626; }
.adm-cmap-tr.tr-improving { color: #15803D; }
.adm-cmap-tr.tr-stable { color: var(--adm-text-muted); }
.adm-cmap-row { cursor: pointer; border: none; background: none; width: 100%; text-align: left; font-family: inherit; border-bottom: 1px solid rgba(15, 20, 36, 0.04); transition: background 0.1s; }
.adm-cmap-row:hover { background: rgba(30, 58, 138, 0.045); }
.adm-cmap-allclean { padding: 22px 16px; text-align: center; color: #166534; font-weight: 600; font-size: 13px; }
.adm-cmap-foot { padding: 9px 16px; font-size: 10.5px; color: var(--adm-text-muted); line-height: 1.55; border-top: 1px solid var(--adm-border); }
.adm-cmap-togglebtn { background: none; border: none; color: var(--adm-brand-navy); font-weight: 700; font-size: 11px; cursor: pointer; font-family: inherit; padding: 0; text-decoration: underline; }
/* V68.3: đồ thị xu hướng (sparkline) thay heatmap ô màu */
.adm-cmap-spk { flex: 1; min-width: 0; padding: 2px 10px 2px 4px; display: flex; align-items: center; }
.adm-cmap-rowhdr .adm-cmap-spk { font-weight: 700; color: var(--adm-text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2px; }
.adm-cmap-spark { width: 100%; height: 34px; display: block; }
.adm-cmap-spark.is-team { height: 46px; }
.adm-cmap-chh { flex: 0 0 80px; width: 80px; text-align: right; padding-right: 12px; display: flex; align-items: center; justify-content: flex-end; }
.adm-cmap-rowhdr .adm-cmap-chh { font-weight: 700; color: var(--adm-text-muted); font-size: 10px; text-transform: uppercase; }
.adm-cmap-ch { font-style: normal; font-weight: 800; font-size: 11.5px; white-space: nowrap; }
.adm-cmap-ch.up { color: #15803D; }
.adm-cmap-ch.down { color: #DC2626; }
.adm-cmap-ch.flat { color: var(--adm-text-muted); }
.adm-cmap-row.is-team { background: rgba(30, 58, 138, 0.04); border-bottom: 1.5px solid var(--adm-border); cursor: default; }
.adm-cmap-row.is-team:hover { background: rgba(30, 58, 138, 0.04); }
.adm-cmap-row.is-team .adm-cmap-name { font-weight: 800; }
.adm-cmap-row.is-team .adm-cmap-tr { font-size: 13px; }
.adm-cmap-row.is-team small { color: var(--adm-brand-navy); font-weight: 700; }
.adm-cmap-tr.tr-improving { color: #15803D; }
.adm-cmap-tr.tr-worsening { color: #DC2626; }
.adm-cmap-tr.tr-stable { color: var(--adm-text-muted); }
.adm-cmap-legend i.cm-up, .adm-cmap-legend i.cm-down, .adm-cmap-legend i.cm-flat { width: 16px; height: 3px; border-radius: 2px; }
.cm-up { background: #16A34A; }
.cm-down { background: #DC2626; }
.cm-flat { background: #94A3B8; }
.adm-cmap-axis { color: var(--adm-text-muted); font-weight: 500; }
/* V68.4: ĐỒ THỊ ĐƯỜNG (line chart) xu hướng tuân thủ toàn đội */
.adm-tg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 4px 16px 0; font-size: 11.5px; font-weight: 600; color: var(--adm-text-soft); }
.adm-tg-legend span { display: inline-flex; align-items: center; }
.adm-tg-legend i { width: 16px; height: 3px; border-radius: 2px; margin-right: 6px; }
.adm-tg-legend .adm-cmap-axis { margin-left: auto; }
.adm-tg-wrap { padding: 6px 14px 8px; }
.adm-tg-svg { width: 100%; height: auto; display: block; overflow: visible; }
.adm-tg-grid { stroke: rgba(15, 20, 36, 0.08); stroke-width: 1; }
.adm-tg-ylabel { fill: var(--adm-text-muted); font-size: 11px; font-weight: 600; text-anchor: end; font-family: inherit; }
.adm-tg-xlabel { fill: var(--adm-text-muted); font-size: 10.5px; font-weight: 600; text-anchor: middle; font-variant-numeric: tabular-nums; font-family: inherit; }
.adm-tg-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.adm-tg-green { stroke: #16A34A; stroke-width: 3; }
.adm-tg-amber { stroke: #F59E0B; stroke-width: 2; opacity: 0.9; }
.adm-tg-red { stroke: #DC2626; stroke-width: 2; opacity: 0.9; }
.adm-tg-dot { fill: #16A34A; stroke: #fff; stroke-width: 1.5; }
.adm-tg-dot:hover { r: 4.5; }

.adm-att-snapshot-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(96, 165, 250, 0.05));
  color: #1E40AF;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  margin-left: 8px;
  letter-spacing: 0.2px;
  vertical-align: middle;
  cursor: help;
}
.adm-att-snapshot-badge .material-symbols-outlined { font-size: 14px; }

/* ─── Attendance — 5 Rankings ────────────────────────────────────── */
.adm-att-rankings-section { padding-bottom: 24px; }
.adm-att-rankings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.adm-att-rank-card {
  border: 1px solid var(--adm-border);
  border-radius: 14px;
  padding: 14px 14px 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.adm-att-rank-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--adm-shadow-md);
}
.adm-att-rank-card > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 10px;
  border-bottom: 1px dashed rgba(15, 20, 36, 0.06);
}
.adm-att-rank-card > header .material-symbols-outlined {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 18px;
  flex-shrink: 0;
}
.adm-att-rank-card > header h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--adm-text);
  line-height: 1.2;
}
.adm-att-rank-card > header small {
  display: block;
  font-size: 10.5px;
  color: var(--adm-text-muted);
  font-weight: 500;
  margin-top: 2px;
}
.adm-att-rank-card > header > div { flex: 1; min-width: 0; }

/* Variant colors */
.adm-att-rank-card--good > header .material-symbols-outlined {
  background: rgba(34, 197, 94, 0.12); color: #166534;
}
.adm-att-rank-card--warn > header .material-symbols-outlined {
  background: rgba(245, 158, 11, 0.12); color: #B45309;
}
.adm-att-rank-card--info > header .material-symbols-outlined {
  background: rgba(96, 165, 250, 0.15); color: #1E40AF;
}
.adm-att-rank-card--brand > header .material-symbols-outlined {
  background: rgba(30, 58, 138, 0.10); color: var(--adm-brand-navy);
}

.adm-att-rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.adm-att-rank-list li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(15, 20, 36, 0.03);
  cursor: pointer;
  transition: background 0.12s;
}
.adm-att-rank-list li:hover { background: rgba(30, 58, 138, 0.03); }
.adm-att-rank-list li:last-child { border-bottom: none; }
.adm-att-rank-pos {
  text-align: center;
  font-weight: 800;
  font-size: 11px;
  color: var(--adm-text-muted);
}
.adm-att-rank-pos.is-top1 { color: #D97706; font-size: 13px; }
.adm-att-rank-pos.is-top2 { color: #6B7280; font-size: 12px; }
.adm-att-rank-pos.is-top3 { color: #92400E; font-size: 12px; }
.adm-att-rank-name {
  font-weight: 600;
  color: var(--adm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-att-rank-value {
  font-weight: 700;
  color: var(--adm-text);
  font-size: 11.5px;
  white-space: nowrap;
}
.adm-att-rank-card--good .adm-att-rank-value { color: #16A34A; }
.adm-att-rank-card--warn .adm-att-rank-value { color: #B45309; }
.adm-att-rank-card--info .adm-att-rank-value { color: #1E40AF; }
.adm-att-rank-card--brand .adm-att-rank-value { color: var(--adm-brand-navy); }
.adm-att-rank-empty {
  font-style: italic;
  color: var(--adm-text-muted);
  font-size: 11.5px;
  padding: 12px 4px;
  text-align: center;
}

/* ─── Month picker cho rankings ───────────────────────────────────── */
.adm-att-month-picker {
  margin-left: 8px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--adm-border, #E5E7EB);
  border-radius: 8px;
  background: #fff;
  color: var(--adm-text, #111827);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.adm-att-month-picker:hover {
  border-color: var(--adm-brand-navy, #1E3A8A);
  background: #F9FAFB;
}
.adm-att-month-picker:focus {
  outline: none;
  border-color: var(--adm-brand-navy, #1E3A8A);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* ─── Rankings BY ORG (Phòng/Khối/Trung tâm) — multi-line row ───── */
.adm-att-rankings-grid--org {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.adm-att-rank-list--org li.adm-att-rank-org-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  cursor: default;
}
.adm-att-rank-list--org li.adm-att-rank-org-row:hover {
  background: rgba(30, 58, 138, 0.04);
}
.adm-att-rank-org-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.adm-att-rank-org-name {
  font-weight: 700;
  color: var(--adm-text);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-att-rank-org-meta {
  font-size: 11px;
  color: var(--adm-text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-att-rank-org-score {
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  min-width: 50px;
  text-align: right;
}
.adm-att-rank-org-score.is-good { color: #16A34A; }
.adm-att-rank-org-score.is-ok   { color: #2563EB; }
.adm-att-rank-org-score.is-warn { color: #F59E0B; }
.adm-att-rank-org-score.is-bad  { color: #DC2626; }
.adm-att-rank-org-score.is-na   { color: var(--adm-text-muted); font-style: italic; font-size: 0.9em; }

/* ─── Attendance slim warn banner ────────────────────────────────── */
.adm-att-warn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.10), rgba(245, 158, 11, 0.02));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--adm-text);
  font-weight: 500;
  margin-bottom: 14px;
  cursor: help;
}
.adm-att-warn.hidden { display: none !important; }
.adm-att-warn .material-symbols-outlined { font-size: 16px; color: #B45309; }
.adm-att-warn strong { color: #B45309; font-weight: 700; }

/* ─── Toolbar (search + filters + sort) ──────────────────────────── */
.adm-att-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: rgba(30, 58, 138, 0.03);
  border: 1px solid rgba(30, 58, 138, 0.08);
  border-radius: 12px;
}
.adm-att-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--adm-border);
  border-radius: 999px;
  flex: 1 1 240px;
  min-width: 220px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.adm-att-search:focus-within {
  border-color: var(--adm-brand-navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}
.adm-att-search > .material-symbols-outlined {
  font-size: 18px;
  color: var(--adm-text-muted);
}
.adm-att-search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--adm-text);
  background: transparent;
  padding: 4px 0;
  min-width: 0;
}
.adm-att-search input::placeholder { color: var(--adm-text-muted); }
.adm-att-search-clear {
  width: 22px; height: 22px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--adm-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.adm-att-search-clear:hover { background: var(--adm-surface-2); color: var(--adm-text); }
.adm-att-search-clear.hidden { display: none !important; }
.adm-att-search-clear .material-symbols-outlined { font-size: 16px; }

/* Sort dropdown */
.adm-att-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--adm-text-soft);
  font-weight: 600;
}
.adm-att-sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 6px center;
  background-size: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-text);
  cursor: pointer;
  transition: border-color 0.15s;
}
.adm-att-sort-select:hover { border-color: var(--adm-brand-navy); }
.adm-att-sort-select:focus { outline: none; border-color: var(--adm-brand-navy); box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10); }

/* Score card hover/active state khi click vào sẽ scroll xuống timeline */
.adm-att-score-card {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.adm-att-score-card:hover {
  border-color: var(--adm-brand-navy);
  transform: translateY(-1px);
  box-shadow: var(--adm-shadow-sm);
}
/* Khi NV được focus từ search/click → highlight */
.adm-att-emp-card.is-focused {
  border-color: var(--adm-brand-orange);
  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.15);
  animation: adm-att-focus-flash 0.6s ease-out;
}
@keyframes adm-att-focus-flash {
  0% { box-shadow: 0 0 0 8px rgba(255, 140, 0, 0.25); }
  100% { box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.15); }
}

/* ─── Attendance detail sections ─────────────────────────────────── */
.adm-att-detail-section {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--adm-shadow-sm);
}
.adm-att-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.adm-att-detail-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--adm-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.adm-att-detail-head h3 .material-symbols-outlined {
  font-size: 20px;
  color: var(--adm-brand-orange);
}
.adm-att-detail-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--adm-text-soft);
}
/* V67.2: sub rỗng (đã clear text) → ẩn hẳn, không để khoảng trống thừa. */
.adm-att-detail-sub:empty { display: none; }
.adm-att-detail-filters {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.adm-att-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--adm-border);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--adm-text-soft);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}
.adm-att-filter:hover { border-color: var(--adm-brand-navy); color: var(--adm-brand-navy); }
.adm-att-filter.is-active {
  background: var(--adm-brand-navy);
  border-color: var(--adm-brand-navy);
  color: #fff;
}
.adm-att-filter .material-symbols-outlined { font-size: 14px; }

/* Timeline list — per-NV daily strip */
.adm-att-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 4px;
}
.adm-att-timeline-list::-webkit-scrollbar { width: 6px; }
.adm-att-timeline-list::-webkit-scrollbar-thumb { background: rgba(15, 20, 36, 0.15); border-radius: 999px; }

.adm-att-emp-card {
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.adm-att-emp-card:hover {
  border-color: rgba(30, 58, 138, 0.20);
  box-shadow: var(--adm-shadow-sm);
}
.adm-att-emp-card.is-long-leave {
  border-color: rgba(239, 68, 68, 0.25);
  background: linear-gradient(0deg, rgba(239, 68, 68, 0.02), #fff);
}
.adm-att-emp-card.is-late {
  border-color: rgba(245, 158, 11, 0.25);
}
.adm-att-emp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.adm-att-emp-info { min-width: 0; flex: 1; }
.adm-att-emp-name {
  font-weight: 700;
  color: var(--adm-text);
  font-size: 13px;
}
.adm-att-emp-meta {
  font-size: 11px;
  color: var(--adm-text-soft);
  font-weight: 600;
  margin-top: 2px;
}
.adm-att-emp-badges {
  display: inline-flex;
  gap: 5px;
  flex-wrap: wrap;
}
.adm-att-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.adm-att-badge--late { background: rgba(245, 158, 11, 0.12); color: #B45309; }
.adm-att-badge--early { background: rgba(96, 165, 250, 0.15); color: #1E40AF; }
.adm-att-badge--long { background: rgba(239, 68, 68, 0.12); color: #991B1B; }
.adm-att-badge--ok { background: rgba(34, 197, 94, 0.12); color: #166534; }

/* Timeline strip — visualize day events (V32: labels ABOVE bar, không bị che) */
.adm-att-timeline {
  position: relative;
  height: 32px;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.04), rgba(30, 58, 138, 0.08));
  border-radius: 8px;
  margin-top: 24px;          /* V32: chừa chỗ cho labels phía trên */
  overflow: visible;         /* V32: was hidden → để labels show above */
}
.adm-att-timeline-track {
  position: absolute;
  inset: 0;
  overflow: hidden;          /* V32: clip segments here, KHÔNG clip labels */
  border-radius: 8px;
}
/* V32: hour label ABOVE bar (was inside, bị che) */
.adm-att-timeline-hour {
  position: absolute;
  top: -18px;
  font-size: 11px;
  font-weight: 600;
  color: var(--adm-text-secondary);
  z-index: 5;
  padding: 0;
  line-height: 16px;
  user-select: none;
  transform: translateX(-50%);  /* center label trên line */
  white-space: nowrap;
}
/* V32: dashed line through bar — chỉ visual cue cho hour */
.adm-att-timeline-hour-line {
  position: absolute;
  top: 0; bottom: 0;
  border-left: 1px dashed rgba(30, 58, 138, 0.15);
  pointer-events: none;
  z-index: 1;
}
/* V32: nửa tiếng — chấm mờ hơn */
.adm-att-timeline-half-hour {
  position: absolute;
  top: 0; bottom: 0;
  border-left: 1px dotted rgba(30, 58, 138, 0.08);
  pointer-events: none;
  z-index: 1;
}
.adm-att-timeline-segment {
  position: absolute;
  top: 6px; bottom: 6px;
  background: linear-gradient(180deg, #22C55E, #16A34A);
  border-radius: 4px;
  opacity: 0.85;
}
.adm-att-timeline-leave {
  position: absolute;
  top: 4px; bottom: 4px;
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, rgba(239, 68, 68, 0.85) 0 4px, rgba(239, 68, 68, 0.6) 4px 8px);
  border: 1px solid rgba(239, 68, 68, 0.4);
  z-index: 2;
}
.adm-att-timeline-event {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 36px;
  background: var(--adm-brand-navy);
  border-radius: 2px;
  z-index: 3;
}
.adm-att-timeline-event--out { background: #EF4444; }
.adm-att-timeline-day-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--adm-text-soft);
  margin-top: 8px;
  margin-bottom: 4px;
}
.adm-att-leave-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
}
.adm-att-leave-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.05);
  border-left: 3px solid #EF4444;
  border-radius: 0 8px 8px 0;
  color: var(--adm-text);
  font-weight: 500;
}
.adm-att-leave-item.is-short {
  background: rgba(245, 158, 11, 0.05);
  border-left-color: #F59E0B;
}
/* V32: 4-tier classification colors */
.adm-att-leave-item.tier-vs {  /* very_short 0-5p — green */
  background: rgba(16, 185, 129, 0.05);
  border-left-color: #10B981;
}
.adm-att-leave-item.tier-s {   /* short 5-15p — amber */
  background: rgba(245, 158, 11, 0.05);
  border-left-color: #F59E0B;
}
.adm-att-leave-item.tier-m {   /* medium 15-30p — orange */
  background: rgba(249, 115, 22, 0.07);
  border-left-color: #F97316;
}
.adm-att-leave-item.tier-l {   /* long 30-60p — red */
  background: rgba(239, 68, 68, 0.06);
  border-left-color: #EF4444;
}
.adm-att-leave-item.tier-vl {  /* very_long >60p — dark red */
  background: rgba(153, 27, 27, 0.08);
  border-left-color: #991B1B;
}
.adm-att-leave-item strong { color: var(--adm-text); font-weight: 700; }

/* Compliance score list */
.adm-att-score-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
}
.adm-att-score-list::-webkit-scrollbar { width: 6px; }
.adm-att-score-list::-webkit-scrollbar-thumb { background: rgba(15, 20, 36, 0.15); border-radius: 999px; }
.adm-att-score-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  background: #fff;
}
.adm-att-score-info { min-width: 0; flex: 1; }
.adm-att-score-name { font-size: 13px; font-weight: 700; color: var(--adm-text); }
.adm-att-score-meta { font-size: 11px; color: var(--adm-text-soft); margin-top: 2px; }
.adm-att-score-num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.adm-att-score-num.is-good { color: #16A34A; }
.adm-att-score-num.is-ok { color: #2563EB; }
.adm-att-score-num.is-warn { color: #F59E0B; }
.adm-att-score-num.is-bad { color: #DC2626; }

/* Responsive — màn hẹp: cho phép label H bars rộng hơn */
@media (max-width: 1280px) {
  .adm-mini-row {
    grid-template-columns: minmax(50px, 42%) 1fr 30px;
    font-size: 10px;
  }
  .adm-mini-bar-v-label {
    font-size: 9.5px;
  }
}
@media (max-width: 980px) {
  .adm-fin-card:has(.adm-mini-chart) {
    min-height: 230px;
  }
  .adm-mini-bars-v {
    gap: 6px;
  }
}

/* ─── Legal view header — meta pill + refresh button ──────────── */
.adm-view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.adm-legal-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.10), rgba(30, 58, 138, 0.06));
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 999px;
  font-size: 12px;
  color: var(--adm-text);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 2px 6px -3px rgba(30, 58, 138, 0.12);
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.adm-legal-meta:hover { transform: translateY(-1px); }
.adm-legal-meta-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94A3B8;
  transition: background 0.3s, box-shadow 0.3s;
  flex-shrink: 0;
}
.adm-legal-meta-dot.is-fresh {
  background: #22C55E;
  box-shadow:
    0 0 0 0 rgba(34, 197, 94, 0.5),
    0 0 6px rgba(34, 197, 94, 0.45);
  animation: adm-pulse-dot 2.4s ease-out infinite;
}
.adm-legal-meta-dot.is-syncing {
  background: var(--adm-brand-orange);
  animation: adm-pulse-dot 1s ease-out infinite;
}
.adm-legal-meta-dot.is-error { background: #EF4444; }
.adm-legal-meta-dot.is-flash {
  background: var(--adm-brand-orange);
  box-shadow: 0 0 0 8px rgba(255, 140, 0, 0);
  animation: adm-flash-dot 1.2s ease-out;
}
/* Variants by state — subtle bg shift */
.adm-legal-meta:has(.is-syncing) {
  background:
    linear-gradient(135deg, rgba(255, 140, 0, 0.12), rgba(255, 140, 0, 0.04));
  border-color: rgba(255, 140, 0, 0.30);
}
.adm-legal-meta:has(.is-error) {
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.10), rgba(239, 68, 68, 0.04));
  border-color: rgba(239, 68, 68, 0.28);
}
@keyframes adm-pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45), 0 0 6px rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0), 0 0 6px rgba(34, 197, 94, 0.25); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0), 0 0 6px rgba(34, 197, 94, 0.45); }
}
@keyframes adm-flash-dot {
  0% { box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.55); transform: scale(1); }
  50% { transform: scale(1.5); }
  100% { box-shadow: 0 0 0 14px rgba(255, 140, 0, 0); transform: scale(1); }
}

.adm-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(30, 58, 138, 0.15);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--adm-brand-navy);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 2px 6px -3px rgba(30, 58, 138, 0.18);
}
.adm-icon-btn:hover {
  background: var(--adm-brand-navy);
  color: #fff;
  border-color: var(--adm-brand-navy);
  transform: translateY(-1px) rotate(45deg);
  box-shadow: 0 6px 14px -4px rgba(30, 58, 138, 0.45);
}
.adm-icon-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.adm-icon-btn .material-symbols-outlined { font-size: 20px; transition: color 0.2s; }
.adm-icon-btn.is-spinning {
  background: var(--adm-brand-navy);
  color: #fff;
  border-color: var(--adm-brand-navy);
}
.adm-icon-btn.is-spinning .material-symbols-outlined {
  animation: adm-spin 0.8s linear infinite;
}
@keyframes adm-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ─── Detail modal — Mei overview box ───────────────────────────── */
.adm-detail-mei {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.06), rgba(255, 140, 0, 0.05));
  border-bottom: 1px solid rgba(30, 58, 138, 0.10);
}
.adm-detail-mei p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--adm-text);
  font-weight: 500;
}
.adm-detail-mei-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--adm-brand-gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  margin-top: 1px;
}

/* Learning variant — navy tone (Mei học) thay orange (tài chính) */
.adm-fin-card--learn .adm-fin-icon {
  background: rgba(30, 58, 138, 0.08);
}
.adm-fin-card--learn .adm-fin-icon .material-symbols-outlined {
  color: var(--adm-brand-navy);
}
.adm-fin-card--learn .adm-fin-percent {
  color: var(--adm-brand-navy);
}

/* ─── Mei panel — Pháp chế hero (navy của Quik) ─────────────────── */
.adm-ai-panel {
  position: relative;
  background:
    linear-gradient(135deg, #1E3A8A 0%, #2C4FB8 55%, #1E3A8A 100%);
  border: 1px solid rgba(30, 58, 138, 0.4);
  border-radius: 20px;
  padding: 24px 26px 22px;
  margin-bottom: 28px;
  color: #fff;
  box-shadow:
    0 12px 32px -16px rgba(30, 58, 138, 0.55),
    0 4px 12px -6px rgba(30, 58, 138, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.adm-ai-panel::before {
  /* mesh subtle texture */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 255, 255, 0.10), transparent 42%),
    radial-gradient(circle at 92% 110%, rgba(255, 140, 0, 0.12), transparent 45%),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.05), transparent 38%);
  pointer-events: none;
  z-index: 0;
}
.adm-ai-panel > * { position: relative; z-index: 1; }
.adm-ai-panel-glow {
  position: absolute;
  top: -80px; right: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255, 140, 0, 0.35), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: adm-glow-pulse 6s ease-in-out infinite;
}
@keyframes adm-glow-pulse {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  50% { transform: scale(1.15) translate(-10px, 10px); opacity: 0.95; }
}

/* Header — avatar + title block */
.adm-ai-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.adm-ai-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFA94D, #FF8C00);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 6px 16px -4px rgba(255, 140, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.adm-ai-avatar-letter {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.adm-ai-avatar-status {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22C55E;
  border: 2px solid #1E3A8A;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: adm-mei-online 2.4s ease-out infinite;
}
@keyframes adm-mei-online {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.adm-ai-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-ai-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.adm-ai-title strong {
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
}
.adm-ai-badge {
  display: inline-block;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  letter-spacing: 1px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.adm-ai-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}
.adm-ai-meta .material-symbols-outlined {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}

/* Quick prompts on hero — glass chips */
.adm-ai-prompts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.adm-ai-prompt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.92);
  font: 600 12px/1.3 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  text-align: left;
  backdrop-filter: blur(8px);
}
.adm-ai-prompt:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.4);
}
.adm-ai-prompt .material-symbols-outlined {
  font-size: 16px;
  color: #FFA94D;
  flex-shrink: 0;
}

/* Input block — white card on navy panel */
.adm-ai-input {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 12px 12px 12px 16px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: box-shadow 0.18s, transform 0.18s;
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.25);
}
.adm-ai-input:focus-within {
  box-shadow:
    0 0 0 3px rgba(255, 140, 0, 0.32),
    0 6px 16px -8px rgba(0, 0, 0, 0.3);
}
.adm-ai-input textarea {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--adm-text);
  background: transparent;
  resize: none;
  min-height: 36px;
  padding: 6px 0;
}
.adm-ai-input textarea::placeholder { color: var(--adm-text-muted); }
.adm-ai-send {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #FFA94D, #FF8C00);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -3px rgba(255, 140, 0, 0.55);
}
.adm-ai-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(255, 140, 0, 0.7);
}
.adm-ai-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.adm-ai-send .material-symbols-outlined { color: #fff; font-size: 20px; }

.adm-ai-response {
  margin-top: 16px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.35);
}
.adm-ai-response-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(30, 58, 138, 0.04);
  border-bottom: 1px solid var(--adm-border);
}
.adm-ai-response-q {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--adm-text-soft);
  font-style: italic;
}
.adm-ai-clear {
  width: 26px; height: 26px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--adm-text-muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.adm-ai-clear:hover { background: var(--adm-surface-2); color: var(--adm-danger); }
.adm-ai-clear .material-symbols-outlined { font-size: 18px; }

.adm-ai-response-body {
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--adm-text);
  max-height: 480px;
  overflow-y: auto;
}
.adm-ai-response-body strong { font-weight: 700; color: var(--adm-brand-navy); }
.adm-ai-response-body h1, .adm-ai-response-body h2, .adm-ai-response-body h3 {
  margin: 14px 0 8px;
  font-weight: 700;
  color: var(--adm-text);
}
.adm-ai-response-body ul, .adm-ai-response-body ol {
  padding-left: 24px;
  margin: 8px 0;
}
.adm-ai-response-body li { margin: 4px 0; }
.adm-ai-response-body p { margin: 8px 0; }
.adm-ai-response-body code {
  background: var(--adm-surface-2);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.adm-ai-loading {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--adm-text-soft);
  font-size: 13px;
}

/* Meta section — relevant contracts + web search sources sau response */
.adm-ai-meta-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--adm-border);
}
.adm-ai-meta-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--adm-text-soft);
  margin-bottom: 8px;
}
.adm-ai-meta-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.adm-ai-meta-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(30, 58, 138, 0.06);
  border: 1px solid rgba(30, 58, 138, 0.18);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--adm-brand-navy);
}
.adm-ai-meta-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: rgba(255, 140, 0, 0.08);
  border: 1px solid rgba(255, 140, 0, 0.22);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--adm-brand-orange);
  text-decoration: none;
  transition: background 0.15s;
}
.adm-ai-meta-link:hover {
  background: rgba(255, 140, 0, 0.15);
}

/* List wrap cho expiring soon */
.adm-list-wrap {
  max-height: 320px;
  overflow-y: auto;
}
.adm-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.12s;
}
.adm-list-item:hover { background: var(--adm-brand-navy-soft); }
.adm-list-item + .adm-list-item { border-top: 1px solid var(--adm-border); }
.adm-list-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.adm-list-title {
  font-size: 12.5px; font-weight: 600;
  color: var(--adm-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-list-sub { font-size: 11px; color: var(--adm-text-muted); }
.adm-list-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--adm-warning);
  flex-shrink: 0;
  margin-left: 8px;
}
.adm-list-badge--danger { background: rgba(239, 68, 68, 0.12); color: var(--adm-danger); }
.adm-empty-small {
  padding: 16px;
  text-align: center;
  color: var(--adm-text-muted);
  font-size: 12px;
  font-style: italic;
}

/* KPI variants thêm */
.adm-kpi--warning .adm-kpi-icon { background: rgba(245, 158, 11, 0.10); }
.adm-kpi--warning .adm-kpi-icon .material-symbols-outlined { color: var(--adm-warning); }
.adm-kpi--danger .adm-kpi-icon { background: rgba(239, 68, 68, 0.10); }
.adm-kpi--danger .adm-kpi-icon .material-symbols-outlined { color: var(--adm-danger); }

/* Loading state */
.adm-loading {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(30, 58, 138, 0.20);
  border-top-color: var(--adm-brand-navy);
  border-radius: 50%;
  animation: adm-spin 0.7s linear infinite;
}
@keyframes adm-spin { to { transform: rotate(360deg); } }

/* ─── Attendance master sync overlay ───────────────────────────────── */
/* Hiện khi cả 3 stream (deep / today / shifts) chưa load xong → block toàn
   bộ viewport (KHÔNG gradient fade) — tránh user thấy data cụt.
   FIXED positioning: spinner luôn ở giữa viewport dù section TALL hay scroll. */
#viewAttendance { position: relative; }
.adm-att-sync-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--adm-side-w, 280px);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  /* V14: tăng opacity 0.98 → 1.0 (full opaque) → KHÔNG có khả năng content
     phía sau lộ ra qua background trong suốt. */
  background: rgb(248, 250, 252);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: all;
  animation: adm-att-sync-fade-in 0.3s ease-out;
  overflow-y: auto;
}
/* Sidebar collapsed → overlay shift sang trái.
   V14 FIX: class chuẩn là `is-side-collapsed` (KHÔNG phải `is-collapsed`)
   — sync với .adm-app trong dashboard.js. Trước đây mismatch → khi user
   collapse sidebar (sidebar 56px), overlay vẫn left:280px → hở gap 224px
   để content bên trong viewAttendance lộ ra (Mei card, KPI grid...). */
.adm-app.is-side-collapsed .adm-att-sync-overlay {
  left: 56px;
}
@media (max-width: 900px) {
  .adm-att-sync-overlay { left: 0; }
}
/* V33: DROP master `is-att-syncing { visibility: hidden }` —
   thay bằng per-section skeleton (.is-section-loading) để mỗi section
   reveal độc lập khi data của nó về. UI nhanh + rõ ràng hơn.
   Vẫn giữ class is-att-syncing trên #viewAttendance để track overall state. */

/* V33 skeleton loader per section — shimmer animation */
.adm-att-detail-section.is-section-loading,
.adm-kpi-grid.is-section-loading,
.adm-ai-panel.is-section-loading,
.adm-att-grid.is-section-loading {
  position: relative;
  min-height: 180px;
  pointer-events: none;
}
.adm-att-detail-section.is-section-loading > *,
.adm-kpi-grid.is-section-loading > *,
.adm-ai-panel.is-section-loading > *,
.adm-att-grid.is-section-loading > * {
  opacity: 0.25;
  filter: blur(0.5px);
  transition: opacity 0.25s, filter 0.25s;
}
.adm-att-detail-section.is-section-loading::after,
.adm-kpi-grid.is-section-loading::after,
.adm-ai-panel.is-section-loading::after,
.adm-att-grid.is-section-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(30,58,138,0.06) 50%,
    rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: v33-skeleton-shimmer 1.8s linear infinite;
  border-radius: 12px;
  z-index: 1;
  pointer-events: none;
}
@keyframes v33-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
/* V33: BỎ :has() fallback rule (was hiding content khi overlay visible).
   Per-section skeleton (.is-section-loading) thay thế cho behavior này. */
.adm-att-sync-overlay.is-visible {
  display: flex;
}
@keyframes adm-att-sync-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.adm-att-sync-spinner {
  position: relative;
  width: 64px; height: 64px;
  margin-bottom: 18px;
}
.adm-att-sync-ring {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: var(--adm-brand-navy);
  border-radius: 50%;
  animation: adm-spin 1.2s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}
.adm-att-sync-ring:nth-child(2) {
  inset: 8px;
  border-top-color: var(--adm-brand-orange, #F59E0B);
  animation-duration: 1.6s;
  animation-direction: reverse;
}
.adm-att-sync-ring:nth-child(3) {
  inset: 16px;
  border-top-color: rgba(30, 58, 138, 0.4);
  animation-duration: 2s;
}
.adm-att-sync-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--adm-brand-navy);
  margin-bottom: 6px;
}
.adm-att-sync-sub {
  font-size: 13px;
  color: var(--adm-text-muted);
  text-align: center;
  max-width: 520px;
  line-height: 1.55;
  margin-bottom: 24px;
}
.adm-att-sync-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  padding: 16px 22px;
  min-width: 340px;
  box-shadow: var(--adm-shadow-sm);
}
.adm-att-sync-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--adm-text);
  font-weight: 500;
  transition: opacity 0.3s, color 0.3s;
}
.adm-att-sync-bullet {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(30, 58, 138, 0.15);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.adm-att-sync-steps li[data-status="loading"] .adm-att-sync-bullet {
  background: var(--adm-brand-navy);
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.15);
  animation: adm-att-sync-pulse 1.2s ease-in-out infinite;
}
.adm-att-sync-steps li[data-status="done"] .adm-att-sync-bullet {
  background: #16A34A;
  box-shadow: none;
  animation: none;
}
.adm-att-sync-steps li[data-status="done"] {
  color: var(--adm-text-muted);
  opacity: 0.7;
}
@keyframes adm-att-sync-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(30, 58, 138, 0.05); }
}

/* Banner cảnh báo data incomplete — hiện inline phía trên content */
.adm-att-incomplete-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 14px 0 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.10) 0%, rgba(245, 158, 11, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 4px solid #F59E0B;
  border-radius: 10px;
  font-size: 13px;
  color: var(--adm-text);
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.08);
}
.adm-att-incomplete-icon {
  font-size: 26px !important;
  flex-shrink: 0;
  color: #F59E0B;
  margin-top: 1px;
}
.adm-att-incomplete-text {
  flex: 1;
  line-height: 1.55;
}
.adm-att-incomplete-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--adm-brand-navy);
  margin-bottom: 4px;
}
.adm-att-incomplete-detail {
  font-size: 12.5px;
  color: var(--adm-text);
  line-height: 1.6;
}
.adm-att-incomplete-detail strong { color: var(--adm-brand-navy); }
.adm-att-incomplete-detail em {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--adm-text-muted);
  font-style: normal;
}
.adm-att-incomplete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--adm-brand-navy);
  border: 1px solid var(--adm-brand-navy);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.adm-att-incomplete-btn:hover:not(:disabled) {
  background: rgba(30, 58, 138, 0.85);
  transform: translateY(-1px);
}
.adm-att-incomplete-btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
/* V11: Animated sync dot — thay thế nút "Thử lại ngay" để cảm giác đang tự sync */
.adm-att-auto-sync-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F59E0B;
  margin: 0 4px;
  animation: adm-att-auto-sync-pulse 1.5s ease-in-out infinite;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
}
@keyframes adm-att-auto-sync-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    opacity: 0.7;
  }
}

/* Skeleton shimmer cho từng section khi loading per-section */
.adm-skeleton {
  background: linear-gradient(90deg,
    rgba(30, 58, 138, 0.04) 0%,
    rgba(30, 58, 138, 0.10) 50%,
    rgba(30, 58, 138, 0.04) 100%);
  background-size: 200% 100%;
  animation: adm-skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes adm-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ──────────────────────────────────────────────────────────────────────────
   V35 — Bảng Điểm Tuân Thủ Redesign + Score Detail Modal + Grade Chips
   ────────────────────────────────────────────────────────────────────────── */

/* Grade chip — colored by EDI grade A+/A/B/C/D */
.adm-att-grade-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.adm-att-grade-chip.is-aplus { background: rgba(16,185,129,0.10); color: #047857; border-color: rgba(16,185,129,0.3); }
.adm-att-grade-chip.is-a     { background: rgba(37,99,235,0.10); color: #1D4ED8; border-color: rgba(37,99,235,0.3); }
.adm-att-grade-chip.is-b     { background: rgba(245,158,11,0.12); color: #B45309; border-color: rgba(245,158,11,0.3); }
.adm-att-grade-chip.is-c     { background: rgba(234,88,12,0.12); color: #C2410C; border-color: rgba(234,88,12,0.3); }
.adm-att-grade-chip.is-d     { background: rgba(220,38,38,0.12); color: #B91C1C; border-color: rgba(220,38,38,0.3); }
.adm-att-grade-chip.is-na    { background: rgba(100,116,139,0.10); color: #475569; border-color: rgba(100,116,139,0.3); }

/* Score card V35 — giống bảng xếp hạng (badge số + tên + điểm + grade) */
.adm-att-score-card-v35 {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid rgba(30, 58, 138, 0.10);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.adm-att-score-card-v35:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.10);
  border-color: rgba(30, 58, 138, 0.25);
}
.adm-att-score-card-v35.is-insufficient {
  opacity: 0.85;
  border-style: dashed;
  background: rgba(100, 116, 139, 0.03);
}
/* V46: NV ca đặc biệt — accent trái + badge giờ ca riêng */
.adm-att-score-card-v35.is-special-shift {
  border-left: 3px solid #F59E0B;
}
.adm-att-special-badge {
  display: inline-block;
  padding: 1px 8px;
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.adm-att-special-note {
  margin-bottom: 10px;
  padding: 9px 13px;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--adm-text-secondary);
}
.adm-att-special-note strong { color: #B45309; }
.adm-att-score-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(30, 58, 138, 0.08);
  color: var(--adm-text-secondary);
  font-weight: 700;
  font-size: 13px;
}
.adm-att-score-pos.is-top1 { background: linear-gradient(135deg, #FBBF24, #F59E0B); color: #fff; }
.adm-att-score-pos.is-top2 { background: linear-gradient(135deg, #E5E7EB, #9CA3AF); color: #fff; }
.adm-att-score-pos.is-top3 { background: linear-gradient(135deg, #FCD34D, #B45309); color: #fff; }
.adm-att-score-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.adm-att-score-card-v35 .adm-att-score-name {
  font-weight: 600;
  color: var(--adm-text);
  font-size: 14px;
  line-height: 1.3;
}
.adm-att-score-card-v35 .adm-att-score-meta {
  font-size: 11.5px;
  color: var(--adm-text-muted);
  line-height: 1.4;
}
.adm-att-score-num-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
}
.adm-att-score-card-v35 .adm-att-score-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  text-align: right;
}
.adm-att-score-card-v35 .adm-att-score-num small { font-size: 13px; opacity: 0.7; margin-left: 1px; }
.adm-att-score-card-v35 .adm-att-score-num.is-good { color: #047857; }
.adm-att-score-card-v35 .adm-att-score-num.is-ok   { color: #1D4ED8; }
.adm-att-score-card-v35 .adm-att-score-num.is-warn { color: #B45309; }
.adm-att-score-card-v35 .adm-att-score-num.is-bad  { color: #B91C1C; }
.adm-att-score-card-v35 .adm-att-score-num.is-na   { color: var(--adm-text-muted); font-size: 22px; }

/* Modal — score detail */
.adm-att-score-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.adm-att-score-modal.is-visible {
  display: flex;
  animation: adm-att-modal-fade 0.18s ease-out;
}
@keyframes adm-att-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.adm-att-score-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.adm-att-score-modal__card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: min(720px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
  overflow: hidden;
}
.adm-att-score-modal__close {
  position: absolute;
  top: 12px; right: 12px;
  border: none;
  background: rgba(15, 23, 42, 0.05);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s;
}
.adm-att-score-modal__close:hover { background: rgba(15, 23, 42, 0.12); }
.adm-att-score-modal__head {
  padding: 22px 28px 14px;
  border-bottom: 1px solid rgba(30, 58, 138, 0.08);
}
.adm-att-score-modal__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.adm-att-score-modal__head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--adm-text);
}
.adm-att-score-modal__sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--adm-text-muted);
}
.adm-att-score-modal__body {
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1;
}
.adm-att-score-modal__foot {
  padding: 12px 28px;
  background: rgba(30, 58, 138, 0.03);
  border-top: 1px solid rgba(30, 58, 138, 0.08);
}
.adm-att-score-modal__foot small {
  color: var(--adm-text-muted);
  font-size: 11.5px;
}

/* Modal — source data block */
.adm-att-modal-source {
  background: rgba(30, 58, 138, 0.04);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.adm-att-modal-source h4 {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-text-secondary);
}
.adm-att-modal-source h4 .material-symbols-outlined { font-size: 16px; }
.adm-att-modal-source ul {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  font-size: 12.5px;
  color: var(--adm-text);
}
.adm-att-modal-source li::before { content: '• '; color: var(--adm-text-muted); }

/* Modal — breakdown table */
.adm-att-modal-breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.adm-att-modal-breakdown thead th {
  text-align: left;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--adm-text-muted);
  border-bottom: 1px solid rgba(30, 58, 138, 0.08);
}
.adm-att-modal-breakdown tbody tr {
  border-bottom: 1px solid rgba(30, 58, 138, 0.05);
}
.adm-att-modal-breakdown tbody td {
  padding: 10px 6px;
  vertical-align: top;
}
.adm-att-modal-row__sign {
  width: 24px;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--adm-text-muted);
}
.adm-att-modal-breakdown tr.is-penalty .adm-att-modal-row__sign { color: #DC2626; }
.adm-att-modal-breakdown tr.is-bonus .adm-att-modal-row__sign { color: #047857; }
.adm-att-modal-breakdown tr.is-base .adm-att-modal-row__sign { color: var(--adm-text); }
.adm-att-modal-row__label {
  font-weight: 600;
  color: var(--adm-text);
}
.adm-att-modal-row__label small {
  display: block;
  font-weight: 400;
  font-size: 11.5px;
  color: var(--adm-text-muted);
  margin-top: 2px;
}
.adm-att-modal-row__value {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 80px;
}
.adm-att-modal-breakdown tr.is-penalty .adm-att-modal-row__value { color: #B91C1C; }
.adm-att-modal-breakdown tr.is-bonus .adm-att-modal-row__value { color: #047857; }
.adm-att-modal-breakdown tfoot tr.is-final {
  background: rgba(30, 58, 138, 0.06);
}
.adm-att-modal-breakdown tfoot td {
  padding: 14px 6px;
  font-size: 15px;
  border-top: 2px solid rgba(30, 58, 138, 0.15);
}
.adm-att-modal-breakdown tfoot td:last-child { color: #1D4ED8; }

/* V36: Detail sections per violation type — show date + time chính xác */
.adm-att-modal-details-wrap {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(30, 58, 138, 0.15);
}
.adm-att-modal-details-title {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-text-secondary);
}
.adm-att-modal-details-title .material-symbols-outlined { font-size: 16px; }
.adm-att-modal-detail-section {
  background: rgba(30, 58, 138, 0.025);
  border: 1px solid rgba(30, 58, 138, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.adm-att-modal-detail-section[open] {
  background: rgba(30, 58, 138, 0.04);
}
.adm-att-modal-detail-section summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--adm-text);
  padding: 6px 0;
  display: flex; align-items: center; gap: 6px;
  user-select: none;
  list-style: none;
}
.adm-att-modal-detail-section summary::-webkit-details-marker { display: none; }
.adm-att-modal-detail-section summary::before {
  content: '▶';
  font-size: 9px;
  color: var(--adm-text-muted);
  transition: transform 0.15s ease;
}
.adm-att-modal-detail-section[open] summary::before { transform: rotate(90deg); }
.adm-att-modal-detail-section summary .material-symbols-outlined {
  font-size: 16px;
  color: var(--adm-text-secondary);
}
.adm-att-modal-detail-list {
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-att-modal-detail-list li {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: #fff;
  border-radius: 6px;
  font-size: 12.5px;
  border-left: 3px solid rgba(220, 38, 38, 0.4);
}
.adm-att-modal-detail-date {
  font-weight: 700;
  color: var(--adm-text);
  font-variant-numeric: tabular-nums;
}
.adm-att-modal-detail-time {
  color: var(--adm-text-secondary);
  font-variant-numeric: tabular-nums;
}
.adm-att-modal-detail-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.adm-att-modal-detail-amount.is-penalty { color: #B91C1C; }

/* V38: shift badge cho afternoon_only NV */
.adm-att-shift-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(37, 99, 235, 0.12);
  color: #1D4ED8;
  border: 1px solid rgba(37, 99, 235, 0.3);
  margin-left: 4px;
  text-transform: lowercase;
}
.adm-att-modal-detail-time small {
  color: var(--adm-text-muted);
  font-weight: 400;
  font-size: 11px;
  margin-left: 4px;
}

.adm-att-modal-clean {
  margin-top: 18px;
  padding: 14px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  display: flex; align-items: center; gap: 8px;
  color: #047857;
  font-weight: 600;
  font-size: 13px;
}
.adm-att-modal-clean .material-symbols-outlined { font-size: 20px; }

/* Modal — insufficient state */
.adm-att-modal-insufficient {
  text-align: center;
  padding: 24px 12px;
  color: var(--adm-text-secondary);
}
.adm-att-modal-insufficient .material-symbols-outlined {
  font-size: 48px;
  color: rgba(100, 116, 139, 0.5);
  margin-bottom: 8px;
}
.adm-att-modal-insufficient h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--adm-text);
}
.adm-att-modal-insufficient p {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.5;
}
.adm-att-modal-insufficient__hint {
  font-size: 12px;
  color: var(--adm-text-muted);
  font-style: italic;
}

/* ── BẢNG ĐIỂM THEO NGÀY (daily score) ──────────────────────────────────────── */
.adm-att-dayscore-wrap { margin-top: 4px; }
/* Tabs (Realtime / Lịch sử) */
/* ===== SMART STATS BAR (realtime today) ===== */
.adm-dsc-stats { display: grid; grid-template-columns: repeat(4, 1fr) 1.5fr; gap: 10px; margin-bottom: 14px; }
.adm-dsc-stat { border: 1px solid var(--adm-border); border-radius: 14px; padding: 11px 14px; background: linear-gradient(180deg, #fff, #FBFCFF); }
.adm-dsc-stat__v { font-size: 23px; font-weight: 800; line-height: 1; letter-spacing: -.5px; color: var(--adm-text); }
.adm-dsc-stat__l { font-size: 11px; color: var(--adm-text-muted); font-weight: 600; margin-top: 5px; }
.adm-dsc-stat__l b { color: var(--adm-text-soft); }
.adm-dsc-stat--brand { background: linear-gradient(135deg, #1E3A8A, #2563EB); border: none; }
.adm-dsc-stat--brand .adm-dsc-stat__v { color: #fff; } .adm-dsc-stat--brand .adm-dsc-stat__l { color: rgba(255,255,255,.8); }
.adm-dsc-stat--dist { display: flex; flex-direction: column; justify-content: center; }
.adm-dsc-distbar { display: flex; height: 11px; border-radius: 6px; overflow: hidden; margin: 7px 0 6px; background: var(--adm-surface-2); }
.adm-dsc-distbar span { display: block; }
.adm-dsc-distlegend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10.5px; font-weight: 700; color: var(--adm-text-soft); }
.adm-dsc-distlegend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 3px; }
@media (max-width: 860px) { .adm-dsc-stats { grid-template-columns: repeat(2, 1fr); } .adm-dsc-stat--dist { grid-column: 1 / -1; } }
/* ===== TOP BAR: switch (trái) + search (phải) — luôn ở ĐẦU section ===== */
.adm-dsc-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--adm-border); }
.adm-dsc-search { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--adm-border); border-radius: 10px; padding: 8px 12px; background: var(--adm-surface); transition: .15s; }
.adm-dsc-search:focus-within { border-color: rgba(37,99,235,.45); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.adm-dsc-search .material-symbols-outlined { color: var(--adm-text-muted); font-size: 18px; }
.adm-dsc-search input { border: none; outline: none; font-family: inherit; font-size: 13px; background: transparent; color: var(--adm-text); width: 190px; }
.adm-dsc-search input::-webkit-search-cancel-button { cursor: pointer; }
/* CONTROLS (chỉ tab Realtime): filter chips (trái) + sort (phải) */
.adm-dsc-controls { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; justify-content: space-between; margin: 14px 0 13px; }
/* (legacy) .adm-dsc-toolbar — giữ tương thích, không dùng nữa */
.adm-dsc-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.adm-dsc-tabs { display: inline-flex; background: var(--adm-surface-2); border-radius: 12px; padding: 4px; gap: 3px; }
.adm-dsc-tab { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: none; background: transparent;
  padding: 9px 18px; border-radius: 9px; color: var(--adm-text-soft); font-weight: 700; font-size: 13.5px; font-family: inherit; }
.adm-dsc-tab.is-active { background: var(--adm-surface); color: var(--adm-brand-navy); box-shadow: var(--adm-shadow-sm); }
.adm-dsc-tab .dot { width: 7px; height: 7px; border-radius: 50%; background: #DC2626; }
.adm-dsc-tab.is-active.is-rt .dot { animation: adm-dsc-pulse 1.4s infinite; }
@keyframes adm-dsc-pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.adm-dsc-sort { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--adm-border); border-radius: 10px;
  padding: 8px 12px; background: var(--adm-surface); font-size: 12.5px; font-weight: 700; color: var(--adm-brand-navy); cursor: pointer; font-family: inherit; }
.adm-dsc-sort .material-symbols-outlined { font-size: 17px; }
.adm-dsc-filters { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.adm-dsc-fchip { cursor: pointer; border: 1px solid var(--adm-border); background: var(--adm-surface); color: var(--adm-text-soft);
  font-weight: 700; font-size: 12px; padding: 6px 11px; border-radius: 999px; font-family: inherit; }
.adm-dsc-fchip:hover { border-color: rgba(37,99,235,.3); }
.adm-dsc-fchip.is-active { background: var(--adm-brand-navy); color: #fff; border-color: var(--adm-brand-navy); }
.adm-dsc-fchip .ct { opacity: .6; font-weight: 800; margin-left: 2px; }
/* ===== MA TRẬN (history) — sticky 2 trục ===== */
.adm-dsc-scroll { overflow: auto; max-height: 640px; border: 1px solid var(--adm-border); border-radius: 12px; position: relative; }
.adm-dsc-table { border-collapse: separate; border-spacing: 0; font-size: 12px; width: max-content; min-width: 100%; }
.adm-dsc-table th, .adm-dsc-table td {
  box-sizing: border-box; padding: 6px 8px; text-align: center; white-space: nowrap;
  border-bottom: 1px solid var(--adm-border); border-right: 1px solid var(--adm-border);
  background: var(--adm-surface);
}
.adm-dsc-table thead th { position: sticky; top: 0; z-index: 3; color: var(--adm-text-muted); font-weight: 700; line-height: 1.25; border-bottom: 2px solid var(--adm-border); }
.adm-dsc-name-h, .adm-dsc-name { position: sticky; left: 0; z-index: 2; text-align: left; width: 160px; min-width: 160px; max-width: 160px; }
.adm-dsc-avg-h, .adm-dsc-avg { position: sticky; left: 160px; z-index: 2; width: 84px; min-width: 84px; font-weight: 800; border-right: 2px solid var(--adm-border); }
.adm-dsc-table thead th.adm-dsc-name-h, .adm-dsc-table thead th.adm-dsc-avg-h { z-index: 6; } /* góc trên-trái: cao nhất, đè cả header ngày lẫn cột sticky */
.adm-dsc-name strong { display: block; font-weight: 700; color: var(--adm-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 144px; }
.adm-dsc-name small, .adm-dsc-avg small { display: block; font-size: 10px; color: var(--adm-text-muted); font-weight: 500; }
.adm-dsc-dcol { min-width: 46px; font-size: 11px; }
.adm-dsc-dcol.is-wknd { opacity: .5; }
.adm-dsc-dcol.is-today { color: #DC2626; }
.adm-dsc-cell { font-weight: 700; min-width: 46px; color: var(--adm-text); cursor: pointer; }
.adm-dsc-cell:hover { filter: brightness(.92); outline: 2px solid var(--adm-brand-navy); outline-offset: -2px; }
.adm-dsc-cell.is-empty { color: var(--adm-border); font-weight: 400; cursor: default; }
.adm-dsc-cell.is-empty:hover { filter: none; outline: none; }
.adm-dsc-cell.is-good, .adm-dsc-avg.is-good  { color: #15803D; }  .adm-dsc-cell.is-good  { background: rgba(21,128,61,.10); }
.adm-dsc-cell.is-ok, .adm-dsc-avg.is-ok      { color: #0D9488; }  .adm-dsc-cell.is-ok    { background: rgba(13,148,136,.10); }
.adm-dsc-cell.is-warn, .adm-dsc-avg.is-warn  { color: #CA8A04; }  .adm-dsc-cell.is-warn  { background: rgba(202,138,4,.13); }
.adm-dsc-cell.is-warn2, .adm-dsc-avg.is-warn2{ color: #EA580C; }  .adm-dsc-cell.is-warn2 { background: rgba(234,88,12,.13); }
.adm-dsc-cell.is-bad, .adm-dsc-avg.is-bad    { color: #DC2626; }  .adm-dsc-cell.is-bad   { background: rgba(220,38,38,.13); }
.adm-dsc-cell.is-live  { box-shadow: inset 0 0 0 2px #DC2626; }
/* ===== REALTIME (cards có ring) ===== */
.adm-dsc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.adm-dsc-card { position: relative; display: flex; flex-direction: column; gap: 11px; padding: 14px 16px;
  border: 1px solid var(--adm-border); border-radius: 14px; background: var(--adm-surface); box-shadow: var(--adm-shadow-sm); overflow: hidden; transition: .16s; }
.adm-dsc-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ac, var(--adm-border)); }
.adm-dsc-card:hover { box-shadow: var(--adm-shadow-md); transform: translateY(-2px); }
.adm-dsc-card__top { display: flex; align-items: center; gap: 11px; }
.adm-dsc-rank { flex: none; font-size: 11px; font-weight: 800; color: var(--adm-text-muted); min-width: 24px; }
.adm-dsc-avatar { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  color: var(--adm-brand-navy); background: rgba(37,99,235,.09); border: 1px solid rgba(37,99,235,.18); }
.adm-dsc-id { flex: 1; min-width: 0; }
.adm-dsc-cname { font-weight: 800; font-size: 14px; color: var(--adm-text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.25; }
.adm-dsc-cmeta { font-size: 11.5px; color: var(--adm-text-muted); font-weight: 600; margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.adm-dsc-cmeta .material-symbols-outlined { font-size: 13px; vertical-align: -2px; }
.adm-dsc-ring { flex: none; position: relative; width: 56px; height: 56px; border-radius: 50%;
  background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--ring-track, #E7ECF6) 0); }
.adm-dsc-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--adm-surface); }
.adm-dsc-ring__v { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.adm-dsc-ring__s { font-size: 17px; font-weight: 800; color: var(--rc); }
.adm-dsc-ring__g { font-size: 8.5px; font-weight: 800; color: var(--rc); letter-spacing: .4px; margin-top: 1px; }
.adm-dsc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-dsc-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 3px 9px; border-radius: 8px; font-weight: 700; }
.adm-dsc-chip .material-symbols-outlined { font-size: 13px; }
.adm-dsc-chip.bad { background: rgba(220,38,38,.10); color: #B91C1C; }
.adm-dsc-chip.warn { background: rgba(234,88,12,.11); color: #C2410C; }
.adm-dsc-chip.ok { background: rgba(21,128,61,.11); color: #15803D; }
.adm-dsc-cactions { display: flex; gap: 8px; }
.adm-dsc-btn { flex: 1; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--adm-border); background: var(--adm-surface); color: var(--adm-text-soft); display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: .12s; }
.adm-dsc-btn .material-symbols-outlined { font-size: 16px; }
.adm-dsc-btn:hover { background: var(--adm-surface-2); color: var(--adm-text); }
.adm-dsc-btn.primary { background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.2); color: var(--adm-brand-navy); }
.adm-dsc-btn.mei { background: linear-gradient(135deg, #1E3A8A, #2563EB); border: none; color: #fff; }
.adm-dsc-btn.mei:hover { filter: brightness(1.08); }
.adm-dsc-empty-rt { text-align: center; color: var(--adm-text-muted); padding: 30px; font-style: italic; grid-column: 1 / -1; }
/* ===== DETAIL MODAL — dedbar + timeline ===== */
.adm-dsc-dedlabel { font-size: 11px; font-weight: 700; color: var(--adm-text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.adm-dsc-dedbar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--adm-surface-2); margin-bottom: 6px; }
.adm-dsc-dedbar span { display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; color: #fff; min-width: 0; overflow: hidden; white-space: nowrap; }
.adm-dsc-ded-keep { background: linear-gradient(180deg, #16A34A, #15803D); }
.adm-dsc-ded-late { background: linear-gradient(180deg, #EF4444, #DC2626); }
.adm-dsc-ded-out { background: linear-gradient(180deg, #F97316, #EA580C); }
.adm-dsc-ded-early { background: linear-gradient(180deg, #F59E0B, #D97706); }
.adm-dsc-dedkey { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; font-weight: 700; color: var(--adm-text-soft); margin-bottom: 16px; }
.adm-dsc-dedkey i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 4px; }
.adm-dsc-tl { position: relative; list-style: none; margin: 0; padding: 0 0 0 26px; }
.adm-dsc-tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--adm-border); }
.adm-dsc-tl li { position: relative; padding: 9px 12px; margin-bottom: 8px; border-radius: 10px; font-size: 13px; line-height: 1.5; background: var(--adm-surface-2); }
.adm-dsc-tl li::before { content: ""; position: absolute; left: -21px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--adm-surface); border: 2px solid var(--adm-text-muted); }
.adm-dsc-tl li.ok { background: rgba(21,128,61,.07); } .adm-dsc-tl li.ok::before { border-color: #15803D; background: #15803D; }
.adm-dsc-tl li.bad { background: rgba(220,38,38,.07); } .adm-dsc-tl li.bad::before { border-color: #DC2626; background: #DC2626; }
.adm-dsc-tl li.warn { background: rgba(234,88,12,.08); } .adm-dsc-tl li.warn::before { border-color: #EA580C; background: #EA580C; }
.adm-dsc-tl li.sum { background: transparent; font-size: 12px; color: var(--adm-text-soft); padding: 2px 12px; } .adm-dsc-tl li.sum::before { display: none; }
.adm-dsc-detail-total { margin-top: 8px; padding: 13px 16px; border-radius: 12px; background: linear-gradient(135deg, #0F1424, #1E293B); color: #fff; font-size: 14px; font-weight: 600; }
.adm-dsc-detail-total strong { font-size: 17px; }
.adm-dsc-detail-note { font-size: 11px; color: var(--adm-text-muted); margin-top: 10px; line-height: 1.6; }
.adm-dsc-detail-actions { display: flex; gap: 9px; margin-top: 14px; flex-wrap: wrap; }
.adm-dsc-detail-actions .adm-dsc-btn { flex: 1; min-width: 170px; padding: 10px; }
/* Nhãn ca đặc biệt / NOC-SOC */
.adm-dsc-shift-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(139,92,246,.12); color: #6D28D9; white-space: nowrap; }
.adm-dsc-shift-badge.nocsoc { background: rgba(13,148,136,.13); color: #0F766E; }
.adm-dsc-shift-badge .material-symbols-outlined { font-size: 12px; vertical-align: -2px; }

/* ===== V69 — CUỐI TUẦN (T7/CN): NV thường đi làm = ghi nhận, không tính kỷ luật ===== */
/* tone xanh "ghi nhận" (emerald) phân biệt với điểm/vi phạm */
.adm-dsc-stat--wknd .adm-dsc-stat__v { color: #047857; }
.adm-dsc-wknd-head { display: flex; align-items: center; gap: 7px; margin: 18px 0 10px; padding: 8px 13px; border-radius: 10px;
  background: rgba(4,120,87,.08); border: 1px solid rgba(4,120,87,.2); color: #047857; font-size: 12.5px; font-weight: 800; }
.adm-dsc-wknd-head .material-symbols-outlined { font-size: 17px; }
.adm-dsc-card.is-wknd { border-color: rgba(4,120,87,.28); background: linear-gradient(180deg, rgba(4,120,87,.045), transparent); }
.adm-dsc-wknd-badge { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(4,120,87,.12); color: #047857; margin-left: auto; }
.adm-dsc-wknd-badge .material-symbols-outlined { font-size: 22px; }
.adm-dsc-chip.wknd { background: rgba(4,120,87,.12); color: #047857; }
/* ô ma trận lịch sử: ngày cuối tuần đi làm (✚ xanh) */
.adm-dsc-cell.is-wknd-off { color: #047857; font-weight: 800; background: rgba(4,120,87,.07); cursor: pointer; }
.adm-dsc-cell.is-wknd-off:hover { filter: brightness(.97); outline: 2px solid rgba(4,120,87,.3); }
/* modal chi tiết cuối tuần */
.adm-dsc-wknd-detail { padding: 4px 2px; }
.adm-dsc-wknd-detail__hd { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #047857; margin-bottom: 10px; }
.adm-dsc-wknd-detail__hd .material-symbols-outlined { font-size: 20px; }
.adm-dsc-wknd-detail__lead { font-size: 13px; color: var(--adm-text-soft); line-height: 1.6; margin: 0 0 12px; }
.adm-dsc-wknd-detail__io { font-size: 13px; color: var(--adm-text); padding: 10px 13px; border-radius: 10px; background: var(--adm-surface-2); margin-bottom: 10px; }
.adm-dsc-wknd-detail__io .material-symbols-outlined { font-size: 15px; vertical-align: -3px; color: var(--adm-text-muted); }
.adm-dsc-wknd-detail__bonus { font-size: 13px; line-height: 1.6; color: #065F46; padding: 11px 14px; border-radius: 11px;
  background: rgba(4,120,87,.09); border: 1px solid rgba(4,120,87,.2); display: flex; gap: 8px; }
.adm-dsc-wknd-detail__bonus .material-symbols-outlined { font-size: 18px; color: #047857; flex-shrink: 0; }
/* bảng ra-vào: pill + badge cuối tuần */
.adm-att-daily-pill--wknd { background: rgba(4,120,87,.10); color: #047857; border-color: rgba(4,120,87,.22); }
.adm-att-daily-pill--wknd-good { background: rgba(4,120,87,.10); color: #047857; border-color: rgba(4,120,87,.22); }
.adm-att-daily-pill--wknd-good strong { color: #047857; }
.adm-att-daily-status--wknd { background: rgba(4,120,87,.12); color: #047857; border-color: rgba(4,120,87,.24); }
/* in/out modal banner cuối tuần */
.adm-io-wknd-banner { display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.55; color: #065F46;
  background: rgba(4,120,87,.09); border: 1px solid rgba(4,120,87,.2); border-radius: 11px; padding: 10px 13px; margin-bottom: 12px; }
.adm-io-wknd-banner .material-symbols-outlined { font-size: 18px; color: #047857; flex-shrink: 0; }
/* legend swatch cuối tuần (bảng ra-vào) */
.adm-tl-lg-wknd { background: #047857; }
