:root{
  --kpm:#0b2543;
  --accent:#FFD400;
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --green:#16a34a;
  --red:#dc2626;
  --blue:#2563eb;
  --shadow:0 10px 30px rgba(11,37,67,.08);
  --radius:22px;
}

*{
  box-sizing:border-box;
  font-family:'Poppins',sans-serif;
}

html{scroll-behavior:smooth}

body{
  margin:0;
  background:
    radial-gradient(circle at top right, rgba(255,212,0,.18), transparent 20%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color:var(--text);
}

/* WRAP */
.wrap{
  width:min(1100px, calc(100% - 24px));
  margin:auto;
  padding-bottom:50px;
}

/* HERO */
.hero{
  background:linear-gradient(135deg, var(--kpm), #123864);
  color:#fff;
  border-radius:28px;
  padding:22px;
  margin-top:12px;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}

.hero::before{
  content:"";
  position:absolute;
  right:-40px;
  bottom:-40px;
  width:180px;
  height:180px;
  background:rgba(255,255,255,.08);
  border-radius:50%;
}

.hero .badge{
  background:rgba(255,255,255,.12);
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  display:inline-block;
  margin-bottom:10px;
}

.hero h1{
  margin:0;
  font-size:clamp(24px,4vw,40px);
  font-weight:800;
}

.hero h2{
  margin-top:6px;
  font-size:14px;
  color:rgba(255,255,255,.85);
}

/* COUNTDOWN */
.countdown-box{
  margin-top:15px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}

.count-item{
  background:rgba(255,255,255,.12);
  padding:10px;
  border-radius:16px;
  text-align:center;
}

.count-item .num{
  font-size:24px;
  font-weight:800;
  color:var(--accent);
}

.count-item .lbl{
  font-size:11px;
}

/* GRID */
.grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:14px;
  margin-top:16px;
}

.card{
  background:#fff;
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
}

/* STAT */
.stat{
  grid-column:span 6;
}

.stat .big{
  font-size:32px;
  font-weight:800;
  color:var(--kpm);
}

.stat small{
  color:var(--muted);
}

/* CHART */
.chart-card{
  grid-column:span 12;
}

/* BAR */
.bar-row{
  display:grid;
  grid-template-columns:80px 1fr 40px;
  gap:8px;
  align-items:center;
  margin-bottom:8px;
}

.bar-label{
  font-size:12px;
  font-weight:600;
}

.bar-track{
  height:14px;
  background:#edf2f7;
  border-radius:999px;
}

.bar-fill{
  height:100%;
  background:linear-gradient(90deg, #123864, #2563eb);
  border-radius:999px;
  transition:0.5s;
}

.bar-value{
  font-size:12px;
  font-weight:600;
  text-align:right;
}

/* SEARCH */
.search-card{
  grid-column:span 12;
}

.search-box{
  position:relative;
  margin-bottom:10px;
}

.search-box input{
  width:100%;
  padding:14px 16px 14px 44px;
  border-radius:14px;
  border:1px solid #ddd;
  font-size:14px;
}

.search-icon{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
}

/* RESULT */
.result-item{
  border:1px solid #eee;
  border-radius:14px;
  padding:10px;
  margin-bottom:8px;
}

.pname{
  font-weight:600;
}

.pill{
  display:inline-block;
  font-size:11px;
  background:#f3f4f6;
  padding:4px 8px;
  border-radius:999px;
  margin-top:4px;
}

/* STATUS */
.badge-status{
  margin-top:8px;
  padding:6px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
}

.rendah{background:#fee2e2;color:#b91c1c;}
.sederhana{background:#fef9c3;color:#92400e;}
.tinggi{background:#dcfce7;color:#166534;}

/* ================= POPUP PREMIUM ================= */

.overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.65);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:999;
}

/* CARD */
.popup{
  background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.9));
  backdrop-filter:blur(20px);
  border-radius:28px;
  padding:26px 20px;
  width:90%;
  max-width:360px;
  text-align:center;

  box-shadow:
    0 25px 70px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.6);

  border:1px solid rgba(255,255,255,0.4);

  animation:fadeUp .4s ease;
}

/* ANIMATION */
@keyframes fadeUp{
  from{
    opacity:0;
    transform:translateY(20px) scale(0.96);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* TITLE */
.popup h3{
  font-size:18px;
  font-weight:800;
  letter-spacing:0.4px;
  color:#0b2543;
}

/* SUBTITLE */
.popup p{
  margin:8px 0 14px;
  font-size:13px;
  color:#6b7280;
  line-height:1.4;
}

/* COUNTDOWN GRID */
.popup-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin:16px 0;
}

/* COUNT BOX */
.popup-box{
  background:linear-gradient(135deg,#0b2543,#2563eb);
  color:#fff;
  border-radius:14px;
  padding:10px 6px;
  box-shadow:0 8px 18px rgba(37,99,235,.3);
}

.popup-box .num{
  font-size:18px;
  font-weight:800;
}

.popup-box .lbl{
  font-size:10px;
  opacity:.85;
}

/* NOTE */
.popup-note{
  font-size:13px;
  color:#4b5563;
  line-height:1.5;
  margin-bottom:16px;
}

/* BUTTON PREMIUM */
.btn-primary{
  background:linear-gradient(135deg,#0b2543,#2563eb);
  border:none;
  border-radius:16px;
  padding:14px;
  width:100%;
  color:#fff;
  font-weight:700;
  font-size:14px;

  box-shadow:0 10px 25px rgba(37,99,235,.35);
  transition:all .25s ease;
}

.btn-primary:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 35px rgba(37,99,235,.45);
}

.popup{
  background:#fff;
  border-radius:20px;
  padding:20px;
  width:90%;
  max-width:400px;
  text-align:center;
}

.popup h3{
  margin:0;
}

.popup-note{
  margin:12px 0;
  font-size:13px;
  color:#555;
}

.btn{
  padding:12px;
  border:none;
  border-radius:12px;
  cursor:pointer;
  width:100%;
  font-weight:600;
}

.btn-primary{
  background:var(--kpm);
  color:#fff;
}

/* FLOATING */
.floating-daftar{
  position:fixed;
  bottom:18px;
  right:16px;
  z-index:999;
}

.download{
  width:40px;
  height:40px;
  border-radius:10px;
  object-fit:cover;
}

.floating-card{
  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  padding:10px;
  border-radius:18px;
  box-shadow:var(--shadow);
}

.register{
  width:50px;
  border-radius:10px;
}

.floating-btn{
  background:var(--accent);
  padding:8px 12px;
  border-radius:10px;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
  color:#000;
}

/* FOOTER */
.footer{
  text-align:center;
  font-size:12px;
  margin-top:20px;
  color:#6b7280;
}

/* EMPTY / LOADING */
.loading, .empty{
  text-align:center;
  padding:20px;
  color:#999;
}

/* MOBILE */
@media(max-width:768px){

  .stat{
    grid-column:span 12;
  }

  .hero{
    padding:18px;
  }

  .count-item .num{
    font-size:20px;
  }

}

@media(max-width:768px){

  .floating-card{
    gap:8px;
    padding:10px 12px;
    border-radius:16px;
  }

  .register{
    width:36px;
    height:36px;
  }

  .floating-text{
    flex:1;
    min-width:0;
  }

  .floating-text b{
    font-size:12px;
    line-height:1.2;
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .floating-text span{
    font-size:11px;
    display:block;
    color:#6b7280;
  }

  .floating-btn{
    padding:8px 10px;
    font-size:11px;
    border-radius:10px;
  }

}

.result-note{
  font-size:12px;
  color:#6b7280;
  margin-bottom:10px;
}

.status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  letter-spacing:0.3px;
}

/* HADIR */
.status.hadir{
  background:linear-gradient(135deg,#16a34a,#22c55e);
  color:#fff;
  box-shadow:0 4px 12px rgba(34,197,94,0.3);
}

.status.hadir::before{
  content:"✔";
  font-size:10px;
}

/* TIDAK HADIR */
.status.tidak{
  background:linear-gradient(135deg,#dc2626,#ef4444);
  color:#fff;
  box-shadow:0 4px 12px rgba(239,68,68,0.35);
}

.status.tidak::before{
  content:"✖";
  font-size:10px;
}

.floating-download{
  position:fixed;
  bottom:90px;   /* atas sikit dari DAFTAR */
  right:16px;    /* tukar dari left → right */
  z-index:999;
}

/* MOBILE FIX */
@media(max-width:768px){

  .floating-download{
    bottom:80px;
    right:12px;
  }

}

/* DOWNLOAD BUTTON */
.floating-download .floating-btn{
  background:#0b2543;
  color:#fff;
}

/* DAFTAR BUTTON */
.floating-daftar .floating-btn{
  background:#FFD400;
  color:#000;
}

.floating-download .floating-btn::before{
  content:"⬇ ";
}

