:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#15213b;
  --muted:#74829b;
  --line:#e7ebf3;
  --primary:#5b57eb;
  --navy:#071635;
  --orange:#ef7d2f;
  --green:#58c08a;
  --red:#ef4444;
  --shadow:0 8px 24px rgba(15,23,42,.06);
  --radius:22px;
}

.plk-wrapper{
  max-width:1280px;
  margin:24px auto;
  padding:0 16px 32px;
  font-family:Inter, system-ui, sans-serif;
  color:var(--text);
}

/* HEADER */

.plk-header-left{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.plk-logo-wrap{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

.plk-logo-img{
  width:64px;
  height:auto;
  display:block;
  object-fit:contain;
}

.plk-header-text h1,
.plk-header h1{
  font-size:45px;
  line-height:1.1;
  margin:0 0 6px;
  font-weight:800;
  color:#12213f;
}

.plk-header-text p,
.plk-header p{
  margin:0;
  font-size:15px;
  color:#70809a;
  line-height:1.5;
}

/* DIGITAL CLOCK */
.plk-digital-clock{
  min-width:220px;
  background:#fff;
  border:1px solid #e4e8f0;
  box-shadow:var(--shadow);
  border-radius:20px;
  padding:16px 20px;
}

.plk-clock-label{
  color:#bd0000;
  font-weight:800;
  font-size:13px;
  letter-spacing:2px;
  margin-bottom:6px;
}

.plk-clock-time{
  font-size:38px;
  font-weight:800;
  color:#24314f;
  line-height:1.1;
}

/* STATS */
.plk-stats-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:18px;
  margin-top:25px;
}

.plk-stat-card{
  background:var(--card);
  border-radius:24px;
  padding:24px 24px;
  display:flex;
  align-items:center;
  gap:18px;
  box-shadow:var(--shadow);
  border:1px solid #edf1f6;
}

.plk-stat-icon{
  width:68px;
  height:68px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:28px;
  font-weight:700;
  flex:0 0 68px;
}

.plk-stat-card.pagi .plk-stat-icon{ background:var(--orange); }
.plk-stat-card.sore .plk-stat-icon{ background:#6766ef; }
.plk-stat-card.uraian .plk-stat-icon{ background:var(--green); }

.plk-stat-label{
  font-size:16px;
  color:#64748b;
  font-weight:700;
  line-height:1.35;
}

.plk-stat-value{
  font-size:40px;
  font-weight:800;
  line-height:1.1;
  color:#13203d;
  margin-top:4px;
}

/* CARD */
.plk-card{
  background:var(--card);
  border-radius:26px;
  box-shadow:var(--shadow);
  border:1px solid #edf1f6;
  padding:28px;
  margin-bottom:20px;
}

.plk-card-title{
  font-size:24px;
  font-weight:800;
  color:#1c2945;
  line-height:1.2;
}

/* FORM */
.plk-field{
  margin-bottom:14px;
}

.plk-field label{
  display:block;
  font-size:15px;
  font-weight:700;
  margin-bottom:10px;
  color:#334155;
}
.plk-field br{
  display:none;
}

.plk-field input[type="text"],
.plk-field textarea{
  width:100%;
  border:1px solid #dfe5ef;
  border-radius:16px;
  padding:14px 16px;
  font-size:15px;
  color:#1e293b;
  outline:none;
  box-sizing:border-box;
  background:#fff;
  transition:border-color .2s ease, box-shadow .2s ease;
}

.plk-field input[type="text"]:focus,
.plk-field textarea:focus{
  border-color:#c9d3e4;
  box-shadow:0 0 0 3px rgba(91,87,235,.08);
}

.plk-field textarea{
  min-height:130px;
  resize:vertical;
}

.plk-field input::placeholder,
.plk-field textarea::placeholder{
  color:#98a2b3;
}

.plk-field small{
  display:block;
  margin-top:8px;
  color:#8da0bc;
  font-size:13px;
  font-style:italic;
}

/* SESSION */
.plk-session-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:14px;
}

.plk-session-btn{
  position:relative;
  display:block;
  width:100%;
}

.plk-session-btn input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.plk-session-btn span{
  display:flex;
  align-items:center;
  justify-content:center;
  height:58px;
  border-radius:16px;
  border:1.5px solid #e4e8f0;
  font-size:18px;
  font-weight:700;
  color:#94a3b8;
  background:#fff;
  cursor:pointer;
  width:100%;
  box-sizing:border-box;
  transition:all .2s ease;
}

.plk-session-btn span:hover{
  border-color:#d7deea;
  background:#fafbfd;
}

.plk-session-btn input:checked + span{
  border-color:#f07a2b;
  background:#fff8f2;
  color:#cb5b19;
}

/* SIGNATURE */
.plk-signature-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}

#plk-clear-signature{
  background:none;
  border:none;
  color:var(--red);
  font-size:13px;
  font-weight:800;
  letter-spacing:.5px;
  cursor:pointer;
}

#plk-signature-pad{
  width:100%;
  height:180px;
  border:2px dashed #d8e0ec;
  border-radius:18px;
  background:#fff;
  display:block;
}

/* BUTTON */
.plk-submit-btn{
  width:100%;
  border:none;
  border-radius:18px;
  padding:16px 18px;
  font-size:18px;
  font-weight:800;
  color:#fff;
  cursor:pointer;
  background:linear-gradient(90deg,#03122d 0%, #041842 100%);
  box-shadow:0 10px 24px rgba(2,18,45,.18);
  transition:transform .15s ease, box-shadow .2s ease;
}

.plk-submit-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(2,18,45,.22);
}

/* HISTORY */
.plk-history-top{
  display:center;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:30px;
}

.plk-filter-tabs{
  border-radius:16px;
  display:flex;
  gap:8px;
  font-size: 14px;
}

.plk-filter-tabs button{
  border:none;
  background:transparent;
  padding:10px 16px;
  border-radius:12px;
  font-size:14px;
  font-weight:700;
  color:#64748b;
  cursor:pointer;
}

.plk-filter-tabs button.active{
  background:#fff;
  color:#4f46e5;
  box-shadow:var(--shadow);
}

.plk-history-table{
  width:100%;
  border-collapse:collapse;
  overflow:hidden;
}

.plk-history-table thead th{
  text-align:left;
  padding:16px 14px;
  background:#f5f7fb;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  letter-spacing:1px;
  text-transform:uppercase;
}

.plk-history-table tbody td{
  padding:16px 14px;
  border-top:1px solid #edf1f6;
  font-size:14px;
  color:#334155;
}
.plk-history-table th:nth-child(3),
.plk-history-table td:nth-child(3){
  text-align: center;
}
.plk-badge{
  display:inline-flex;
  align-items:center;
  padding:6px 20px;
  border-radius:25px;
  font-size:12px;
  font-weight:800;
  justify-content:center;
  height:35px; /* atau sesuai desain kamu */
  padding:0 16px;
  line-height:0; /* penting! */
}
.plk-history-table td{
  vertical-align: middle;
}
/* PAGI */
.badge-pagi {
    background: #fde8d8;
    color: #c05621;
}

/* SIANG (INI YANG BELUM ADA) */
.badge-siang {
    background: #e6f4ea;
    color: #2f855a;
}

/* SORE */
.badge-sore {
    background: #e9e8ff;
    color: #4c51bf;
}

.plk-ttd-preview img{
  max-width:100px;
  height:auto;
  border:1px solid #e5e7eb;
  border-radius:8px;
  margin-top:8px;
}

.plk-empty-box{
  min-height:180px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#cbd5e1;
  font-size:16px;
  font-weight:700;
  text-align:center;
}

.plk-empty-icon{
  font-size:40px;
  margin-bottom:10px;
}

.plk-history-footer{
  display:flex;
  justify-content:flex-end;
  margin-top:18px;
}

#plk-copy-all{
  background:none;
  border:none;
  color:#4f46e5;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
}

.plk-form-alert{
  display:none;
  margin-bottom:14px;
  padding:12px 14px;
  border-radius:12px;
  background:#fef2f2;
  border:1px solid #fecaca;
  color:#b91c1c;
  font-size:14px;
  font-weight:600;
}
.plk-form-alert{
  display:none;
  margin:12px 0 14px;
  padding:12px 14px;
  border-radius:12px;
  background:#fef2f2;
  border:1px solid #fecaca;
  color:#b91c1c;
  font-size:14px;
  font-weight:600;
}
/* RESPONSIVE */
@media (max-width: 1024px){
  .plk-wrapper{
    max-width:100%;
    padding:0 14px 24px;
  }

  .plk-header{
    flex-direction:column;
    align-items:stretch;
  }

  .plk-header-left{
    align-items:flex-start;
  }

  .plk-digital-clock{
    width:100%;
    min-width:unset;
  }

  .plk-stats-grid{
    grid-template-columns:1fr;
  }

  .plk-session-grid{
    grid-template-columns:1fr;
  }

  .plk-history-top{
    flex-direction:column;
  }

  .plk-header h1,
  .plk-header-text h1{
    font-size:26px;
  }

  .plk-clock-time{
    font-size:32px;
  }

  .plk-card{
    padding:20px;
  }
}

@media (max-width: 640px){
  .plk-logo-img{
    width:52px;
  }

  .plk-header h1,
  .plk-header-text h1{
    font-size:22px;
  }

  .plk-header p,
  .plk-header-text p{
    font-size:13px;
  }

  .plk-stat-card{
    padding:18px;
  }

  .plk-stat-icon{
    width:56px;
    height:56px;
    font-size:22px;
    border-radius:16px;
    flex:0 0 56px;
  }

  .plk-stat-label{
    font-size:14px;
  }

  .plk-stat-value{
    font-size:32px;
  }

  .plk-session-btn span{
    height:52px;
    font-size:16px;
  }

  .plk-submit-btn{
    font-size:16px;
    padding:14px 16px;
  }

  .plk-history-table thead{
    display:none;
  }

  .plk-history-table,
  .plk-history-table tbody,
  .plk-history-table tr,
  .plk-history-table td{
    display:block;
    width:100%;
  }

  .plk-history-table tr{
    border-top:1px solid #edf1f6;
    padding:10px 0;
  }

  .plk-history-table tbody td{
    border:none;
    padding:8px 0;
  }
}
.plk-field select{
  width:100%;
  border:1px solid #dfe5ef;
  border-radius:16px;
  padding:14px 16px;
  font-size:15px;
  color:#1e293b;
  background:#fff;
  outline:none;
  appearance:none;
  cursor:pointer;
  transition:border-color .2s ease, box-shadow .2s ease;

  /* icon dropdown custom */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%2398a2b3' viewBox='0 0 20 20'%3E%3Cpath d='M5 7l5 5 5-5H5z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:16px;
  padding-right:40px;
}

.plk-field select:focus{
  border-color:#c9d3e4;
  box-shadow:0 0 0 3px rgba(91,87,235,.08);
}

.plk-field select:invalid{
  color:#98a2b3;
}

.plk-form-alert{
  display:none;
  margin:12px 0 14px;
  padding:12px 14px;
  border-radius:12px;
  background:#fef2f2;
  border:1px solid #fecaca;
  color:#b91c1c;
  font-size:14px;
  font-weight:600;
}

.plk-error-field{
  border-color:#ef4444 !important;
  box-shadow:0 0 0 3px rgba(239,68,68,.10) !important;
  background:#fffafa !important;
}

.plk-error-canvas{
  border-color:#ef4444 !important;
  background:#fffafa !important;
  box-shadow:0 0 0 3px rgba(239,68,68,.10) !important;
}

.plk-shake{
  animation:plkShake .28s ease-in-out;
}

@keyframes plkShake{
  0%{ transform:translateX(0); }
  20%{ transform:translateX(-4px); }
  40%{ transform:translateX(4px); }
  60%{ transform:translateX(-3px); }
  80%{ transform:translateX(3px); }
  100%{ transform:translateX(0); }
}

#plk-toast-wrap{
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.plk-toast{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.14);
  color: #0f172a;
  font-size: 14px;
  line-height: 1.5;
  pointer-events: auto;
  transform: translateY(-8px);
  opacity: 0;
  animation: plkToastIn .28s ease forwards;
  overflow: hidden;
  position: relative;
}

.plk-toast::after{
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  opacity: .12;
}

.plk-toast-icon{
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
}

.plk-toast-body{
  flex: 1;
  min-width: 0;
}

.plk-toast-title{
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 2px;
}

.plk-toast-message{
  margin: 0;
  color: #475569;
}

.plk-toast-close{
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.plk-toast-close:hover{
  color: #0f172a;
}

.plk-toast-success{
  border-left: 4px solid #16a34a;
}

.plk-toast-success .plk-toast-icon{
  background: rgba(22, 163, 74, .12);
  color: #16a34a;
}

.plk-toast-error{
  border-left: 4px solid #dc2626;
}

.plk-toast-error .plk-toast-icon{
  background: rgba(220, 38, 38, .12);
  color: #dc2626;
}

.plk-toast-warning{
  border-left: 4px solid #d97706;
}

.plk-toast-warning .plk-toast-icon{
  background: rgba(217, 119, 6, .12);
  color: #d97706;
}

.plk-toast-info{
  border-left: 4px solid #2563eb;
}

.plk-toast-info .plk-toast-icon{
  background: rgba(37, 99, 235, .12);
  color: #2563eb;
}

.plk-toast-hide{
  animation: plkToastOut .22s ease forwards;
}

@keyframes plkToastIn{
  from{
    opacity: 0;
    transform: translateY(-8px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes plkToastOut{
  from{
    opacity: 1;
    transform: translateY(0);
  }
  to{
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 768px){
  #plk-toast-wrap{
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .plk-toast{
    padding: 13px 14px;
    border-radius: 12px;
  }
}

.plk-local-time-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  width:100%;
  max-width:560px;
  min-height:108px;
  padding:22px 28px;
  background:#f3f4f6;
  border:1px solid #e5e7eb;
  border-radius:28px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.02),
    0 8px 24px rgba(15,23,42,0.05),
    inset 0 1px 0 rgba(255,255,255,0.75);
}

.plk-local-time-left{
  flex:0 0 auto;
  min-width:190px;
}

.plk-local-time-title{
  font-size:15px;
  font-weight:800;
  letter-spacing:1.8px;
  text-transform:uppercase;
  color:#ef4444;
  line-height:1.1;
  margin-bottom:8px;
}

.plk-local-time-date{
  font-size:18px;
  font-weight:600;
  color:#9ca3af;
  line-height:1.2;
}

.plk-local-time-divider{
  width:1px;
  align-self:stretch;
  background:#d1d5db;
  opacity:.9;
}

.plk-local-time-right{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
}

.plk-local-time-clock{
  font-size:58px;
  font-weight:800;
  line-height:1;
  letter-spacing:1px;
  color:#1e293b;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space:nowrap;
}

@media (max-width: 768px){
  .plk-local-time-card{
    max-width:100%;
    min-height:auto;
    padding:18px 20px;
    gap:18px;
    border-radius:22px;
  }

  .plk-local-time-left{
    min-width:140px;
  }

  .plk-local-time-title{
    font-size:12px;
    letter-spacing:1.4px;
    margin-bottom:6px;
  }

  .plk-local-time-date{
    font-size:14px;
  }

  .plk-local-time-clock{
    font-size:34px;
  }
}

.plk-header{
  display:flex;
  align-items:flex-start;;
  justify-content:space-between;
  gap:10px;
  border-bottom: solid darkslategrey;
    border-width: thick;
    padding: 0 0 25px 0;
}
.plk-header-left{
  display:flex;
  align-items:flex-start; /* ikut atas */
  gap:16px;
}

.plk-logo-wrap{
  display:flex;
  align-items:flex-start;
}
.plk-time-pill{
  flex:0 0 auto;
  margin-left:auto;
  margin-top:4px; /* optional biar pas pixel-perfect */
}
.plk-header-right,
.plk-digital-clock{
  flex:0 0 auto;
}

.plk-time-pill{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-width:420px;
  max-width:460px;
  padding:18px 22px;
  background:#f8f8f8;
  border:1px solid #e7e7e7;
  border-radius:24px;
  box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.plk-time-pill-left{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:165px;
}

.plk-time-pill-label{
  font-size:12px;
  font-weight:800;
  letter-spacing:1.8px;
  text-transform:uppercase;
  color:#ef4444;
  line-height:1.1;
  margin-bottom:6px;
}

.plk-time-pill-date{
  font-size:13px;
  font-weight:600;
  color:#94a3b8;
  line-height:1.2;
  white-space:nowrap;
}

.plk-time-pill-divider{
  width:1px;
  align-self:stretch;
  background:#dddddd;
}

.plk-time-pill-right{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex:1;
  min-width:0;
}

.plk-time-pill-clock{
  font-size:38px;
  font-weight:800;
  line-height:1;
  letter-spacing:0.5px;
  color:#1e293b;
  white-space:nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

@media (max-width: 768px){
  .plk-time-pill{
    min-width:100%;
    max-width:100%;
    padding:14px 16px;
    gap:14px;
    border-radius:18px;
  }

  .plk-time-pill-left{
    min-width:120px;
  }

  .plk-time-pill-label{
    font-size:10px;
    letter-spacing:1.4px;
    margin-bottom:4px;
  }

  .plk-time-pill-date{
    font-size:11px;
  }

  .plk-time-pill-clock{
    font-size:28px;
  }
}

.plk-history-table{
  width:100%;
  table-layout: fixed; /* WAJIB biar width bisa dikontrol */
}

/* WAKTU */
.plk-history-table th:nth-child(1),
.plk-history-table td:nth-child(1){
  width:160px;
}

/* NAMA */
.plk-history-table th:nth-child(2),
.plk-history-table td:nth-child(2){
  width:300px;
}

/* SESI */
.plk-history-table th:nth-child(3),
.plk-history-table td:nth-child(3){
  width:150px;
  text-align:left;
}

/* URAIAN */
.plk-history-table th:nth-child(4),
.plk-history-table td:nth-child(4){
  width:auto; /* sisa ruang */
}

.plk-history-top{
  display:flex;
}

.plk-history-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:20px;
  flex-wrap:wrap;
}

.plk-date-filters{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.plk-date-filters select,
#plk-reset-filter-date{
  height:44px;
  border:1px solid #d9dee7;
  background:#fff;
  border-radius:14px;
  padding:0 14px;
  font-size:14px;
  font-weight:600;
  color:#475569;
  outline:none;
  box-shadow:none;
}

.plk-date-filters select{
  min-width:86px;
  cursor:pointer;
}

#plk-reset-filter-date{
  background:#f8fafc;
  cursor:pointer;
  transition:all .2s ease;
}

#plk-reset-filter-date:hover{
  background:#eef2f7;
}

@media (max-width: 1024px){
  .plk-history-top{
    flex-direction:column;
    align-items:stretch;
  }

  .plk-history-actions{
    justify-content:space-between;
  }
}

@media (max-width: 768px){
  .plk-history-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .plk-date-filters{
    width:100%;
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:10px;
  }

  .plk-date-filters select,
  #plk-reset-filter-date{
    width:100%;
    min-width:0;
  }
}

.plk-uraian-cell{
    max-width: 100%;
}

.plk-uraian-text{
    white-space: normal;
    word-break: break-word;
    line-height: 1.7;
    color: #334155;
}

.plk-uraian-text br{
    display: block;
    content: "";
    margin-bottom: 6px;
}

.plk-filter-tabs a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:90px;
    height:48px;
    padding:0 18px;
    border-radius:16px;
    text-decoration:none;
    color:#64748b;
    font-weight:600;
    transition:all .2s ease;
}

.plk-filter-tabs a.active{
    background:#031840;
    color:#ffffff;
    box-shadow:0 1px 2px rgba(0,0,0,.05);
}

.plk-page-btn:hover{
    border-color:#cbd5e1;
    background:#f8fafc;
}

.plk-page-btn.active{
    background:#4f46e5;
    border-color:#4f46e5;
    color:#fff;
}

.plk-uraian-text{
    line-height:1.7;
    word-break:break-word;
    color:#334155;
}

.plk-uraian-text ol,
.plk-uraian-text ul{
    margin:0;
    padding-left:20px;
}

.plk-uraian-text li{
    margin-bottom:4px;
}



.plk-page-btn:hover{
    border-color:#cbd5e1;
    background:#f8fafc;
}

.plk-page-btn.active{
    background:#4f46e5;
    border-color:#4f46e5;
    color:#fff;
}

.plk-page-btn.prev,
.plk-page-btn.next{
    min-width:auto;
    padding:0 14px;
}

.plk-pagination a,
.plk-pagination span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.plk-history-card{
    overflow:hidden;
}

/* =========================
   PAGINATION FIX FINAL
========================= */
.plk-pagination{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  width:100% !important;
  margin-top:20px !important;
  white-space:nowrap !important;
  overflow-x:auto;
  overflow-y:hidden;
}

.plk-pagination > *{
  flex:0 0 auto !important;
  margin:0 !important;
  display:flex;
}

.plk-pagination a,
.plk-pagination span{
  display:inline-flex !important;
  flex:0 0 auto !important;
  align-items:center !important;
  justify-content:center !important;
  vertical-align:middle !important;
  white-space:nowrap !important;
  text-decoration:none !important;
  box-sizing:border-box !important;
}

.plk-page-btn{
  min-width:38px !important;
  height:38px !important;
  padding:0 12px !important;
  border:1px solid #dbe3ef !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#334155 !important;
  font-size:14px !important;
  font-weight:600 !important;
  line-height:0 !important;
  margin: 10px;
}

.plk-page-btn.prev,
.plk-page-btn.next{
  min-width:auto !important;
  padding:0 14px !important;
}

.plk-page-btn.active{
  background:#4f46e5 !important;
  border-color:#4f46e5 !important;
  color:#fff !important;
}

.plk-page-dots{
  height:38px !important;
  padding:0 2px !important;
  color:#94a3b8 !important;
  font-size:14px !important;
  font-weight:700 !important;
  line-height:1 !important;
}

/* MOBILE: statistik jadi 3 kolom sejajar */
@media (max-width: 768px) {
    .plk-stats-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .plk-stat-card {
        padding: 12px;
        border-radius: 14px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    }

    .plk-stat-icon {
        width: 80px;
        height: 80px;
    }

    .plk-stat-label {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .plk-stat-value {
        font-size: 35px;
        font-weight: 700;
    }
    
    .plk-stat-content {
        width: 100%;
        text-align:center;
    }
}

@media (max-width: 768px) {
    .plk-date-filters p{
        margin: 0 !important;
        padding: 0 !important;
        display: contents !important;
    }
.plk-history-card > p:empty,
.plk-history-top > p:empty,
.plk-history-actions > p:empty,
.plk-date-filters > p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
    
}

@media (max-width: 768px) {
    /* wrapper card riwayat */
    .plk-history-card {
        padding: 18px;
        border-radius: 22px;
    }

    /* sembunyikan header tabel di mobile */
    .plk-history-table thead {
        display: none;
    }

    /* tabel jadi block khusus mobile */
    .plk-history-table,
    .plk-history-table tbody,
    .plk-history-table tr,
    .plk-history-table td {
        display: block;
        width: 100%;
    }

    /* tiap row jadi card */
    .plk-history-table tr {
        background: #fff;
        border: 1px solid #e6ebf2;
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 14px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    }

    /* rapikan isi cell */
    .plk-history-table td {
        border: 0 !important;
        padding: 0 !important;
        margin: 0 0 12px 0;
        text-align: left;
        vertical-align: top;
    }

    .plk-history-table td:last-child {
        margin-bottom: 0;
    }

    /* urutan & style waktu */
    .plk-history-table td:nth-child(1) {
        font-size: 15px;
        line-height: 1.45;
        color: #334155;
        font-weight: 700;
        padding-bottom: 2px !important;
    }

    .plk-history-table td:nth-child(1) small {
        display: block;
        margin-top: 4px;
        font-size: 14px;
        color: #64748b;
        font-weight: 600;
    }

    /* nama, nip, jabatan */
    .plk-history-table td:nth-child(2) > div:first-child {
        font-size: 17px !important;
        line-height: 1.35;
        font-weight: 800 !important;
        color: #334155 !important;
        margin-bottom: 6px;
    }

    .plk-history-table td:nth-child(2) div[style*="font-size:12px"] {
        font-size: 13px !important;
        line-height: 1.45 !important;
        color: #8b8b8b !important;
        margin-bottom: 2px;
    }

    /* sesi badge */
    .plk-history-table td:nth-child(3) {
        margin-top: 2px;
        margin-bottom: 14px;
    }

    .plk-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 84px;
        height: 38px;
        padding: 0 16px;
        border-radius: 999px;
        font-size: 14px;
        font-weight: 700;
    }

    /* uraian */
    .plk-history-table td:nth-child(4) {
        margin-bottom: 0;
        padding-top: 2px !important;
    }

    .plk-uraian-cell {
        width: 100%;
    }

    .plk-uraian-text {
        font-size: 15px;
        line-height: 1.65;
        color: #334155;
        word-break: break-word;
        white-space: pre-line;
        background: #f8fafc;
        border: 1px solid #e6ebf2;
        border-radius: 16px;
        padding: 14px 15px;
    }

    /* hilangkan garis/spacing desktop yang bikin berantakan */
    .plk-history-table-wrap {
        overflow: visible;
    }

    .plk-history-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    /* kalau ada row kosong */
    .plk-empty-row td {
        margin: 0 !important;
    }

    .plk-empty-box {
        border-radius: 18px;
        padding: 18px;
    }
}

@media (max-width: 768px) {

    .plk-history-table td:nth-child(1){
        display:flex;
        justify-content:space-between;  /* 🔥 ini kuncinya */
        align-items:center;
        width:100%;
    }

    /* tanggal kiri */
    .plk-history-table td:nth-child(1) br{
        display:none;
    }

    .plk-history-table td:nth-child(1){
        font-size:15px;
        font-weight:700;
        color:#334155;
    }

    /* jam jadi badge kanan */
    .plk-history-table td:nth-child(1) small{
        display:inline-flex;
        align-items:center;
        justify-content:center;

        margin-left:auto; /* 🔥 biar dorong ke kanan maksimal */

        padding:8px 14px;
        font-size:13px;
        font-weight:800;
        border-radius:999px;

        background:#dbeafe;
        color:#1d4ed8;

        white-space:nowrap;
    }
}

.plk-filter-search input {
    height: 45px;
    min-width: 240px;
    padding: 0 16px;
    border: 1px solid #d7deea;
    border-radius: 16px;
    outline: none;
    font-size: 14px;
    background: #fff;
}

.plk-filter-search input:focus {
    border-color: #1d3b8b;
    box-shadow: 0 0 0 3px rgba(29, 59, 139, 0.08);
}
@media (max-width: 767px) {
  .plk-filter-search {
    width: 100%;
    flex: 0 0 100%;
  }

  .plk-filter-search input,
  .plk-filter-search #plk-filter-nama {
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
  }
}

.plk-row-editing td {
    background: #fffdf5 !important;
}

.plk-row-editing input,
.plk-row-editing select,
.plk-row-editing textarea {
    font-size: 13px;
}
.plk-uraian-cell {
    white-space: normal;
    line-height: 1.6;
    vertical-align: top;
}

.plk-pegawai-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}

.plk-pegawai-header h2{
    margin:0;
}

.plk-btn-tambah-pegawai{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:10px 16px;
    border:1px solid #2271b1;
    background:#2271b1;
    color:#fff;
    border-radius:8px;
    font-size:14px;
    font-weight:600;
    line-height:1;
    cursor:pointer;
    transition:all .2s ease;
}

.plk-btn-tambah-pegawai:hover{
    background:#135e96;
    border-color:#135e96;
    color:#fff;
}

.plk-btn-tambah-pegawai:focus{
    outline:none;
    box-shadow:0 0 0 3px rgba(34,113,177,.18);
}

.plk-admin-card{
    background:#fff;
    border-radius:20px;
    padding:28px;
    box-shadow:0 2px 10px rgba(0,0,0,.04);
    margin-top:20px;
}

.plk-card-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:20px;
}

.plk-card-title{
    margin:0;
    font-size:24px;
    font-weight:700;
    color:#1f2937;
    line-height:1.2;
}

.plk-btn-primary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:48px;
    padding:0 20px;
    border:1px solid #2271b1;
    background:#2271b1;
    color:#fff;
    border-radius:8px;
    font-size:15px;
    font-weight:600;
    text-decoration:none;
    cursor:pointer;
    transition:.2s ease;
    white-space:nowrap;
}

.plk-btn-primary:hover{
    background:#135e96;
    border-color:#135e96;
    color:#fff;
}

.plk-btn-primary:focus{
    outline:none;
    box-shadow:0 0 0 3px rgba(34,113,177,.18);
}

.plk-admin-card{
    background:#fff;
    border-radius:20px;
    padding:28px;
    box-shadow:0 2px 10px rgba(0,0,0,.04);
    margin-top:20px;
}

.plk-card-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:20px;
}

.plk-card-title{
    margin:0;
    font-size:24px;
    font-weight:700;
    color:#1f2937;
    line-height:1.2;
    margin-right: 12px;
}

.plk-btn-primary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:48px;
    padding:0 20px;
    border:1px solid #2271b1;
    background:#2271b1;
    color:#fff;
    border-radius:8px;
    font-size:15px;
    font-weight:600;
    text-decoration:none;
    cursor:pointer;
    transition:.2s ease;
    white-space:nowrap;
}

.plk-btn-primary:hover{
    background:#135e96;
    border-color:#135e96;
    color:#fff;
}

.plk-btn-primary:focus{
    outline:none;
    box-shadow:0 0 0 3px rgba(34,113,177,.18);
}

.plk-modal-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.plk-modal{
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,.18);
    overflow: hidden;
}

.plk-modal-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.plk-modal-header h3{
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.plk-modal-close{
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.plk-form-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
}

.plk-form-group{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plk-form-group label{
    font-weight: 600;
    color: #374151;
}

.plk-form-group input,
.plk-form-group select{
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.plk-modal-actions{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px 20px;
}

body.plk-modal-open{
    overflow: hidden;
}

@media (max-width: 768px){
    .plk-form-grid{
        grid-template-columns: 1fr;
    }
}

.plk-field-help{
    display:block;
    margin-top:8px;
    font-size:12px;
    color:#6b7280;
    line-height:1.5;
}

.plk-camera-section{
    margin-top:4px;
}

/* =========================
   CAMERA BOX - PROPORSIONAL & CENTER
========================= */
.plk-camera-box {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
    min-height: unset;
    border: 1px dashed #d1d5db;
    border-radius: 18px;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plk-camera-preview,
.plk-camera-canvas {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #0f172a;
    border-radius: 18px;
}

.plk-camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: rgba(255,255,255,.72);
    line-height: 1.6;
    background: linear-gradient(135deg, #09162f 0%, #0b1e46 100%);
}

.plk-camera-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    justify-content: center;
}

.plk-camera-btn {
    appearance: none;
    border: none;
    border-radius: 14px;
    padding: 10px 16px;
    min-width: 130px;
    min-height: 46px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.plk-photo-result-wrap {
    width: 100%;
    max-width: 420px;
    margin: 14px auto 0;
}

.plk-photo-result-label {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    text-align: center;
}

.plk-photo-result {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    display: block;
    background: #f3f4f6;
}

/* karena preview akan dipindah ke box utama */
#plk-photo-result-wrap {
    display: none !important;
}

@media (max-width: 768px) {
    .plk-camera-box {
        max-width: 320px;
        border-radius: 16px;
    }

    .plk-camera-preview,
    .plk-camera-canvas,
    .plk-photo-result {
        border-radius: 16px;
    }

    .plk-camera-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .plk-camera-btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 12px;
    }

    #plk-capture-camera {
        grid-column: 1 / -1;
    }

    .plk-camera-placeholder {
        padding: 16px;
        font-size: 13px;
    }
}

/* =========================
   BUTTON BASE
========================= */
.plk-camera-btn {
    appearance: none;
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    min-width: 130px;
    min-height: 48px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

/* =========================
   VARIAN BUTTON
========================= */

/* buka kamera */
#plk-start-camera {
    background: #e5e7eb;
    color: #111827;
    height:10px;
}

#plk-start-camera:hover {
    background: #d1d5db;
}

/* ambil foto (PRIMARY) */
#plk-capture-camera {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.3);
}

#plk-capture-camera:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.4);
}

/* disable state */
#plk-capture-camera:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
}

/* ambil ulang */
#plk-retake-camera {
    background: #f3f4f6;
    color: #111827;
}

#plk-retake-camera:hover {
    background: #e5e7eb;
}

/* =========================
   FIX MOBILE CAMERA BUTTONS
========================= */
@media (max-width: 768px) {
    .plk-camera-actions {
        width: 100%;
        max-width: 320px;
        margin: 14px auto 0;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        align-items: stretch;
    }

    .plk-camera-actions .plk-camera-btn,
    .plk-camera-actions button {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 46px;
        padding: 10px 12px;
        border-radius: 14px;
        font-size: 14px;
        font-weight: 700;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
        margin: 0 !important;
    }

    /* susunan */
    #plk-start-camera {
        grid-column: 1 / 2;
        grid-row: 1;
    }

    #plk-retake-camera {
        grid-column: 2 / 3;
        grid-row: 1;
    }

    #plk-capture-camera {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    /* warna tombol */
    #plk-start-camera,
    #plk-retake-camera,
    #plk-switch-camera {
        background: #e5e7eb;
        color: #111827;
        box-shadow: none;
    }

    #plk-capture-camera {
        background: linear-gradient(135deg, #ef4444, #dc2626);
        color: #fff;
        box-shadow: 0 6px 14px rgba(220, 38, 38, 0.25);
    }

    #plk-capture-camera:disabled {
        background: #e5e7eb;
        color: #9ca3af;
        box-shadow: none;
        max-height :10px;
    }

    /* kalau tombol hidden jangan ganggu layout */
    #plk-start-camera[style*="display: none"],
    #plk-retake-camera[style*="display: none"],
    #plk-switch-camera[style*="display: none"],
    #plk-capture-camera[style*="display: none"] {
        display: none !important;
    }

    .plk-camera-box {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* =========================
   CAMERA PREVIEW STYLE - MIRIP SCREENSHOT
========================= */

/* box preview / live camera */
.plk-camera-box {
    width: 100%;
    max-width: 410px;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
    border: 1px dashed #d7dce5;
    border-radius: 28px;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plk-camera-preview,
.plk-camera-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 28px;
    background: #0f172a;
}

/* placeholder di awal */
.plk-camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,.72);
    background: linear-gradient(135deg, #09162f 0%, #0b1e46 100%);
}

/* sembunyikan preview bawah lama */
#plk-photo-result-wrap {
    display: none !important;
}

/* =========================
   BUTTONS
========================= */
.plk-camera-actions {
    width: 100%;
    max-width: 420px;
    margin: 18px auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.plk-camera-btn,
.plk-camera-actions button {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 28px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    transition: all .2s ease;
    margin: 0 !important;
    appearance: none;
    -webkit-appearance: none;
}

/* tombol abu */
#plk-start-camera,
#plk-switch-camera,
#plk-retake-camera {
    background: #e8eaef !important;
    color: #111827 !important;
    box-shadow: none !important;
}

/* tombol merah utama */
#plk-capture-camera {
    background: linear-gradient(180deg, #ff3b3b 0%, #ef2b2b 100%) !important;
    color: #fff !important;
    box-shadow: 0 14px 24px rgba(239, 43, 43, 0.22) !important;
}

/* disabled */
#plk-capture-camera:disabled {
    background: #e8eaef !important;
    color: #a0a8b8 !important;
    box-shadow: none !important;
}

/* hover desktop */
@media (hover: hover) {
    #plk-start-camera:hover,
    #plk-switch-camera:hover,
    #plk-retake-camera:hover {
        background: #dde2ea !important;
    }

    #plk-capture-camera:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 18px 30px rgba(239, 43, 43, 0.28) !important;
    }
}

/* hidden button jangan makan tempat */
#plk-start-camera[style*="display:none"],
#plk-start-camera[style*="display: none"],
#plk-switch-camera[style*="display:none"],
#plk-switch-camera[style*="display: none"],
#plk-retake-camera[style*="display:none"],
#plk-retake-camera[style*="display: none"],
#plk-capture-camera[style*="display:none"],
#plk-capture-camera[style*="display: none"] {
    display: none !important;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
    .plk-camera-box {
        max-width: 320px;
        border-radius: 24px;
    }

    .plk-camera-preview,
    .plk-camera-canvas {
        border-radius: 24px;
    }

    .plk-camera-actions {
        max-width: 320px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 16px;
    }

    .plk-camera-btn,
    .plk-camera-actions button {
        min-height: 72px;
        padding: 12px 10px;
        border-radius: 22px;
        font-size: 15px;
        font-weight: 800;
    }

    .plk-camera-placeholder {
        padding: 16px;
        font-size: 13px;
    }
}

.plk-submit-btn.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.9;
}

.plk-submit-btn.is-loading .plk-btn-text {
    opacity: 0.85;
}

.plk-submit-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: plkSpin .7s linear infinite;
    vertical-align: middle;
}

@keyframes plkSpin {
    to {
        transform: rotate(360deg);
    }
}

.plk-filter-tabs-select {
    height: 46px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 0 25px;
    font-weight: 600;
    font-size: 15px;
    color: #334155;
    cursor: pointer;
    outline: none;
}

.plk-filter-tabs-select:focus {
    border-color: #0f172a;
}

@media (max-width: 768px) {
    .plk-history-actions {
        width: 100%;
    }

    .plk-filter-tabs {
        width: 100%;
    }

    .plk-filter-tabs-select {
        width: 100%;
        height: 58px;
        border-radius: 18px;
    }
}


