/* Voting OSIS — palette dari video referensi (sky / pink / blue / gold / green) */

:root {
  --sky-top: #9fd8ff;
  --sky-mid: #c8ecff;
  --hill: #6fbf4a;
  --hill-deep: #4a9a2e;
  --pink: #ff8fb0;
  --pink-deep: #f45c8a;
  --blue: #5ec4ff;
  --blue-deep: #2a9adf;
  --gold: #ffd24a;
  --gold-deep: #f0a820;
  --ink: #1f3a4d;
  --ink-soft: #3d5a6c;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --shadow: 0 18px 40px rgba(30, 80, 120, 0.18);
  --radius: 28px;
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, #e8f8d8 72%, var(--hill) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 70%),
    url("../img/bg.jpg") center top / cover no-repeat;
  opacity: 0.35;
  mix-blend-mode: soft-light;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85), rgba(140, 210, 255, 0.25));
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5);
  animation: float 12s ease-in-out infinite;
}

.b1 { width: 90px; height: 90px; left: 8%; top: 18%; animation-delay: 0s; }
.b2 { width: 54px; height: 54px; right: 12%; top: 28%; animation-delay: -3s; }
.b3 { width: 120px; height: 120px; left: 18%; bottom: 12%; animation-delay: -6s; opacity: 0.7; }
.b4 { width: 40px; height: 40px; right: 22%; bottom: 22%; animation-delay: -2s; }

.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.8);
  animation: twinkle 3.5s ease-in-out infinite;
}

.s1 { top: 22%; left: 42%; }
.s2 { top: 35%; right: 30%; animation-delay: -1.2s; }
.s3 { bottom: 30%; left: 55%; animation-delay: -2.1s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.04); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 12px 28px rgba(244, 92, 138, 0.35); }
  50% { transform: scale(1.03); box-shadow: 0 16px 36px rgba(244, 92, 138, 0.5); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: rise 0.55s ease-out both;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.1;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.logo-ardraxis {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}

.logo-ardraxis:hover {
  transform: rotate(-6deg) scale(1.05);
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #1f3a4d, #2a9adf);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(31, 58, 77, 0.25);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.header-admin-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(31, 58, 77, 0.35);
}

.header-admin-btn.active {
  background: linear-gradient(135deg, #6fbf4a, #4a9a2e);
}

.header-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease;
}

.header-logout-btn:hover {
  background: #fff;
  transform: scale(1.08);
}

/* Modal Login Admin Dialog */
.admin-modal-dialog {
  border: none;
  border-radius: 32px;
  padding: 0;
  background: transparent;
  max-width: 480px;
  width: calc(100% - 2rem);
  box-shadow: 0 25px 60px rgba(15, 40, 70, 0.35);
}

.admin-modal-dialog::backdrop {
  background: rgba(15, 30, 48, 0.6);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease-out;
}

.admin-modal-box {
  position: relative;
  margin: 0;
  padding: 2.25rem clamp(1.25rem, 4vw, 2.25rem);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  border: 2.5px solid rgba(255, 255, 255, 0.98);
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(31, 58, 77, 0.15);
  background: rgba(255, 255, 255, 0.8);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
  z-index: 10;
}

.admin-modal-close:hover {
  background: #fff;
  color: var(--pink-deep);
  border-color: var(--pink-deep);
  transform: rotate(90deg) scale(1.05);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Layout */
.page {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
}

.panel {
  background: var(--glass-strong);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

.panel.narrow {
  max-width: 520px;
  margin-inline: auto;
}

.center-text {
  text-align: center;
}

.panel-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  margin: 0.35rem 0 0.5rem;
  color: var(--ink);
}

.panel-desc {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.back-link {
  display: inline-block;
  color: var(--blue-deep);
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* Home hero */
.page-home {
  min-height: calc(100vh - 88px);
  display: grid;
  align-items: center;
}

.hero {
  text-align: center;
  padding: 1rem 0 2rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.title-bubble {
  margin: 0;
  display: grid;
  gap: 0.15rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 8vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.t-gold,
.t-pink {
  -webkit-text-stroke: 3px #fff;
  paint-order: stroke fill;
  text-shadow: 0 8px 0 rgba(255, 255, 255, 0.35), 0 12px 24px rgba(40, 90, 130, 0.2);
}

.t-gold {
  color: var(--gold-deep);
  background: linear-gradient(180deg, #ffe9a0, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 4px #fff;
  filter: drop-shadow(0 4px 0 #fff);
}

.t-pink {
  color: var(--pink-deep);
  background: linear-gradient(180deg, #ffc0d4, var(--pink-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 4px #fff;
  filter: drop-shadow(0 4px 0 #fff);
}

.lead {
  max-width: 34rem;
  margin: 1rem auto 1.5rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 600;
}

.hero-candidates {
  display: flex;
  justify-content: center;
  gap: clamp(0.6rem, 3vw, 1.4rem);
  margin: 0 0 1.75rem;
}

.mini-bubble {
  position: relative;
  width: clamp(78px, 18vw, 110px);
  height: clamp(78px, 18vw, 110px);
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(130, 200, 255, 0.55));
  box-shadow: 0 10px 24px rgba(40, 100, 150, 0.22);
  animation: float 7s ease-in-out infinite;
}

.mini-bubble:nth-child(2) { animation-delay: -1.5s; }
.mini-bubble:nth-child(3) { animation-delay: -3s; }

.mini-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.mini-bubble span {
  position: absolute;
  left: -6px;
  top: -4px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  opacity: 0.85;
}

.theme-pink span { color: var(--pink-deep); }
.theme-blue span { color: var(--blue-deep); }
.theme-gold span { color: var(--gold-deep); }

/* Buttons */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.95rem 1.6rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-cta {
  color: #fff;
  background: linear-gradient(180deg, #ff9ab8, var(--pink-deep));
  box-shadow: 0 12px 28px rgba(244, 92, 138, 0.35);
  font-size: clamp(1.05rem, 3.5vw, 1.35rem);
  padding: 1.1rem 1.8rem;
  border: 3px solid #fff;
}

.btn-cta:hover {
  transform: translateY(-2px);
}

.btn-cta.pulse {
  animation: pulse 2.4s ease-in-out infinite;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  box-shadow: 0 10px 22px rgba(42, 154, 223, 0.3);
  border: 2px solid #fff;
  width: 100%;
  margin-top: 1rem;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

/* Choice cards */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  display: grid;
  gap: 0.35rem;
  place-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  padding: 1.4rem 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(40, 90, 130, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.choice-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 32px rgba(40, 90, 130, 0.18);
}

.choice-card strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.choice-card span:last-child {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.choice-card .big-num {
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1;
}

.choice-card.theme-pink { border-color: rgba(255, 143, 176, 0.7); }
.choice-card.theme-blue { border-color: rgba(94, 196, 255, 0.8); }
.choice-card.theme-gold { border-color: rgba(255, 210, 74, 0.85); }

.choice-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin-bottom: 0.25rem;
  background: linear-gradient(145deg, #fff, #dff2ff);
  position: relative;
}

.icon-siswa::before,
.icon-guru::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: var(--blue-deep);
}

.icon-siswa::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 22px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 10px 10px 2px 2px;
  background: var(--blue);
}

.icon-guru {
  background: linear-gradient(145deg, #fff, #ffe9a8);
}

.icon-guru::before {
  background: var(--gold-deep);
  inset: 16px 14px 12px;
  border-radius: 8px;
}

/* Class / teacher chips */
.class-grid,
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.7rem;
  max-height: 52vh;
  overflow: auto;
  padding: 0.25rem;
}

.class-chip {
  cursor: pointer;
}

.class-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.class-chip span,
.teacher-chip {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.class-chip input:checked + span,
.class-chip span:hover,
.teacher-chip:hover {
  border-color: var(--blue);
  background: #fff;
  transform: translateY(-1px);
}

.teacher-chip {
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.search-bar {
  margin-bottom: 1rem;
}

.search-bar input,
.field input {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}

.search-bar input:focus,
.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(94, 196, 255, 0.25);
}

.verify-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  font-weight: 800;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.field input {
  font-weight: 700;
  color: var(--ink);
}

/* Vote candidates — glass bubbles */
.candidate-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
  align-items: end;
}

.candidate-bubble {
  position: relative;
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  padding: 0.5rem;
  font: inherit;
  color: inherit;
  transition: transform 0.2s ease;
}

.candidate-bubble:hover {
  transform: translateY(-8px);
}

.candidate-bubble:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 4px;
  border-radius: 20px;
}

.cand-num {
  position: absolute;
  top: -0.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  opacity: 0.28;
  pointer-events: none;
}

.theme-pink .cand-num { color: var(--pink-deep); }
.theme-blue .cand-num { color: var(--blue-deep); }
.theme-gold .cand-num { color: var(--gold-deep); }

.cand-glass {
  position: relative;
  z-index: 1;
  width: min(100%, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(120, 195, 255, 0.45));
  box-shadow:
    0 16px 36px rgba(40, 100, 150, 0.22),
    inset 0 0 24px rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.cand-glass::after {
  content: "";
  position: absolute;
  inset: 14% 18% auto;
  height: 22%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent);
  pointer-events: none;
}

.cand-glass img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
}

.cand-name {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  text-align: center;
  line-height: 1.25;
  max-width: 14ch;
  -webkit-text-stroke: 2px #fff;
  paint-order: stroke fill;
}

.theme-pink .cand-name { color: var(--pink-deep); }
.theme-blue .cand-name { color: var(--blue-deep); }
.theme-gold .cand-name { color: var(--gold-deep); }

/* Dialog / status */
.confirm-dialog {
  border: none;
  border-radius: 24px;
  padding: 0;
  background: transparent;
  max-width: 420px;
  width: calc(100% - 2rem);
}

.confirm-dialog::backdrop {
  background: rgba(30, 70, 100, 0.45);
  backdrop-filter: blur(4px);
}

.confirm-box {
  margin: 0;
  padding: 1.5rem;
  background: var(--glass-strong);
  border-radius: 24px;
  border: 2px solid #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.confirm-box h2 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.confirm-actions .btn {
  width: 100%;
  margin: 0;
}

.status-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  border: 3px solid #fff;
}

.status-icon.ok {
  background: linear-gradient(180deg, #8be06a, var(--hill-deep));
}

.status-icon.warn {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
}

.soft-note {
  color: var(--ink-soft);
  font-weight: 600;
  margin: 0 0 1.25rem;
}

/* Flash + results */
.flash-wrap {
  margin-bottom: 1rem;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  background: #fff3f6;
  color: #b03058;
  border: 2px solid #ffc0d4;
}

.flash-error {
  background: #fff3f6;
  color: #b03058;
}

.result-list {
  display: grid;
  gap: 1rem;
}

.result-row {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.95);
}

.result-head {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.result-head img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
}

.result-head strong {
  display: block;
  font-family: var(--font-display);
}

.result-head span {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
}

.result-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.result-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--pink));
}

.theme-pink .result-bar i { background: linear-gradient(90deg, #ffc0d4, var(--pink-deep)); }
.theme-blue .result-bar i { background: linear-gradient(90deg, #a8e0ff, var(--blue-deep)); }
.theme-gold .result-bar i { background: linear-gradient(90deg, #ffe9a0, var(--gold-deep)); }

.empty-note {
  font-weight: 700;
  color: var(--ink-soft);
}

/* Admin panel */
.page-admin {
  width: min(1200px, calc(100% - 2rem));
}

.admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.admin-live-btn {
  animation: none;
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0 1.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 1rem 1.1rem;
  display: grid;
  gap: 0.2rem;
}

.stat-card span {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.stat-card strong {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.1;
}

.stat-card small {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.78rem;
}

.stat-card.accent {
  background: linear-gradient(180deg, #e8f7ff, #fff);
  border-color: rgba(94, 196, 255, 0.7);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.admin-scores {
  margin-bottom: 1.5rem;
}

.admin-score-row {
  display: grid;
  gap: 0.6rem;
}

.admin-score {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

.admin-tables {
  display: grid;
  gap: 1.5rem;
}

.table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.table-head .section-title {
  margin: 0;
}

.table-filter {
  min-width: min(100%, 260px);
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-weight: 700;
}

.table-scroll {
  max-height: 420px;
  overflow: auto;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.65);
}

.table-scroll.short {
  max-height: 280px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(40, 90, 130, 0.1);
}

.data-table th {
  position: sticky;
  top: 0;
  background: rgba(232, 247, 255, 0.95);
  font-weight: 800;
  z-index: 1;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.7);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.warn {
  background: #fff3d6;
  color: #9a6a00;
}

.empty-cell {
  text-align: center;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 1.2rem !important;
}

@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Responsive */
@media (max-width: 820px) {
  .candidate-row {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin-inline: auto;
  }

  .choice-grid.three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding: 0.65rem 1rem;
  }

  .logo-ardraxis {
    width: 46px;
    height: 46px;
  }

  .class-grid,
  .teacher-grid {
    max-height: 48vh;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-live-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   NEW HERO REDESIGN (Gradients, Larger Photos, Paslon Badges, Features)
   ───────────────────────────────────────────────────────────────────────────── */

.page-home {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0 3rem;
}

.hero-container {
  width: 100%;
  display: grid;
  gap: 2.25rem;
  text-align: center;
}

.hero-header {
  display: grid;
  gap: 0.85rem;
  justify-items: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(40, 90, 140, 0.1);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.pill-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pink-deep);
  box-shadow: 0 0 10px var(--pink-deep);
  animation: twinkle 1.8s ease-in-out infinite alternate;
}

.hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #ffc837 0%, #ff8008 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 3px #ffffff;
  paint-order: stroke fill;
  filter: drop-shadow(0 6px 12px rgba(240, 168, 32, 0.25));
}

.gradient-text-pink {
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 50%, #e03268 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 3px #ffffff;
  paint-order: stroke fill;
  filter: drop-shadow(0 6px 14px rgba(244, 92, 138, 0.3));
}

.hero-subtitle {
  max-width: 38rem;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  line-height: 1.6;
  font-weight: 600;
}

.hero-features-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.feature-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(30, 80, 120, 0.06);
}

.feat-icon {
  font-size: 1rem;
}

/* Hero Candidate Cards - Vibrant Matching Gradients */
.hero-candidates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.8rem);
  align-items: stretch;
}

.hero-cand-card {
  position: relative;
  border-radius: 26px;
  padding: 1.5rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--glass-strong);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: clamp(0 12px 28px rgba(30, 80, 120, 0.12), 2vw, 0 18px 40px rgba(30, 80, 120, 0.18));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease;
  overflow: hidden;
}

.hero-cand-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.15;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hero-cand-card.theme-pink {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 215, 228, 0.85) 100%);
  border-color: rgba(255, 143, 176, 0.6);
}

.hero-cand-card.theme-pink::before {
  background: radial-gradient(circle at 50% 0%, #ff8fb0, transparent 70%);
}

.hero-cand-card.theme-blue {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(210, 240, 255, 0.85) 100%);
  border-color: rgba(94, 196, 255, 0.7);
}

.hero-cand-card.theme-blue::before {
  background: radial-gradient(circle at 50% 0%, #5ec4ff, transparent 70%);
}

.hero-cand-card.theme-gold {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 246, 215, 0.85) 100%);
  border-color: rgba(255, 210, 74, 0.75);
}

.hero-cand-card.theme-gold::before {
  background: radial-gradient(circle at 50% 0%, #ffd24a, transparent 70%);
}

.hero-cand-card:hover {
  transform: translateY(-8px) scale(1.025);
  box-shadow: 0 22px 48px rgba(30, 80, 140, 0.22);
}

.hero-cand-card:hover::before {
  opacity: 0.3;
}

/* Kandidat Badge */
.cand-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  color: #fff;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.theme-pink .cand-badge {
  background: linear-gradient(135deg, #ff758c, #f45c8a);
}

.theme-blue .cand-badge {
  background: linear-gradient(135deg, #5ec4ff, #2a9adf);
}

.theme-gold .cand-badge {
  background: linear-gradient(135deg, #ffd24a, #f0a820);
  color: #3d2600;
}

/* Large Candidate Avatars */
.cand-avatar-wrap {
  position: relative;
  width: clamp(120px, 15vw, 170px);
  height: clamp(120px, 15vw, 170px);
  margin-top: 0.5rem;
}

.cand-avatar-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(145deg, #ffffff, rgba(255, 255, 255, 0.6));
  box-shadow: 0 12px 28px rgba(30, 80, 130, 0.2), inset 0 0 16px rgba(255, 255, 255, 0.8);
  transition: transform 0.3s ease;
}

.theme-pink .cand-avatar-ring {
  background: linear-gradient(145deg, #ffffff, #ffb3c6);
}

.theme-blue .cand-avatar-ring {
  background: linear-gradient(145deg, #ffffff, #a4e0ff);
}

.theme-gold .cand-avatar-ring {
  background: linear-gradient(145deg, #ffffff, #ffe49e);
}

.hero-cand-card:hover .cand-avatar-ring {
  transform: rotate(3deg) scale(1.04);
}

.cand-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
}

/* Candidate Info */
.cand-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}

.cand-num-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
}

.theme-pink .cand-num-tag { color: var(--pink-deep); }
.theme-blue .cand-num-tag { color: var(--blue-deep); }
.theme-gold .cand-num-tag { color: var(--gold-deep); }

.cand-full-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink);
  line-height: 1.25;
  text-align: center;
}

.cand-role-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  opacity: 0.85;
}

.hero-action-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero-cta-btn {
  padding: 1.15rem 2.5rem;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  border-radius: 999px;
}

.hero-footnote {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* ─────────────────────────────────────────────────────────────────────────────
   ADMIN LOGIN STYLES
   ───────────────────────────────────────────────────────────────────────────── */

.page-admin-login {
  min-height: calc(100vh - 100px);
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.admin-login-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 50px rgba(25, 60, 95, 0.22);
  border-radius: 32px;
  padding: 2.25rem clamp(1.25rem, 4vw, 2.25rem);
}

.admin-login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.admin-badge-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1f3a4d, #2a9adf);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px rgba(42, 154, 223, 0.35);
  margin-bottom: 0.25rem;
}

.admin-login-chip {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(42, 154, 223, 0.12);
  color: var(--blue-deep);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(42, 154, 223, 0.3);
}

.admin-form {
  display: grid;
  gap: 1.2rem;
}

.input-wrap {
  position: relative;
  width: 100%;
}

.password-field-wrap {
  display: flex;
  align-items: center;
}

.btn-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.btn-toggle-pw:hover {
  opacity: 1;
}

.btn-admin-primary {
  margin-top: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #1f3a4d 0%, #2a9adf 100%);
  border: 2px solid #fff;
  box-shadow: 0 12px 28px rgba(31, 58, 77, 0.3);
}

.btn-admin-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.admin-login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(31, 58, 77, 0.1);
}

.admin-top-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CLASS LIST REDESIGN (Search input, Card options, Selection state)
   ───────────────────────────────────────────────────────────────────────────── */

.class-panel {
  max-width: 860px;
  margin-inline: auto;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.grade-pill-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 4px 12px rgba(42, 154, 223, 0.25);
}

.class-search-box {
  position: relative;
  margin-bottom: 1.25rem;
}

.class-search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.6;
}

.class-search-box input {
  width: 100%;
  padding: 0.95rem 1rem 0.95rem 2.8rem;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(30, 80, 130, 0.08);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.class-search-box input:focus {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 4px rgba(94, 196, 255, 0.3);
}

.class-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  max-height: 55vh;
  overflow-y: auto;
  padding: 0.3rem;
  margin-bottom: 1.5rem;
  scroll-behavior: smooth;
  border-radius: 12px;
}

/* Custom Scrollbar for class grid */
.class-grid-cards::-webkit-scrollbar {
  width: 6px;
}
.class-grid-cards::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
}
.class-grid-cards::-webkit-scrollbar-thumb {
  background: rgba(42, 154, 223, 0.5);
  border-radius: 8px;
}
.class-grid-cards::-webkit-scrollbar-thumb:hover {
  background: var(--blue-deep);
}

.class-card-item {
  cursor: pointer;
  position: relative;
  display: block;
}

.class-card-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.class-card-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(30, 80, 130, 0.06);
  transition: all 0.25s ease;
}

.class-card-icon {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(94, 196, 255, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.class-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
}

.class-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}

.class-card-sub {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.class-card-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(31, 58, 77, 0.15);
  display: grid;
  place-items: center;
  color: #fff;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.class-card-check svg {
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.25s ease;
}

/* Hover & Selected States */
.class-card-item:hover .class-card-inner {
  transform: translateY(-3px);
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(42, 154, 223, 0.15);
}

.class-card-item:hover .class-card-icon {
  transform: scale(1.08);
}

.class-card-item input:checked + .class-card-inner {
  border-color: var(--blue-deep);
  background: linear-gradient(135deg, #ffffff 0%, #e8f5ff 100%);
  box-shadow: 0 10px 24px rgba(42, 154, 223, 0.25);
  transform: translateY(-3px);
}

.class-card-item input:checked + .class-card-inner .class-card-icon {
  background: var(--blue-deep);
  color: #fff;
}

.class-card-item input:checked + .class-card-inner .class-card-check {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}

.class-card-item input:checked + .class-card-inner .class-card-check svg {
  opacity: 1;
  transform: scale(1);
}

.class-submit-btn {
  margin-top: 0;
  font-size: 1.1rem;
  padding: 1.05rem 1.8rem;
}

.empty-state-box {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE MEDIA QUERIES (Mobile, Tablet, Desktop)
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .hero-candidates-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .cand-avatar-wrap {
    width: clamp(100px, 14vw, 130px);
    height: clamp(100px, 14vw, 130px);
  }

  .cand-full-name {
    font-size: 1rem;
  }
}

@media (max-width: 720px) {
  .hero-candidates-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-inline: auto;
  }

  .hero-cand-card {
    flex-direction: row;
    text-align: left;
    padding: 1.1rem 1.2rem;
    gap: 1.1rem;
  }

  .cand-avatar-wrap {
    width: 90px;
    height: 90px;
    margin-top: 0;
    flex-shrink: 0;
  }

  .cand-info {
    align-items: flex-start;
  }

  .cand-full-name {
    text-align: left;
    font-size: 1.1rem;
  }

  .cand-badge {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .class-grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 0.65rem;
  }

  .class-card-inner {
    padding: 0.8rem 0.85rem;
    gap: 0.5rem;
  }

  .class-card-name {
    font-size: 0.98rem;
  }

  .admin-top-actions {
    flex-direction: column;
    width: 100%;
  }

  .admin-top-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .gradient-text-gold,
  .gradient-text-pink {
    -webkit-text-stroke: 2px #ffffff;
  }

  .hero-features-bar {
    flex-direction: column;
    align-items: stretch;
    max-width: 280px;
    margin-inline: auto;
  }

  .class-grid-cards {
    grid-template-columns: 1fr;
  }
}

