/* ═══════════════════════════════════════════════════
   Laboratorium Jalan Raya – Bebas Lab App
   Design: Clean Professional Blue/White Pastel
   ═══════════════════════════════════════════════════ */

:root {
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;
  --white:    #ffffff;
  --slate-50: #f8fafc;
  --slate-100:#f1f5f9;
  --slate-200:#e2e8f0;
  --slate-400:#94a3b8;
  --slate-500:#64748b;
  --slate-600:#475569;
  --slate-700:#334155;
  --slate-800:#1e293b;
  --green-50: #f0fdf4;
  --green-100:#dcfce7;
  --green-500:#22c55e;
  --green-600:#16a34a;
  --green-700:#15803d;
  --yellow-50:#fffbeb;
  --yellow-100:#fef3c7;
  --yellow-500:#f59e0b;
  --yellow-600:#d97706;
  --red-50:   #fff5f5;
  --red-100:  #fee2e2;
  --red-500:  #ef4444;
  --red-600:  #dc2626;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 16px rgba(30,58,138,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-md: 0 8px 32px rgba(30,58,138,.12), 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg: 0 20px 60px rgba(30,58,138,.16), 0 4px 16px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--blue-50);
  color: var(--slate-700);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Header ─── */
.site-header {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  box-shadow: 0 2px 20px rgba(30,58,138,.3);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.header-text { display: flex; flex-direction: column; }
.header-title {
  font-size: 15px; font-weight: 700; color: #fff;
  line-height: 1.2; letter-spacing: -.01em;
}
.header-sub { font-size: 12px; color: var(--blue-200); font-weight: 400; }
.header-nav { display: flex; gap: 6px; }
.nav-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 8px;
  cursor: pointer; transition: all .2s;
}
.nav-btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.nav-btn.active { background: #fff; color: var(--blue-800); border-color: transparent; }

/* ─── Pages ─── */
.page { display: none; flex: 1; position: relative; padding: 48px 0; }
.page.active { display: block; }

/* ─── Hero BG ─── */
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-circle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, var(--blue-200) 0%, transparent 70%);
  opacity: .45;
}
.hero-circle.c1 { width: 600px; height: 600px; top: -200px; right: -150px; }
.hero-circle.c2 { width: 400px; height: 400px; bottom: -100px; left: -100px; opacity: .3; }
.hero-circle.c3 { width: 200px; height: 200px; top: 40%; left: 30%; opacity: .2; }

/* ─── Container ─── */
.container { max-width: 500px; margin: 0 auto; padding: 0 20px; position: relative; }
.container.wide { max-width: 1280px; }

/* ─── Cek Card ─── */
.cek-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--blue-100);
  text-align: center;
  animation: slideUp .4s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cek-icon { margin: 0 auto 20px; }
.cek-title {
  font-size: 26px; font-weight: 800; color: var(--blue-900);
  letter-spacing: -.02em; margin-bottom: 10px;
}
.cek-desc { font-size: 14px; color: var(--slate-500); margin-bottom: 28px; line-height: 1.6; }
.cek-note { font-size: 12px; color: var(--slate-400); margin-top: 16px; }

/* ─── Input Group ─── */
.input-group { text-align: left; margin-bottom: 20px; }
.input-label { font-size: 13px; font-weight: 600; color: var(--slate-600); display: block; margin-bottom: 8px; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.npm-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 2px solid var(--blue-100);
  border-radius: var(--radius);
  font-family: inherit; font-size: 15px; font-weight: 500;
  color: var(--slate-800);
  background: var(--blue-50);
  transition: all .2s; outline: none;
}
.npm-input:focus {
  border-color: var(--blue-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-800) 100%);
  color: #fff; font-family: inherit; font-size: 14px; font-weight: 700;
  padding: 13px 24px; border-radius: var(--radius); border: none;
  cursor: pointer; transition: all .2s; letter-spacing: .01em;
  box-shadow: 0 4px 14px rgba(37,99,235,.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--slate-600);
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--radius);
  border: 1.5px solid var(--slate-200); cursor: pointer; transition: all .2s;
}
.btn-ghost:hover { background: var(--slate-100); color: var(--slate-800); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-50); color: var(--blue-700);
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--radius);
  border: 1.5px solid var(--blue-200); cursor: pointer; transition: all .2s;
}
.btn-secondary:hover { background: var(--blue-100); }

.error-msg {
  background: var(--red-50); color: var(--red-600);
  border: 1px solid var(--red-100); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13px; font-weight: 500; margin-bottom: 14px;
  text-align: left;
}

/* ─── Admin Dashboard ─── */
.admin-topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 28px; padding-top: 8px;
}
.admin-title { font-size: 24px; font-weight: 800; color: var(--blue-900); letter-spacing: -.02em; }
.admin-sub { font-size: 14px; color: var(--slate-500); margin-top: 4px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 20px 24px; box-shadow: var(--shadow);
  border-left: 4px solid var(--blue-500);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card.green  { border-left-color: var(--green-500); }
.stat-card.yellow { border-left-color: var(--yellow-500); }
.stat-num { display: block; font-size: 32px; font-weight: 800; color: var(--blue-900); line-height: 1; }
.stat-card.green  .stat-num { color: var(--green-700); }
.stat-card.yellow .stat-num { color: var(--yellow-600); }
.stat-label { display: block; font-size: 12px; font-weight: 600; color: var(--slate-500); margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; }

/* Admin Grid */
.admin-grid { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }

/* Card */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--blue-100);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 24px; border-bottom: 1px solid var(--slate-100);
  background: var(--blue-50);
}
.card-title { font-size: 15px; font-weight: 700; color: var(--blue-900); }

/* Form */
.form-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--slate-600); }
.field-input {
  padding: 10px 14px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; color: var(--slate-800);
  background: var(--slate-50); transition: all .2s; outline: none;
}
.field-input:focus { border-color: var(--blue-500); background: var(--white); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }

/* Checkbox */
.checkbox-group { display: flex; flex-direction: column; gap: 10px; }
.checkbox-item { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; }
.cb { display: none; }
.cb-box {
  width: 18px; height: 18px; border: 2px solid var(--slate-300);
  border-radius: 4px; flex-shrink: 0; margin-top: 1px;
  background: var(--white); transition: all .2s; position: relative;
}
.cb:checked + .cb-box {
  background: var(--blue-600); border-color: var(--blue-600);
}
.cb:checked + .cb-box::after {
  content: '';
  position: absolute; left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg);
}
.cb-text { font-size: 13px; color: var(--slate-600); line-height: 1.5; }

.form-actions { display: flex; gap: 10px; }
.divider { border: none; border-top: 1px solid var(--slate-100); }

/* Import */
.import-section { display: flex; flex-direction: column; gap: 10px; }
.import-label { font-size: 12px; font-weight: 600; color: var(--slate-500); text-transform: uppercase; letter-spacing: .05em; }
.import-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.import-hint { font-size: 12px; color: var(--slate-400); }
.import-status { font-size: 13px; padding: 8px 12px; border-radius: var(--radius-sm); }
.import-status.success { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
.import-status.error   { background: var(--red-50); color: var(--red-600); border: 1px solid var(--red-100); }

/* Search */
.search-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--slate-100);
}
.search-input {
  flex: 1; border: none; outline: none;
  font-family: inherit; font-size: 14px; color: var(--slate-700);
  background: transparent;
}
.search-input::placeholder { color: var(--slate-400); }

/* Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead { background: var(--blue-50); }
.data-table th {
  padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 700;
  color: var(--slate-500); text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap; border-bottom: 1px solid var(--slate-200);
}
.th-center { text-align: center; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--slate-100); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--blue-50); }
.data-table tbody tr:last-child td { border-bottom: none; }
.empty-row { text-align: center; color: var(--slate-400); padding: 40px 0; font-size: 14px; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.badge-green  { background: var(--green-100); color: var(--green-700); }
.badge-yellow { background: var(--yellow-100); color: var(--yellow-600); }

/* Check icons in table */
.icon-check { color: var(--green-600); text-align: center; display: block; }
.icon-x     { color: var(--red-500); text-align: center; display: block; }

/* Action buttons in table */
.action-btns { display: flex; gap: 6px; justify-content: center; }
.btn-edit {
  background: var(--blue-50); color: var(--blue-700);
  border: 1px solid var(--blue-200); border-radius: 6px;
  padding: 5px 10px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.btn-edit:hover { background: var(--blue-100); }
.btn-del {
  background: var(--red-50); color: var(--red-600);
  border: 1px solid var(--red-100); border-radius: 6px;
  padding: 5px 10px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.btn-del:hover { background: var(--red-100); }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white); border-radius: var(--radius-xl);
  padding: 40px 36px; max-width: 440px; width: 90%;
  box-shadow: var(--shadow-lg); position: relative;
  transform: scale(.92) translateY(16px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  text-align: center;
}
.modal-overlay.show .modal-box { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: var(--slate-400); line-height: 1;
}
.modal-close:hover { color: var(--slate-700); }

/* Modal content types */
.modal-icon { font-size: 56px; margin-bottom: 16px; }
.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 12px; letter-spacing: -.02em; }
.modal-npm { font-size: 13px; color: var(--slate-500); margin-bottom: 6px; }
.modal-name { font-size: 16px; font-weight: 700; color: var(--slate-800); margin-bottom: 20px; }
.modal-list { text-align: left; display: flex; flex-direction: column; gap: 8px; }
.modal-list-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; padding: 10px 14px;
  border-radius: var(--radius-sm); line-height: 1.5;
}
.modal-list-item.ok  { background: var(--green-50); color: var(--green-700); }
.modal-list-item.bad { background: var(--red-50); color: var(--red-600); }

/* Success / Not found modals */
.modal-success .modal-title { color: var(--green-700); }
.modal-warning .modal-title { color: var(--yellow-600); }
.modal-notfound .modal-title { color: var(--slate-600); }

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--slate-800); color: #fff;
  padding: 12px 24px; border-radius: 100px;
  font-size: 14px; font-weight: 500;
  opacity: 0; transition: all .3s; z-index: 9999; pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Footer ─── */
.site-footer {
  background: var(--blue-900); color: rgba(255,255,255,.5);
  text-align: center; padding: 18px; font-size: 12px;
  margin-top: auto;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-title { font-size: 13px; }
  .header-sub   { font-size: 11px; }
  .cek-card { padding: 32px 24px; }
  .cek-title { font-size: 22px; }
  .stats-grid { grid-template-columns: 1fr; }
  .admin-topbar { flex-direction: column; gap: 14px; align-items: flex-start; }
  .container.wide { padding: 0 16px; }
  .page { padding: 28px 0; }
  .nav-btn { font-size: 12px; padding: 6px 12px; }
}
