/* basic reset */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f9;
  color: #111827;
}

/* layout center */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
  padding: 26px;
}

/* logo + title */
.brand {
  text-align: center;
  margin-bottom: 18px;
}
.brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  display: inline-block;
  margin-bottom: 10px;
}
.brand h1 {
  font-size: 20px;
  margin: 0;
  font-weight: 700;
}
.brand p {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 13px;
}

/* form */
.form-group { margin: 14px 0; }
label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #374151;
}
input[type="text"], input[type="password"] {
  width: 100%;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
  transition: .15s;
}
input[type="text"]:focus, input[type="password"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.btn {
  width: 100%;
  border: none;
  background: #2563eb;
  color: white;
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  margin-top: 8px;
}
.btn:hover { filter: brightness(0.95); }

.alert {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}
.footer-note {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: #6b7280;
}

/* ===== ADMIN LAYOUT ===== */
.admin-shell{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:260px;
  background:#0f172a;
  color:#e5e7eb;
  padding:18px 14px;
}

.brand-admin{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:12px;
}
.brand-admin img{
  width:38px;
  height:38px;
  object-fit:contain;
  background:rgba(255,255,255,.08);
  border-radius:10px;
  padding:4px;
}
.brand-admin .title{
  font-weight:800;
  font-size:14px;
  line-height:1.1;
}
.brand-admin .subtitle{
  font-size:12px;
  color:#94a3b8;
}

.nav{
  margin-top:10px;
}
.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:10px;
  color:#e5e7eb;
  text-decoration:none;
  font-size:14px;
}
.nav a:hover{
  background:rgba(255,255,255,.08);
}
.nav .active{
  background:rgba(37,99,235,.25);
  border:1px solid rgba(37,99,235,.35);
}

.main{
  flex:1;
  background:#f4f6f9;
}

.topbar{
  height:60px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px;
  border-bottom:1px solid #e5e7eb;
}

.content{
  padding:18px;
}

.badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  background:#e5e7eb;
}

.btn-link{
  text-decoration:none;
  color:#2563eb;
  font-weight:700;
}

.grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:14px;
}
@media (max-width: 1000px){
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sidebar{ width:230px; }
}
@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
  .sidebar{ display:none; } /* nanti bisa buat toggle */
}

.card{
  background:#fff;
  border-radius:14px;
  padding:16px;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  border:1px solid #eef2f7;
}
.card h3{
  margin:0 0 8px;
  font-size:14px;
  color:#374151;
}
.card .num{
  font-size:26px;
  font-weight:800;
}
.small{
  font-size:12px;
  color:#6b7280;
}

/* ===== TABLE & BUTTONS ===== */
.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.btn{
  display:inline-block;
  width:auto;              /* <-- penting: jangan full */
  padding:10px 12px;
  border-radius:10px;
  text-decoration:none;
  font-weight:700;
  border:1px solid transparent;
  cursor:pointer;
}

.btn-primary{ background:#2563eb; color:#fff; }
.btn-primary:hover{ filter:brightness(.95); }

.btn-secondary{ background:#fff; color:#111827; border-color:#d1d5db; }
.btn-secondary:hover{ background:#f3f4f6; }

.btn-danger{ background:#dc2626; color:#fff; }
.btn-danger:hover{ filter:brightness(.95); }

.btn-sm{ padding:6px 10px; border-radius:9px; font-size:13px; font-weight:700; }

.table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  border:1px solid #eef2f7;
}

.table th, .table td{
  padding:12px 12px;
  border-bottom:1px solid #eef2f7;
  text-align:left;
  font-size:14px;
}

.table th{
  background:#f8fafc;
  color:#374151;
  font-weight:800;
  font-size:13px;
  letter-spacing:.2px;
}

.table tr:hover td{
  background:#fafafa;
}

.actions{
  display:flex;
  gap:8px;
}

.form-card{
  max-width:640px;
  background:#fff;
  border-radius:14px;
  padding:16px;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  border:1px solid #eef2f7;
}

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 700px){
  .row{ grid-template-columns: 1fr; }
}

input, select, textarea{
  width:100%;
  border:1px solid #d1d5db;
  padding:10px 12px;
  border-radius:10px;
  outline:none;
}
input:focus, select:focus, textarea:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

.flash{
  background:#dcfce7;
  color:#166534;
  border:1px solid #bbf7d0;
  padding:10px 12px;
  border-radius:10px;
  margin-bottom:12px;
  font-size:13px;
}
.flash-error{
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fecaca;
}

.badge{padding:4px 8px;border-radius:999px;font-weight:800;font-size:12px;margin-left:8px;}
.badge-ok{background:#eafff0;border:1px solid #b7f7c9;}
.badge-warn{background:#fff7e6;border:1px solid #ffd38a;}

/* =========================
   SISWA DASHBOARD (scoped)
   ========================= */
.siswa-page{
  background:#f6f7fb;
  min-height: 100vh;
}

.siswa-wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 18px 40px;
}

.siswa-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom: 14px;
}

.siswa-title{
  margin:0;
  font-size: 30px;
  letter-spacing: -.4px;
}

.siswa-subtitle{
  margin-top:6px;
  font-size: 13px;
  color:#64748b;
}

.siswa-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  white-space: nowrap;
}

.siswa-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
}

.siswa-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #0f172a;
  text-decoration:none;
  font-weight: 600;
  font-size: 13px;
  cursor:pointer;
  transition: .15s ease;
}
.siswa-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15,23,42,.07);
}
.siswa-btn-danger{
  border-color: rgba(239,68,68,.25);
  color: #ef4444;
  background: rgba(239,68,68,.06);
}

.siswa-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin: 14px 0 16px;
}

.siswa-card{
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  padding: 16px;
}

.siswa-card h3{
  margin:0 0 10px;
  font-size: 16px;
  color: #0f172a;
}

.siswa-kv{
  display:flex;
  flex-direction:column;
  gap:6px;
  color: #64748b;
  font-size: 13px;
}
.siswa-kv b{ color:#0f172a; }

.siswa-col-4{ grid-column: span 4; }
.siswa-col-6{ grid-column: span 6; }
.siswa-col-12{ grid-column: span 12; }

@media (max-width: 980px){
  .siswa-col-4{ grid-column: span 12; }
  .siswa-col-6{ grid-column: span 12; }
  .siswa-header{ flex-direction:column; }
  .siswa-actions{ justify-content:flex-start; }
}

.siswa-stat{
  display:flex;
  gap:14px;
  align-items:center;
  margin-top: 6px;
}

.siswa-score{
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.siswa-progress{
  width: 100%;
  height: 10px;
  background: #eef2ff;
  border-radius: 999px;
  overflow:hidden;
  border: 1px solid #e5e7eb;
}
.siswa-progress > div{
  height:100%;
  width: 0%;
  background: #2563eb;
  border-radius: 999px;
}

.siswa-section-title{
  margin: 18px 0 10px;
  font-size: 16px;
  color: #0f172a;
}

/* Table */
.siswa-table-wrap{
  overflow:auto;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background:#fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.siswa-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
}

.siswa-table thead th{
  position: sticky;
  top: 0;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
  font-size: 12px;
  padding: 12px 12px;
  text-align:left;
}

.siswa-table tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  font-size: 13px;
}

.siswa-table tbody tr:hover{
  background: #fafafa;
}

.siswa-pill{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border:1px solid #e5e7eb;
  color: #64748b;
  background:#fff;
}
.siswa-pill-benefit{ background: rgba(22,163,74,.08); border-color: rgba(22,163,74,.18); color: #166534; }
.siswa-pill-cost{ background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.18); color: #991b1b; }

.siswa-rank{
  font-weight: 800;
  width: 70px;
}

.siswa-row-me{
  background: #eff6ff !important;
}

