* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  color: #222;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; }
.login-wrap { max-width: 420px; margin: 4rem auto; background: #fff; border-radius: 16px; padding: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
h1 { color: #1a1a2e; margin: 0 0 .25rem; }
.sub { color: #666; margin: 0 0 1.5rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; color: #1a1a2e; font-size: .9rem; }
.field input, .field select { width: 100%; padding: .55rem .7rem; border: 1px solid #ccc; border-radius: 8px; font-size: .95rem; }
.btn { padding: .6rem 1.1rem; border: none; border-radius: 8px; background: #eee; cursor: pointer; font-size: .9rem; font-weight: 600; }
.btn.primary { background: #4f46e5; color: #fff; }
.btn:hover { opacity: .9; }
.status { min-height: 1.4rem; color: #b91c1c; font-size: .9rem; margin-top: .5rem; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.topbar h1 { font-size: 1.4rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.stat-card { background: #fff; border-radius: 12px; padding: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); text-align: center; }
.stat-card .num { font-size: 1.6rem; font-weight: 800; color: #4f46e5; }
.stat-card .label { font-size: .78rem; color: #666; margin-top: .2rem; }

.progress-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.progress-card { background: #fff; border-radius: 12px; padding: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.progress-card h4 { margin: 0 0 .5rem; color: #1a1a2e; }
.progress-card .bar-track { width: 100%; height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: .4rem 0; }
.progress-card .bar-fill { height: 100%; background: linear-gradient(90deg,#4f46e5,#7c3aed); }
.progress-card .meta { font-size: .78rem; color: #666; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff; }
.badge.berjalan { background: #f59e0b; }
.badge.selesai { background: #22c55e; }
.badge.gagal { background: #ef4444; }

.card { background: #fff; border-radius: 12px; padding: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 1.5rem; }
.filter-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-row input, .filter-row select { padding: .5rem .6rem; border: 1px solid #ccc; border-radius: 8px; font-size: .88rem; }
.filter-row input[type=text] { flex: 1; min-width: 200px; }

table { width: 100%; border-collapse: collapse; font-size: .85rem; }
thead th { text-align: left; background: #f8fafc; padding: .6rem .5rem; border-bottom: 2px solid #e2e8f0; }
tbody td { padding: .55rem .5rem; border-bottom: 1px solid #f0f2f5; vertical-align: top; }
tbody tr:hover { background: #f8fafc; cursor: pointer; }
.status-berlaku { color: #15803d; font-weight: 700; }
.status-lain { color: #b91c1c; font-weight: 700; }

.pagination { display: flex; gap: .4rem; align-items: center; justify-content: center; margin-top: 1rem; font-size: .85rem; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.55); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { width: 92vw; max-width: 700px; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 14px; padding: 1.5rem; position: relative; }
.modal-close { position: absolute; top: .6rem; right: .8rem; border: none; background: transparent; font-size: 1.4rem; cursor: pointer; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: .6rem; margin: 1rem 0; }
.detail-item strong { display: block; font-size: .72rem; color: #888; text-transform: uppercase; letter-spacing: .03em; }
.detail-item span { font-size: .92rem; color: #1a1a2e; }
.relasi-block { margin-top: .5rem; }
.relasi-block h5 { margin: .8rem 0 .3rem; color: #4f46e5; }
.relasi-block ul { margin: 0; padding-left: 1.2rem; font-size: .85rem; }
