@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root{
  --kpm:#0b2543;
  --kpm-2:#133c6b;
  --accent:#FFD400;
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --soft:#eef4ff;
  --danger:#dc2626;
  --shadow:0 10px 30px rgba(11,37,67,.10);
  --shadow-strong:0 18px 50px rgba(0,0,0,.22);
  --radius:18px;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html{
  scroll-behavior:smooth;
}

body{
  font-family:'Poppins',sans-serif;
  background:linear-gradient(180deg,#f8faff 0%, #f3f6fb 100%);
  color:var(--text);
}

/* LOGIN */
.login-overlay{
  position:fixed;
  inset:0;
  background:rgba(11,37,67,.70);
  backdrop-filter:blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:9999;
}

.login-card{
  width:100%;
  max-width:400px;
  background:#fff;
  border-radius:22px;
  padding:30px 24px;
  box-shadow:var(--shadow-strong);
  text-align:center;
  animation:fadeUp .35s ease;
}

.login-logo{
  width:68px;
  height:68px;
  border-radius:50%;
  background:var(--kpm);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 16px;
  font-weight:700;
  font-size:20px;
  letter-spacing:.5px;
}

.login-title{
  font-size:22px;
  font-weight:700;
  color:var(--kpm);
  line-height:1.25;
}

.login-subtitle{
  margin-top:6px;
  font-size:13px;
  color:var(--muted);
}

.login-input{
  width:100%;
  margin-top:18px;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  font-family:'Poppins',sans-serif;
  font-size:15px;
  outline:none;
  transition:.2s ease;
}

.login-input:focus{
  border-color:var(--kpm);
  box-shadow:0 0 0 4px rgba(11,37,67,.08);
}

.login-btn{
  width:100%;
  margin-top:14px;
  padding:13px 14px;
  border:none;
  border-radius:12px;
  background:var(--kpm);
  color:#fff;
  font-family:'Poppins',sans-serif;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  transition:.2s ease;
}

.login-btn:hover{
  background:#071a30;
  transform:translateY(-1px);
}

.error-msg{
  display:none;
  margin-top:12px;
  font-size:14px;
  color:var(--danger);
}

.shake{
  animation:shake .28s linear;
}

/* PAGE */
.page{
  min-height:100vh;
}

.hero{
  background:linear-gradient(135deg,var(--kpm) 0%, var(--kpm-2) 100%);
  color:#fff;
  padding:34px 20px 86px;
  text-align:center;
  box-shadow:0 8px 24px rgba(11,37,67,.12);
}

.hero-badge{
  display:inline-block;
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  margin-bottom:12px;
}

.hero h1{
  font-size:30px;
  line-height:1.2;
  font-weight:700;
}

.hero p{
  margin-top:8px;
  font-size:14px;
  opacity:.92;
}

.container{
  width:min(1100px, calc(100% - 24px));
  margin:-54px auto 0;
  padding-bottom:28px;
}

.search-card,
.detail-box{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:1px solid rgba(11,37,67,.05);
}

.search-card{
  padding:22px;
}

.search-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.search-top h2{
  font-size:22px;
  color:var(--kpm);
  margin-bottom:4px;
}

.muted{
  color:var(--muted);
  font-size:13px;
}

.data-pill{
  background:var(--soft);
  color:var(--kpm);
  border:1px solid #d9e6ff;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}

.search-wrap{
  display:grid;
  grid-template-columns:1fr 110px;
  gap:10px;
}

.search-wrap input{
  width:100%;
  padding:14px 15px;
  border:1px solid var(--line);
  border-radius:12px;
  font-family:'Poppins',sans-serif;
  font-size:15px;
  outline:none;
  transition:.2s ease;
}

.search-wrap input:focus{
  border-color:var(--kpm);
  box-shadow:0 0 0 4px rgba(11,37,67,.08);
}

.search-wrap button{
  border:none;
  border-radius:12px;
  background:#eef2f7;
  color:var(--kpm);
  font-family:'Poppins',sans-serif;
  font-weight:600;
  cursor:pointer;
  transition:.2s ease;
}

.search-wrap button:hover{
  background:#e2e8f0;
}

.result-info{
  margin-top:12px;
  font-size:13px;
  color:var(--muted);
  min-height:20px;
}

.result-list{
  margin-top:10px;
  display:grid;
  gap:10px;
}

.result-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 14px;
  border:1px solid #e8edf6;
  background:#f8fbff;
  border-radius:14px;
  transition:.2s ease;
}

.result-item:hover{
  background:#edf5ff;
  border-color:#d8e6fb;
}

.result-main{
  min-width:0;
}

.result-name{
  font-size:15px;
  font-weight:600;
  color:var(--text);
  word-break:break-word;
}

.result-class{
  margin-top:3px;
  font-size:12px;
  color:var(--muted);
}

.result-item button{
  flex-shrink:0;
  border:none;
  border-radius:10px;
  padding:9px 14px;
  background:var(--kpm);
  color:#fff;
  font-family:'Poppins',sans-serif;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:.2s ease;
}

.result-item button:hover{
  background:#071a30;
}

.detail-box{
  margin-top:16px;
  padding:22px;
}

.detail-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
  border-bottom:1px solid var(--line);
  padding-bottom:12px;
}

.detail-head h3{
  color:var(--kpm);
  font-size:22px;
}

.detail-tag{
  background:#ecfdf5;
  color:#047857;
  border:1px solid #cceedd;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
}

.detail-table{
  width:100%;
  border-collapse:collapse;
}

.detail-table td{
  padding:11px 8px;
  border-bottom:1px solid #f0f2f6;
  font-size:14px;
  vertical-align:top;
}

.detail-table tr:last-child td{
  border-bottom:none;
}

.detail-table td:first-child{
  width:210px;
  color:var(--kpm);
  font-weight:600;
}

.wa-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:6px;
}

.wa-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  text-decoration:none;
  border-radius:999px;
  padding:8px 11px;
  font-size:12px;
  font-weight:600;
  background:#ecfdf5;
  color:#047857;
  border:1px solid #cceedd;
}

.wa-btn:hover{
  filter:brightness(.98);
}

.empty-state,
.loading-state,
.error-state{
  padding:14px;
  border-radius:12px;
  font-size:14px;
}

.loading-state{
  background:#fff7ed;
  color:#9a3412;
  border:1px solid #fed7aa;
}

.empty-state{
  background:#f8fafc;
  color:#475569;
  border:1px solid #e2e8f0;
}

.error-state{
  background:#fef2f2;
  color:#b91c1c;
  border:1px solid #fecaca;
}

.footer{
  text-align:center;
  color:#6b7280;
  font-size:12px;
  padding:22px 10px 30px;
}

/* RESPONSIVE */
@media (max-width: 768px){
  .hero{
    padding:28px 16px 78px;
  }

  .hero h1{
    font-size:24px;
  }

  .container{
    width:min(100% - 16px, 1000px);
    margin:-48px auto 0;
  }

  .search-card,
  .detail-box{
    padding:16px;
    border-radius:16px;
  }

  .search-top{
    flex-direction:column;
    align-items:flex-start;
  }

  .search-wrap{
    grid-template-columns:1fr;
  }

  .result-item{
    align-items:flex-start;
    flex-direction:column;
  }

  .result-item button{
    width:100%;
  }

  .detail-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .detail-table,
  .detail-table tbody,
  .detail-table tr,
  .detail-table td{
    display:block;
    width:100%;
  }

  .detail-table tr{
    padding:8px 0;
    border-bottom:1px solid #f0f2f6;
  }

  .detail-table td{
    border:none;
    padding:4px 0;
  }

  .detail-table td:first-child{
    width:100%;
    margin-bottom:2px;
  }

  .login-card{
    padding:26px 18px;
    border-radius:18px;
  }

  .login-title{
    font-size:20px;
  }
}

@keyframes fadeUp{
  from{
    opacity:0;
    transform:translateY(10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes shake{
  0%,100%{transform:translateX(0);}
  25%{transform:translateX(-6px);}
  50%{transform:translateX(6px);}
  75%{transform:translateX(-4px);}
}