/*
 * HRIS SERTCO - tema global (dimuat lewat include/file_css.php, setelah adminlte.min.css)
 * Hanya mempercantik & membuat responsif; tidak mengubah struktur halaman.
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --hris-primary: #00549b;
  --hris-primary-2: #0a6fd1;
  --hris-navy: #0b1730;
  --hris-navy-2: #14284d;
  --hris-accent: #ffc928;
  --hris-bg: #f2f5fa;
  --hris-surface: #ffffff;
  --hris-border: #e3e8f0;
  --hris-text: #1e293b;
  --hris-muted: #64748b;
  --hris-radius: 14px;
  --hris-radius-sm: 10px;
  --hris-shadow: 0 4px 18px rgba(15, 23, 42, .06);
  --hris-shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
}

body {
  font-family: 'Plus Jakarta Sans', 'Source Sans Pro', -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--hris-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.content-wrapper {
  background: var(--hris-bg);
}

a { color: var(--hris-primary-2); }

/* ===== NAVBAR ATAS ===== */
.main-header.navbar {
  background: linear-gradient(90deg, var(--hris-primary) 0%, var(--hris-primary-2) 100%) !important;
  border-bottom: 0 !important;
  box-shadow: 0 2px 14px rgba(0, 40, 90, .18);
  position: sticky;
  top: 0;
  z-index: 1034;
  min-height: 56px;
}
.main-header .nav-link,
.main-header .nav-link i { color: #fff !important; }
.main-header .nav-link:hover { opacity: .85; }
.main-header font { color: var(--hris-accent) !important; }

.hris-navbar-title {
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
  font-size: 1rem;
  margin-left: .25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hris-navbar-title small { color: var(--hris-accent); font-weight: 600; margin-left: .35rem; }
.hris-user-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: .25rem .35rem .25rem .8rem;
  color: #fff !important;
  font-size: .85rem;
  font-weight: 600;
  max-width: 260px;
}
.hris-user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hris-user-chip .hris-logout {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .2);
  color: #fff !important;
  flex-shrink: 0;
}
.hris-user-chip .hris-logout:hover { background: #e74c3c; }

/* ===== SIDEBAR ===== */
.main-sidebar {
  background: linear-gradient(180deg, var(--hris-navy) 0%, var(--hris-navy-2) 100%) !important;
}
.main-sidebar .brand-link {
  background: rgba(255, 255, 255, .04) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 56px;
}
.main-sidebar .brand-link .brand-image {
  border-radius: 10px;
  background: #fff;
  padding: 2px;
  opacity: 1 !important;
}
.main-sidebar .brand-link .brand-text {
  color: var(--hris-accent) !important;
  font-weight: 700;
  font-size: .9rem !important;
}
.nav-sidebar .nav-link {
  border-radius: var(--hris-radius-sm) !important;
  color: #c7d2e5 !important;
  transition: background .15s ease, color .15s ease;
}
.nav-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, .07) !important;
  color: #fff !important;
}
.nav-sidebar .nav-link p { font-weight: 500; }
.nav-sidebar .nav-header {
  color: #7f8fb0 !important;
  font-size: .7rem !important;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
  background: linear-gradient(90deg, var(--hris-primary-2), var(--hris-primary)) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(10, 111, 209, .35);
}
.nav-sidebar .nav-treeview > .nav-item > .nav-link { font-size: .88rem; }
.nav-sidebar .nav-treeview > .nav-item > .nav-link.active {
  background: rgba(255, 255, 255, .12) !important;
  color: #fff !important;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 6px; }

/* ===== HEADER KONTEN ===== */
.content-header h1 {
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--hris-text);
  letter-spacing: -.2px;
}
.breadcrumb { background: transparent; font-size: .85rem; }

/* ===== CARD ===== */
.card {
  border: 0;
  border-radius: var(--hris-radius);
  box-shadow: var(--hris-shadow);
}
.card > .card-header {
  border-top-left-radius: var(--hris-radius);
  border-top-right-radius: var(--hris-radius);
  border-bottom: 1px solid var(--hris-border);
  padding: .8rem 1.1rem;
}
.card > .card-footer {
  border-bottom-left-radius: var(--hris-radius);
  border-bottom-right-radius: var(--hris-radius);
  background: #fafbfd;
}
.card-title { font-weight: 700; }
.card-outline { border-top-width: 3px; }

.small-box, .info-box {
  border-radius: var(--hris-radius);
  box-shadow: var(--hris-shadow);
  overflow: hidden;
}
.small-box { transition: transform .15s ease, box-shadow .15s ease; }
.small-box:hover { transform: translateY(-2px); box-shadow: var(--hris-shadow-lg); }
.info-box .info-box-icon { border-radius: var(--hris-radius-sm); }

/* ===== TABEL ===== */
.table { color: var(--hris-text); }
.table thead th {
  background-color: #f6f8fc;
  color: #334155;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--hris-border) !important;
  vertical-align: middle;
}
.table td, .table th { border-color: #eef1f6; vertical-align: middle; }
.table-hover tbody tr:hover { background-color: #f1f6ff; }
.table-striped tbody tr:nth-of-type(odd) { background-color: #fafbfd; }

/* pembungkus scroll horizontal otomatis (dibuat oleh dist/js/hris-theme.js) */
.hris-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dataTables_wrapper .row > .col-sm-12 {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hris-table-scroll::-webkit-scrollbar,
.dataTables_wrapper .row > .col-sm-12::-webkit-scrollbar { height: 8px; }
.hris-table-scroll::-webkit-scrollbar-thumb,
.dataTables_wrapper .row > .col-sm-12::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }

.page-item .page-link { border-radius: 8px !important; margin: 0 2px; border-color: var(--hris-border); }
.page-item.active .page-link { background: var(--hris-primary-2); border-color: var(--hris-primary-2); }

/* ===== FORM & TOMBOL ===== */
.form-control, .custom-select, .input-group-text {
  border-radius: var(--hris-radius-sm);
  border-color: #d5dce7;
}
.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group-append > .input-group-text { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group-prepend > .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.form-control:focus, .custom-select:focus {
  border-color: var(--hris-primary-2);
  box-shadow: 0 0 0 .2rem rgba(10, 111, 209, .15);
}
label { font-weight: 600 !important; color: #334155; }
.select2-container--default .select2-selection--single,
.select2-container--bootstrap4 .select2-selection { border-radius: var(--hris-radius-sm) !important; }

.btn { border-radius: var(--hris-radius-sm); font-weight: 600; }
.btn-xs, .btn-sm { border-radius: 8px; }
.btn-primary { background: var(--hris-primary-2); border-color: var(--hris-primary-2); }
.btn-primary:hover, .btn-primary:focus { background: var(--hris-primary); border-color: var(--hris-primary); }

.modal-content { border: 0; border-radius: var(--hris-radius); box-shadow: var(--hris-shadow-lg); }
.modal-header { border-bottom-color: var(--hris-border); }
.modal-footer { border-top-color: var(--hris-border); }
.badge { border-radius: 6px; font-weight: 600; }
.alert { border-radius: var(--hris-radius-sm); border: 0; }

/* ===== FOOTER ===== */
.main-footer {
  background: var(--hris-surface) !important;
  color: var(--hris-muted) !important;
  font-size: .85rem !important;
  font-weight: 500 !important;
  border-top: 1px solid var(--hris-border);
}

/* ===== TABLET ===== */
@media (max-width: 991.98px) {
  .hris-navbar-title small { display: none; }
}

/* ===== MOBILE ===== */
@media (max-width: 767.98px) {
  .content-wrapper > .content { padding: 0 .5rem; }
  .content-header { padding: .75rem .5rem; }
  .content-header h1 { font-size: 1.15rem; }
  .content-header .breadcrumb { float: none !important; margin-top: .25rem; }
  .container-fluid { padding-left: .5rem; padding-right: .5rem; }

  .card > .card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    padding: .7rem .85rem;
  }
  .card > .card-header .card-title { float: none; font-size: 1rem; }
  .card > .card-header .card-tools { float: none; margin-left: auto; margin-right: 0; }
  .card-body { padding: .85rem; }

  .table { font-size: 12px; }
  .table td, .table th { padding: .45rem .5rem; }

  /* cegah zoom otomatis iOS saat fokus input */
  .form-control, .custom-select, select, textarea, input { font-size: 16px !important; }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate { text-align: left !important; margin-bottom: .5rem; }
  .dataTables_wrapper .dataTables_filter input { width: 100% !important; margin-left: 0 !important; }
  .dataTables_wrapper .dataTables_paginate .pagination { justify-content: flex-start !important; flex-wrap: wrap; }

  .modal-dialog { margin: .5rem; }
  .small-box .inner h3 { font-size: 1.6rem; }
  .hris-user-chip span { display: none; }
  .hris-user-chip { padding: .25rem; }
  .main-footer { text-align: center; padding: .6rem; }
}

@media (max-width: 575.98px) {
  .hris-navbar-title { font-size: .9rem; max-width: 52vw; }
}

/* ===== CETAK ===== */
@media print {
  .main-header, .main-sidebar, .main-footer, .hris-no-print { display: none !important; }
  .content-wrapper { margin-left: 0 !important; background: #fff !important; }
  .card { box-shadow: none !important; }
  .hris-table-scroll { overflow: visible !important; }
}

/* ===== HALAMAN LOGIN ===== */
body.hris-login {
  min-height: 100vh;
  background: radial-gradient(circle at 15% 20%, rgba(10, 111, 209, .55), transparent 45%),
              radial-gradient(circle at 85% 80%, rgba(255, 201, 40, .25), transparent 40%),
              linear-gradient(135deg, var(--hris-navy) 0%, var(--hris-primary) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
body.hris-login::after { opacity: .08 !important; }
.hris-login .hris-login-hero { text-align: center; color: #fff; margin-bottom: 1.25rem; position: relative; z-index: 1; }
.hris-login .hris-login-hero img {
  height: 64px;
  background: #fff;
  border-radius: 16px;
  padding: 6px;
  box-shadow: var(--hris-shadow-lg);
  margin-bottom: .9rem;
}
.hris-login .hris-login-hero .hris-eyebrow {
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--hris-accent);
  font-weight: 700;
}
.hris-login .hris-login-hero h1 { font-size: 1.7rem; font-weight: 800; margin: .2rem 0 0; }
.hris-login .login-box { width: 100%; max-width: 400px; position: relative; z-index: 1; }
.hris-login .login-box .card { border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); border-top: 0 !important; }
.hris-login .login-box .card-header { background: transparent !important; border-bottom: 0; padding-top: 1.5rem; }
.hris-login .login-box .card-header .h3 { color: var(--hris-text) !important; font-weight: 800; font-size: 1.35rem; }
.hris-login .login-box .card-header p { color: var(--hris-muted); font-size: .85rem; margin: .25rem 0 0; }
.hris-login .login-box .card-body { padding: 1.25rem 1.5rem 1.5rem; }
.hris-login .form-control { height: 46px; }
.hris-login .btn-block { height: 46px; }
.hris-login .hris-login-alert {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.hris-login .hris-login-alert.ok { background: #e8f8ef; color: #146c43; }
.hris-login .hris-login-alert.err { background: #fdecec; color: #b42318; }
.hris-login .hris-login-foot { color: rgba(255, 255, 255, .7); font-size: .8rem; margin-top: 1.25rem; position: relative; z-index: 1; }

/* ===== DASHBOARD: PENGINGAT JATUH TEMPO (utama.php) ===== */
.hris-dashboard-head { padding: 1.1rem 0 .6rem; }
.hris-dashboard-head h1 { font-size: 1.35rem; font-weight: 800; margin: 0; color: var(--hris-text); }
.hris-dashboard-head p { margin: .15rem 0 0; color: var(--hris-muted); font-size: .85rem; }

.hris-reminder { display: flex; flex-direction: column; overflow: hidden; }
.hris-reminder > .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  border-bottom: 1px solid var(--hris-border);
  background: #fff;
}
.hris-reminder > .card-header::after { display: none; }
.hris-reminder-title { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.hris-reminder-title .card-title { float: none; font-size: 1rem; margin: 0; }
.hris-reminder-title small { color: var(--hris-muted); font-size: .75rem; }
.hris-reminder-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.hris-reminder--kontrak .hris-reminder-icon { background: #e3f2f4; color: #0f766e; }
.hris-reminder--sertifikat .hris-reminder-icon { background: #f3e8ff; color: #7e22ce; }
.hris-reminder--mcu .hris-reminder-icon { background: #e0ecfb; color: var(--hris-primary); }
.hris-reminder--service .hris-reminder-icon { background: #fff1e6; color: #c2410c; }
.hris-reminder--kontrak { border-top: 3px solid #14b8a6; }
.hris-reminder--sertifikat { border-top: 3px solid #a855f7; }
.hris-reminder--mcu { border-top: 3px solid var(--hris-primary-2); }
.hris-reminder--service { border-top: 3px solid #f97316; }
/* Data Service (data_service.php): sel jatuh tempo seperti tabel kendaraan client */
.hris-tempo-segera { background: #ffe699 !important; color: #5c4400; }
.hris-tempo-lewat { background: #f8cbad !important; color: #9c0006; }
.hris-tabel-service thead th { background: #acb9ca !important; color: #1f2937 !important; border-color: #8497b0 !important; vertical-align: middle; }
.hris-tabel-service { font-size: .875rem; }
.hris-tabel-service td { vertical-align: middle; padding: .35rem .4rem !important; }
.hris-tabel-service td:nth-child(3) { min-width: 170px; }
/* placeholder "Contoh: ..." tetap huruf biasa walau isian No. Polisi otomatis kapital */
.text-uppercase::placeholder { text-transform: none; }
/* Pengaturan Lembur Progress Kerja (pengaturan_lembur_progress.php): tabel seperti List OT Progress Kerja client */
.hris-tabel-progress { font-size: .85rem; }
.hris-tabel-progress thead th { background: #acb9ca !important; color: #1f2937 !important; border-color: #8497b0 !important; vertical-align: middle; }
.hris-tabel-progress td { vertical-align: middle; padding: .3rem .45rem !important; }
.hris-tabel-progress .hris-progress-desc { min-width: 260px; }
.hris-progress-nonaktif td { color: #9ca3af; background: #f9fafb; }
/* Manajemen Persetujuan (data_wewenang.php): jabatan sebagai chip, hapus per jabatan */
.hris-tabel-wewenang thead th { vertical-align: middle; }
.hris-tabel-wewenang td { vertical-align: middle; }
.hris-chip { display: inline-flex; align-items: center; gap: .25rem; margin: 0 .25rem .3rem 0; padding: .15rem .25rem .15rem .55rem; border-radius: 999px; background: #e8f0fa; color: #0b3d6e; font-size: .85rem; line-height: 1.4; }
.hris-chip-hapus { border: 0; background: transparent; color: #b42318; font-weight: 700; line-height: 1; padding: 0 .3rem; cursor: pointer; border-radius: 999px; }
.hris-chip-hapus:hover { background: #fdecec; }
.hris-reminder-count { display: flex; gap: .35rem; flex-wrap: wrap; }

.hris-reminder > .card-body { flex: 1; }
.hris-reminder-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.hris-reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem 1rem;
  border-bottom: 1px solid #f0f3f8;
}
.hris-reminder-item:last-child { border-bottom: 0; }
.hris-reminder-item:hover { background: #f7faff; }
.hris-reminder-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hris-reminder-badge {
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--hris-primary);
  background: #eef4fc;
  border-radius: 6px;
  padding: .05rem .4rem;
  margin-bottom: .15rem;
}
.hris-reminder-name { font-weight: 700; font-size: .88rem; color: var(--hris-text); line-height: 1.25; overflow-wrap: anywhere; }
.hris-reminder-sub {
  font-size: .75rem; color: var(--hris-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hris-reminder-when { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex-shrink: 0; text-align: right; }
.hris-reminder-date { font-size: .8rem; font-weight: 600; color: #334155; white-space: nowrap; }
.hris-reminder-empty { padding: 2.2rem 1rem; text-align: center; color: var(--hris-muted); font-size: .88rem; }
.hris-reminder-empty i { display: block; font-size: 1.6rem; color: #22c55e; margin-bottom: .4rem; }
.hris-reminder > .card-footer { background: #fafbfd; padding: .55rem 1rem; }

.hris-pill {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
  padding: .32rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.hris-pill--danger { background: #fdecec; color: #b42318; }
.hris-pill--orange { background: #fff1e6; color: #c2410c; }
.hris-pill--warning { background: #fff8db; color: #a16207; }
.hris-pill--success { background: #e7f6ec; color: #15803d; }

@media (max-width: 575.98px) {
  .hris-dashboard-head h1 { font-size: 1.15rem; }
  .hris-reminder-list { max-height: 360px; }
  .hris-reminder-item { padding: .6rem .8rem; }
}

/* ===== Rekap absen admin (data_absen_semua.php) ===== */
.hris-rekap-hero {
  background: linear-gradient(135deg, #00549b 0%, #0a6fd1 55%, #14284d 100%);
  color: #fff;
  border-radius: 18px;
  padding: 1.35rem 1.5rem 1.5rem;
  box-shadow: var(--hris-shadow-lg);
}
.hris-rekap-hero h1 { font-size: 1.45rem; font-weight: 800; margin: 0; color: #fff; }
.hris-rekap-hero > p { margin: .2rem 0 0; opacity: .85; font-size: .9rem; }
.hris-rekap-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) minmax(0, 1.2fr) auto;
  gap: .8rem;
  align-items: end;
  margin-top: 1.05rem;
}
.hris-rekap-filter label { display: block; margin: 0 0 .3rem; font-size: .78rem; font-weight: 600; color: rgba(255, 255, 255, .85); }
.hris-rekap-filter .form-control,
.hris-rekap-filter .select2-container { display: block; width: 100% !important; }
.hris-rekap-filter select.form-control,
.hris-rekap-filter .select2-container--bootstrap4 .select2-selection { height: 42px !important; border: 0; border-radius: 12px; box-shadow: 0 2px 8px rgba(11, 23, 48, .18); }
.hris-rekap-filter .select2-container--bootstrap4 .select2-selection__rendered { line-height: 42px; }
.hris-rekap-filter .select2-container--bootstrap4 .select2-selection__arrow { height: 42px; }
.hris-rekap-excel {
  height: 42px;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 12px;
  background: var(--hris-accent);
  color: #0b1730;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(11, 23, 48, .18);
}
.hris-rekap-excel:hover, .hris-rekap-excel:focus { background: #ffd658; color: #0b1730; }
.hris-rekap-excel i, .hris-rekap-periode i { margin-right: .35rem; }

.hris-rekap-alat { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin: 1rem 0 .85rem; }
.hris-rekap-cari { position: relative; flex: 1 1 240px; max-width: 360px; }
.hris-rekap-cari i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--hris-muted); font-size: .85rem; }
.hris-rekap-cari .form-control { height: 38px; padding-left: 2.2rem; border-radius: 11px; border: 1px solid var(--hris-border); }
.hris-rekap-legenda { display: flex; flex-wrap: wrap; gap: .3rem .75rem; font-size: .76rem; color: var(--hris-muted); }
.hris-rekap-legenda span { display: inline-flex; align-items: center; gap: .3rem; }
.hris-rekap-legenda b { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 6px; font-size: .68rem; }
.hris-rekap-mode { margin-left: auto; }
.hris-rekap-mode .btn { border: 1px solid var(--hris-border); font-weight: 600; }
.hris-rekap-mode .btn.btn-light.active { background: var(--hris-primary) !important; border-color: var(--hris-primary) !important; color: #fff !important; }

.hris-rekap-periode {
  display: inline-block;
  margin-bottom: .75rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: #e8f1fb;
  color: var(--hris-primary);
  font-size: .82rem;
}
.hris-rekap-stat { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem; margin-bottom: .9rem; }
.hris-rekap-stat > div {
  padding: .7rem .85rem;
  border-radius: 14px;
  background: var(--hris-surface);
  border: 1px solid var(--hris-border);
  border-top: 3px solid var(--hris-primary);
}
.hris-rekap-stat span { display: block; font-size: .74rem; color: var(--hris-muted); }
.hris-rekap-stat strong { display: block; font-size: 1.22rem; font-weight: 800; line-height: 1.25; color: var(--hris-text); white-space: nowrap; }
.hris-rekap-stat .s-H { border-top-color: #16a34a; }
.hris-rekap-stat .s-S { border-top-color: #d97706; }
.hris-rekap-stat .s-I { border-top-color: #2563eb; }
.hris-rekap-stat .s-A { border-top-color: #dc2626; }
.hris-rekap-stat .s-C { border-top-color: #7c3aed; }

.hris-rekap-scroll {
  overflow: auto;
  max-height: calc(100vh - 150px);
  min-height: 320px;
  border: 1px solid var(--hris-border);
  border-radius: 14px;
  background: var(--hris-surface);
  box-shadow: var(--hris-shadow);
  -webkit-overflow-scrolling: touch;
}
.hris-rekap { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: .76rem; color: var(--hris-text); }
.hris-rekap th, .hris-rekap td { padding: 0; text-align: center; white-space: nowrap; border-right: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; }
.hris-rekap thead th { position: sticky; top: 0; z-index: 3; background: #0f2a52; color: #fff; font-weight: 700; }
.hris-rekap thead .bln { height: 30px; font-size: .78rem; letter-spacing: .02em; }
.hris-rekap thead .tgl { top: 30px; min-width: 46px; height: 40px; font-size: .84rem; line-height: 1.05; }
.hris-rekap thead .tgl small { display: block; font-size: .58rem; font-weight: 500; opacity: .75; }
.hris-rekap thead .tgl.l { background: #5b1a2e; color: #ffb3bf; }
.hris-rekap thead .tgl.n { background: var(--hris-accent); color: #0b1730; }
.hris-rekap thead .kol-j { min-width: 52px; padding: 0 .4rem; font-size: .72rem; }
/* kolom No & Karyawan menempel di kiri saat tabel digeser */
.hris-rekap .kol-no { position: sticky; left: 0; z-index: 2; min-width: 40px; max-width: 40px; width: 40px; font-size: .74rem; font-weight: 700; color: var(--hris-muted); background: var(--hris-surface); }
.hris-rekap thead .kol-no { z-index: 5; background: #0f2a52; color: #fff; font-size: .8rem; }
.hris-rekap .kol-nama { position: sticky; left: 40px; z-index: 2; min-width: 232px; max-width: 232px; padding: .42rem .7rem; text-align: left; white-space: normal; background: var(--hris-surface); box-shadow: 1px 0 0 #dfe5ee; font-weight: 400; }
.hris-rekap thead .kol-nama { z-index: 5; background: #0f2a52; font-size: .8rem; font-weight: 700; }
.hris-rekap .kol-nama strong { display: block; font-size: .8rem; font-weight: 700; line-height: 1.2; }
.hris-rekap .kol-nama small { display: block; margin-top: 1px; font-size: .66rem; color: var(--hris-muted); line-height: 1.25; }
.hris-rekap tbody tr:hover .kol-nama, .hris-rekap tbody tr:hover td { background-color: #f1f6fd; }
.hris-rekap tbody tr:hover .kol-no { background-color: #f1f6fd; }
.hris-rekap td.h { min-width: 46px; height: 52px; line-height: 1.1; cursor: default; }
.hris-rekap td.h[data-m] { cursor: pointer; }
.hris-rekap td.h[data-m]:hover b { transform: scale(1.12); }
.hris-rekap td.l { background: #fbf6f7; }
.hris-rekap td.n { background: #fffbea; }
.hris-rekap td.h b, .hris-rekap-legenda b {
  transition: transform .12s ease;
}
.hris-rekap td.h b { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 7px; font-size: .72rem; font-weight: 800; }
.hris-rekap td.h i { display: block; font-style: normal; font-size: .6rem; color: var(--hris-muted); line-height: 1.2; }
.k-H b { background: #dcfce7; color: #15803d; }
.k-S b { background: #fef3c7; color: #b45309; }
.k-I b { background: #dbeafe; color: #1d4ed8; }
.k-A b { background: #fee2e2; color: #b91c1c; }
.k-C b { background: #ede9fe; color: #6d28d9; }
.hris-rekap td.j { min-width: 52px; padding: 0 .4rem; font-size: .84rem; font-weight: 800; }
.hris-rekap td.j.k-H { color: #15803d; }
.hris-rekap td.j.k-S { color: #b45309; }
.hris-rekap td.j.k-I { color: #1d4ed8; }
.hris-rekap td.j.k-A { color: #b91c1c; }
.hris-rekap td.j.k-C { color: #6d28d9; }
.hris-rekap td.kosong { padding: 2.2rem 1rem; color: var(--hris-muted); white-space: normal; }

/* Data Lembur & Data Mandah (data_lembur.table.php / data_mandah.table.php): sel berisi angka jam / tanda M */
.k-L b { background: #ffedd5; color: #c2410c; }
.k-M b { background: #cffafe; color: #0e7490; }
.hris-rekap td.j.k-L { color: #c2410c; }
.hris-rekap td.j.k-M { color: #0e7490; }
/* Data Manhours (k-W) & Data Comptime (k-T): data_manhour.table.php / data_comptime.table.php, semua angka tampil seragam */
.k-W b { background: #dbeafe; color: #1d4ed8; }
.k-T b { background: #e0e7ff; color: #4338ca; }
.hris-rekap td.j.k-W { color: #1d4ed8; }
.hris-rekap td.j.k-T { color: #4338ca; }
.hris-rekap--angka td.h { height: 40px; }
.hris-rekap td.j.uang { min-width: 112px; text-align: right; font-size: .78rem; font-weight: 700; }
.hris-rekap td.j.rek { min-width: 120px; font-size: .74rem; font-weight: 600; color: var(--hris-text); }
.hris-rekap tfoot td, .hris-rekap tfoot th { position: sticky; bottom: 0; z-index: 2; height: 36px; background: #eef3fb; font-size: .76rem; font-weight: 800; color: var(--hris-text); border-top: 2px solid #c9d6ea; }
.hris-rekap tfoot .kol-no, .hris-rekap tfoot .kol-nama { z-index: 4; background: #eef3fb; }
.hris-rekap--ringkas td.h { min-width: 32px; height: 34px; }
.hris-rekap--ringkas thead .tgl { min-width: 32px; }
.hris-rekap--ringkas td.h i { display: none; }

.hris-rekap-kosong { padding: 2.5rem 1rem; text-align: center; color: var(--hris-muted); }
.hris-rekap-muat { display: grid; gap: .6rem; }
.hris-rekap-muat div { height: 44px; border-radius: 10px; background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%); background-size: 200% 100%; animation: hris-rekap-kilau 1.2s linear infinite; }
@keyframes hris-rekap-kilau { to { background-position: -200% 0; } }

.hris-rekap-detail { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(11, 23, 48, .5); }
.hris-rekap-detail > div { width: 100%; max-width: 360px; padding: 1.15rem 1.2rem; border-radius: 16px; background: var(--hris-surface); box-shadow: var(--hris-shadow-lg); }
.hris-rekap-detail h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.hris-rekap-detail p { margin: .1rem 0 .8rem; font-size: .8rem; color: var(--hris-muted); }
.hris-rekap-detail dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0 0 .9rem; font-size: .86rem; }
.hris-rekap-detail dt { font-weight: 500; color: var(--hris-muted); }
.hris-rekap-detail dd { margin: 0; font-weight: 700; text-align: right; }
.hris-rekap-detail .lokasi { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .75rem; }
.hris-rekap-detail .lokasi a { flex: 1 1 130px; }

@media (max-width: 1199.98px) {
  .hris-rekap-stat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .hris-rekap-hero { padding: 1.05rem 1rem 1.1rem; border-radius: 14px; }
  .hris-rekap-hero h1 { font-size: 1.2rem; }
  .hris-rekap-filter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hris-rekap-project, .hris-rekap-excel { grid-column: 1 / -1; }
  .hris-rekap-excel { width: 100%; }
  .hris-rekap-cari { flex-basis: 100%; max-width: none; }
  .hris-rekap-mode { margin-left: 0; }
  .hris-rekap-stat { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
  .hris-rekap-stat > div { padding: .5rem .6rem; }
  .hris-rekap-stat strong { font-size: 1.02rem; }
  .hris-rekap-scroll { max-height: calc(100vh - 110px); }
  .hris-rekap .kol-no { min-width: 28px; max-width: 28px; width: 28px; font-size: .64rem; }
  .hris-rekap .kol-nama { left: 28px; min-width: 128px; max-width: 128px; padding: .35rem .45rem; }
  .hris-rekap .kol-nama strong { font-size: .72rem; }
  .hris-rekap .kol-nama small { font-size: .6rem; }
  .hris-rekap-detail { align-items: flex-end; padding: 0; }
  .hris-rekap-detail > div { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: 1.4rem; }
}

/* sidebar diciutkan: submenu terbuka tidak tampil sebagai kotak kosong */
.sidebar-mini.sidebar-collapse .main-sidebar:not(:hover) .nav-treeview { display: none !important; }

/* logo surat sakit (HRIS_TAUTAN_SURAT): rekap absen & Adjust Absen */
.hris-surat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff !important;
  font-size: .62rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .3);
  vertical-align: middle;
}
.hris-surat:hover { background: #b91c1c; }
.hris-surat--legenda { font-style: normal; }
.hris-rekap td.h { position: relative; }
.hris-rekap td.h .hris-surat { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; font-size: .56rem; }
.hris-rekap--ringkas td.h .hris-surat { top: 0; right: 0; width: 14px; height: 14px; font-size: .5rem; }
.hris-rekap-surat { margin-bottom: .85rem; border: 1px solid #fecaca; border-radius: 14px; background: #fff7f7; }
.hris-rekap-surat summary { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; padding: .6rem .85rem; cursor: pointer; font-size: .86rem; font-weight: 700; color: #991b1b; }
.hris-rekap-surat summary .ada, .hris-rekap-surat summary .belum { padding: .08rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.hris-rekap-surat summary .ada { background: #dc2626; color: #fff; }
.hris-rekap-surat summary .belum { background: #fde68a; color: #92400e; }
.hris-rekap-surat .daftar { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: .4rem; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 0 .85rem .75rem; }
.hris-rekap-surat .daftar a, .hris-rekap-surat .daftar .kosong { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .4rem; padding: .35rem .6rem; border-radius: 10px; background: #fff; border: 1px solid #fde2e2; color: var(--hris-text); font-size: .78rem; }
.hris-rekap-surat .daftar a:hover { border-color: #dc2626; text-decoration: none; }
.hris-rekap-surat .daftar strong { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.hris-rekap-surat .daftar small { color: var(--hris-muted); }
.hris-rekap-surat .daftar a i { margin-left: auto; font-size: .62rem; color: #dc2626; }
.hris-rekap-surat .daftar .kosong { opacity: .75; border-style: dashed; }
@media (max-width: 575.98px) {
  .hris-rekap-surat .daftar { grid-auto-columns: 180px; }
}

/* Data Absen akun karyawan (data_absen_karyawan.table.php) */
.hris-absen-kar { font-size: .8rem; min-width: 1150px; }
.hris-absen-kar thead th { background: var(--hris-primary); color: #fff; text-align: center; vertical-align: middle !important; font-weight: 700; white-space: nowrap; padding: .35rem .4rem; border-color: rgba(255, 255, 255, .25) !important; }
.hris-absen-kar thead th.kecil { font-size: .66rem; line-height: 1.2; white-space: normal; min-width: 130px; }
.hris-absen-kar thead th.lebar { min-width: 190px; }
.hris-absen-kar td { vertical-align: middle; padding: .3rem .4rem; }
.hris-absen-kar td.tengah { text-align: center; white-space: nowrap; }
.hris-absen-kar td.libur { color: #dc2626; font-weight: 700; }
.hris-absen-kar td.aksi { white-space: nowrap; }
.hris-absen-kar td.aksi .btn { margin: 1px 0; }
.hris-absen-kar .hris-cek { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 3px; background: #1f2937; color: #fff; font-size: .6rem; }
