@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Playfair+Display:wght@700;900&display=swap');

*{box-sizing:border-box;margin:0;padding:0;}

:root {
  --bg: #0a1628;
  --surface: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.12);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.5);
  --faint: rgba(255,255,255,0.08);
  --blue: #1d4ed8;
  --cyan: #0ea5e9;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  overflow-x: hidden;
}

/* STARS BG */
.stars {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(37,99,235,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(16,185,129,0.10) 0%, transparent 50%),
    #0a1628;
  pointer-events: none;
}
.star {
  position: absolute; background: white; border-radius: 50%;
  animation: twinkle 3s infinite alternate;
}
@keyframes twinkle { from{opacity:.15} to{opacity:.9} }

/* SHARED */
.page { position: relative; z-index: 1; }
.hidden { display: none !important; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: .7rem 1.4rem; border-radius: 10px; border: none; cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: .9rem; font-weight: 600;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan)); color: white;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(29,78,216,.4); }
.btn-secondary {
  background: var(--faint); border: .5px solid var(--border); color: var(--muted);
}
.btn-secondary:hover { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #fca5a5; }
.btn-danger { background: rgba(239,68,68,.15); border: .5px solid rgba(239,68,68,.3); color: #fca5a5; }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-success { background: rgba(16,185,129,.15); border: .5px solid rgba(16,185,129,.3); color: #34d399; }
.btn-success:hover { background: rgba(16,185,129,.25); }
.btn-sm { padding: .35rem .85rem; font-size: .78rem; border-radius: 7px; }
.btn-full { width: 100%; }

/* INPUTS */
input, select, textarea {
  width: 100%;
  background: rgba(255,255,255,.07);
  border: .5px solid var(--border);
  border-radius: 10px;
  padding: .8rem 1rem;
  color: white;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .9rem;
  outline: none;
  transition: all .2s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(96,165,250,.6);
  background: rgba(96,165,250,.08);
  box-shadow: 0 0 0 3px rgba(96,165,250,.1);
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.25); }
select option { background: #1e2d4a; color: white; }

label {
  display: block; font-size: .75rem; font-weight: 600; color: var(--muted);
  margin-bottom: .45rem; letter-spacing: .06em; text-transform: uppercase;
}
.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* CARD */
.card {
  background: var(--surface); border: .5px solid var(--border);
  border-radius: 18px; padding: 1.8rem;
  backdrop-filter: blur(20px);
}

/* ALERTS */
.alert { border-radius: 10px; padding: .75rem 1rem; font-size: .82rem; margin-top: .8rem; }
.alert-error { background: rgba(239,68,68,.12); border: .5px solid rgba(239,68,68,.3); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,.12); border: .5px solid rgba(16,185,129,.3); color: #6ee7b7; }
.alert-info { background: rgba(96,165,250,.1); border: .5px solid rgba(96,165,250,.25); color: #93c5fd; }

/* LOGIN PAGE */
#page-login {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 2rem 1rem;
}
.school-header { text-align: center; margin-bottom: 2.5rem; animation: fadeUp .6s ease; }
.school-logo {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; margin: 0 auto 1rem;
  box-shadow: 0 0 50px rgba(29,78,216,.4);
}
.school-name {
  font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 900;
  background: linear-gradient(135deg, #60a5fa, #34d399);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.2;
}
.school-sub { font-size: .82rem; color: var(--muted); margin-top: .4rem; letter-spacing: .05em; }

.login-card { width: 100%; max-width: 430px; animation: fadeUp .7s ease; }
.login-title { font-size: 1.1rem; font-weight: 700; text-align: center; margin-bottom: .3rem; }
.login-desc { font-size: .8rem; color: var(--muted); text-align: center; margin-bottom: 2rem; }

/* RESULT PAGE */
#page-result {
  min-height: 100vh; padding: 1.5rem 1rem 4rem;
}
.result-nav {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 720px; margin: 0 auto 2rem;
}
.nav-brand { font-size: .82rem; color: var(--muted); font-weight: 600; }
.result-wrap { max-width: 720px; margin: 0 auto; animation: fadeUp .5s ease; }

.student-name { font-size: 1.25rem; font-weight: 800; margin-bottom: .25rem; }
.student-meta { font-size: .8rem; color: var(--muted); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.info-item { background: var(--faint); border-radius: 10px; padding: .75rem 1rem; }
.info-lbl { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2rem; }
.info-val { font-size: .9rem; font-weight: 700; }

/* STATUS CARD */
.status-card {
  border-radius: 20px; padding: 2.8rem 2rem;
  text-align: center; margin: 1.2rem 0; position: relative; overflow: hidden;
}
.status-card.lulus {
  background: linear-gradient(135deg, rgba(16,185,129,.15), rgba(5,150,105,.08));
  border: 1px solid rgba(16,185,129,.4);
}
.status-card.tidak-lulus {
  background: linear-gradient(135deg, rgba(239,68,68,.15), rgba(185,28,28,.08));
  border: 1px solid rgba(239,68,68,.4);
}
.status-lbl { font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; margin-bottom: .4rem; }
.status-text {
  font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 900; line-height: 1;
}
.status-sub { font-size: .85rem; color: var(--muted); margin-top: .8rem; line-height: 1.6; }

/* NILAI */
.nilai-card { margin-top: 1.2rem; }
.nilai-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 1rem; }
.nilai-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem 0; border-bottom: .5px solid rgba(255,255,255,.06); font-size: .87rem;
}
.nilai-row:last-child { border-bottom: none; }
.nilai-mata { color: rgba(255,255,255,.75); }
.badge { padding: .22rem .75rem; border-radius: 20px; font-size: .82rem; font-weight: 700; }
.badge-green { background: rgba(16,185,129,.15); color: #34d399; }
.badge-amber { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-red { background: rgba(239,68,68,.15); color: #f87171; }

/* ADMIN PAGE */
#page-admin { min-height: 100vh; padding: 1.5rem 1rem 5rem; }
.admin-wrap { max-width: 1000px; margin: 0 auto; }
.admin-nav {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.admin-brand { font-size: 1rem; font-weight: 800; }
.admin-brand span { color: var(--muted); font-weight: 400; font-size: .8rem; }
.admin-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; border-radius: 14px; border: .5px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th {
  background: rgba(255,255,255,.06); padding: .8rem 1rem;
  text-align: left; font-size: .72rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
td { padding: .75rem 1rem; font-size: .85rem; border-top: .5px solid rgba(255,255,255,.05); }
tr:hover td { background: rgba(255,255,255,.02); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .info-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .status-text { font-size: 2.2rem; }
}