/**
 * Sistem Arsip Kampus - Universitas Nahdlatul Ulama Sunan Giri (UNUGIRI)
 * Desain Halaman Login: Radar Dial Animation dengan Logo Kampus
 * Fitur Interaktif: Efek Menonjol (Pop-out Elevation) saat Kursor Diarahkan
 * Background: bg_login.jpg
 * Warna Aksen: Hijau Emerald UNUGIRI (#22c55e / #16a34a)
 */

:root {
  --primary-accent: #22c55e;
  --primary-accent-glow: rgba(34, 197, 94, 0.45);
  --primary-hover: #16a34a;
  --circle-bg: rgba(15, 29, 24, 0.28);
  --circle-inner-bg: rgba(15, 29, 24, 0.75);
  --tick-base: rgba(30, 59, 46, 0.65);
  --input-border: rgba(35, 72, 53, 0.85);
  --text-white: #ffffff;
  --text-muted: #e2e8f0;
  --circle-size: 420px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-login, url('../img/bg_login.jpg')) no-repeat center center fixed;
  background-size: cover;
  font-family: var(--font-family);
  overflow: hidden;
}

/* ========================================================
   CONTAINER LINGKARAN & ANIMASI RADAR TRANSPARAN
   ======================================================== */
.container {
  position: relative;
  width: var(--circle-size);
  height: var(--circle-size);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--circle-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.container span {
  position: absolute;
  left: 0;
  width: 32px;
  height: 6px;
  background: var(--tick-base);
  border-radius: 80px;
  transform-origin: calc(var(--circle-size) / 2);
  transform: rotate(calc(var(--i) * (360deg / 50)));
  animation: blink 3s linear infinite;
  animation-delay: calc(var(--i) * (3s / 50));
}

@keyframes blink {
  0% {
    background: var(--primary-accent);
    box-shadow: 0 0 12px var(--primary-accent);
  }
  25% {
    background: var(--tick-base);
    box-shadow: none;
  }
}

/* ========================================================
   LOGIN FORM: KOMPAK & PRESISI (BEBAS BENTURAN JARUM)
   ======================================================== */
.login-box {
  position: absolute;
  width: 76%;
  max-width: 260px;
  z-index: 2;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

form {
  width: 100%;
  padding: 0;
  margin: 0;
}

/* ========================================================
   LOGO KAMPUS: MENONJOL (POP-OUT) SAAT DI-HOVER
   ======================================================== */
.logo-wrapper {
  text-align: center;
  margin-bottom: 10px;
}

.campus-logo {
  width: 62px;
  height: 62px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
  will-change: transform, filter;
}

.campus-logo:hover {
  transform: translateY(-4px) scale(1.1);
  filter: drop-shadow(0 8px 20px rgba(34, 197, 94, 0.65)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

/* Alert Pesan Validasi Kesalahan */
.alert-box {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.76em;
  line-height: 1.35;
  margin-bottom: 8px;
  text-align: center;
  backdrop-filter: blur(4px);
}

.alert-danger {
  background: rgba(220, 38, 38, 0.45);
  border: 1px solid rgba(220, 38, 38, 0.7);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.45);
  border: 1px solid rgba(34, 197, 94, 0.7);
  color: #86efac;
}

/* ========================================================
   INPUT BOX & FLOATING LABEL: MENONJOL SAAT HOVER / FOCUS
   ======================================================== */
.input-box {
  position: relative;
  margin: 12px 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.input-box:hover,
.input-box:focus-within {
  transform: translateY(-2px) scale(1.02);
}

input {
  width: 100%;
  height: 42px;
  background: rgba(15, 29, 24, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 2px solid var(--input-border);
  outline: none;
  border-radius: 40px;
  font-size: 0.92em;
  color: var(--text-white);
  padding: 0 42px 0 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  font-family: inherit;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

input:hover {
  border-color: rgba(34, 197, 94, 0.85);
  background: rgba(15, 29, 24, 0.4);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(34, 197, 94, 0.35);
}

input:focus {
  border-color: var(--primary-accent);
  background: rgba(15, 29, 24, 0.5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 16px var(--primary-accent-glow);
}

.input-box input:focus ~ label,
.input-box input:not(:placeholder-shown) ~ label,
.input-box input[value]:not([value=""]) ~ label {
  top: -9px;
  font-size: 0.76em;
  background: var(--circle-inner-bg);
  backdrop-filter: blur(4px);
  padding: 0 8px;
  border-radius: 4px;
  color: var(--primary-accent);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-size: 0.9em;
  pointer-events: none;
  transition: all 0.3s ease;
  color: var(--text-white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Tombol Toggle Password */
.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.toggle-pass:hover {
  color: var(--primary-accent);
  transform: translateY(-50%) scale(1.15);
}

.toggle-pass svg {
  width: 17px;
  height: 17px;
}

/* ========================================================
   TOMBOL LOGIN: MENONJOL (POP-OUT) SAAT DI-HOVER
   ======================================================== */
.btn {
  width: 170px;
  max-width: 100%;
  height: 38px;
  background: var(--primary-accent);
  border: none;
  outline: none;
  border-radius: 40px;
  cursor: pointer;
  font-size: 0.95em;
  color: #0d1e17;
  font-weight: 700;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), 0 0 12px var(--primary-accent-glow);
  font-family: inherit;
  display: block;
  margin: 14px auto 0;
  will-change: transform, box-shadow;
}

.btn:hover {
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 20px rgba(34, 197, 94, 0.75);
}

.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================================
   RESPONSIVE (LAYAR KECIL / MOBILE)
   ======================================================== */
@media (max-width: 440px) {
  :root {
    --circle-size: 360px;
  }

  .container span {
    width: 26px;
    height: 5px;
  }

  .login-box {
    max-width: 230px;
  }

  .campus-logo {
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
  }

  input {
    height: 38px;
  }

  .btn {
    width: 150px;
    height: 36px;
    margin-top: 10px;
  }

  .input-box {
    margin: 10px 0;
  }
}
