/* ============================================================
   SmartHR — Clean Blue Theme (no gradient)
   Scope: Employee Dashboard (Tổng quan của Nhân viên)
   Tự áp dụng khi trên trang có .checkin-card.
   ============================================================ */

/* --- Layout ------------------------------------------------- */
body:has(.checkin-card) main {
  padding: 28px 32px 60px !important;
}

/* --- Greeting ----------------------------------------------- */
body:has(.checkin-card) .page-head { margin-bottom: 24px; }
body:has(.checkin-card) .page-head h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #1428A0;
}
body:has(.checkin-card) .page-sub {
  font-size: 14px;
  color: rgba(15, 18, 38, 0.6);
  margin-top: 4px;
}

/* --- Standard cards (mini-stats & history) ------------------ */
body:has(.checkin-card) .card {
  border-radius: 16px !important;
  border: 1px solid rgba(15, 18, 38, 0.06) !important;
  box-shadow:
    0 1px 2px rgba(15, 18, 38, 0.03),
    0 6px 20px rgba(15, 18, 38, 0.06) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
body:has(.checkin-card) .card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 2px rgba(15, 18, 38, 0.04),
    0 12px 32px rgba(15, 18, 38, 0.10) !important;
}
body:has(.checkin-card) .card-head {
  padding: 18px 22px;
}
body:has(.checkin-card) .card-head h3 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* --- BIG CHECK-IN CARD: solid brand blue, no gradient ------- */
body:has(.checkin-card) .checkin-card {
  background: #1428A0 !important;
  border-radius: 20px !important;
  padding: 32px !important;
  box-shadow:
    0 12px 32px rgba(20, 40, 160, 0.22),
    0 28px 70px rgba(20, 40, 160, 0.16);
  position: relative;
  overflow: hidden;
}
/* nhẹ nhàng cho có chiều sâu, vẫn là 1 màu xanh */
body:has(.checkin-card) .checkin-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.16), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
body:has(.checkin-card) .checkin-card::after {
  /* tắt shimmer của theme cũ */
  display: none !important;
}
body:has(.checkin-card) .checkin-card > * { position: relative; z-index: 1; }

body:has(.checkin-card) .checkin-time {
  font-size: 72px !important;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff !important;
  /* tắt mọi text-clip gradient của theme cũ */
  background: none !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: none !important;
}
body:has(.checkin-card) .checkin-date {
  font-size: 13.5px;
  opacity: 0.92;
  margin-bottom: 18px !important;
}

/* status chips bên trong card check-in (Thiết bị/GPS/Mạng/Selfie) */
body:has(.checkin-card) .checkin-card span[style*="background:rgba(255,255,255,0.18)"] {
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  padding: 6px 12px !important;
  font-size: 11.5px !important;
}

/* --- CTA button — FIX căn lề tick + text -------------------- */
body:has(.checkin-card) .checkin-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  width: 100%;
  height: 60px !important;
  border-radius: 14px !important;
  font-size: 15.5px !important;
  font-weight: 800 !important;
  background: #fff !important;
  color: #1428A0 !important;
  box-shadow: 0 8px 24px rgba(20, 40, 160, 0.18) !important;
}
/* SVG trong nút: ép inline-block để khỏi xuống dòng (override
   global rule "svg { display: block }" trong CSS gốc) */
body:has(.checkin-card) .checkin-cta svg {
  display: inline-block !important;
  margin: 0 !important;
  flex: 0 0 auto;
}
body:has(.checkin-card) .checkin-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(20, 40, 160, 0.26) !important;
}
body:has(.checkin-card) .checkin-cta.checked {
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.30) !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* --- Mini stat cards (cột phải) ----------------------------- */
body:has(.checkin-card) main .flex.col.gap-3 > .card {
  padding: 18px 20px !important;
}
body:has(.checkin-card) main .flex.col.gap-3 > .card .mono {
  font-size: 26px !important;
  font-weight: 900 !important;
  letter-spacing: -0.025em !important;
}

/* --- KPI icon boxes ----------------------------------------- */
body:has(.checkin-card) .kpi-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
}
body:has(.checkin-card) .kpi-icon svg {
  width: 20px !important;
  height: 20px !important;
}

/* --- History table ------------------------------------------ */
body:has(.checkin-card) .tbl thead th {
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
  color: rgba(15, 18, 38, 0.55) !important;
  padding: 14px 16px !important;
  background: var(--surface-2);
}
body:has(.checkin-card) .tbl tbody tr {
  transition: background 0.15s ease;
}
body:has(.checkin-card) .tbl tbody tr:hover {
  background: rgba(20, 40, 160, 0.04);
}
body:has(.checkin-card) .tbl tbody td {
  padding: 14px 16px !important;
}

/* --- Reduced motion ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body:has(.checkin-card) .card,
  body:has(.checkin-card) .checkin-cta { transition: none; }
}

/* --- Mobile ------------------------------------------------- */
@media (max-width: 720px) {
  body:has(.checkin-card) main { padding: 18px 14px 40px !important; }
  body:has(.checkin-card) .checkin-time { font-size: 54px !important; }
  body:has(.checkin-card) .checkin-card { padding: 24px !important; }
  body:has(.checkin-card) .page-head h1 { font-size: 24px !important; }
}
