/* ============================================================
   style-login.css
   CSS untuk Halaman Login Sakatoplan
   ============================================================ */

/* ============================================================
   1. RESET & BASE
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: 
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), 
    url("https://sakatoplan.sumbarprov.go.id/images/BG SAKATOPLAN.webp") no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  overflow-x: hidden;
}

/* ============================================================
   2. ANIMASI BACKGROUND
   ============================================================ */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.04);
  animation: floatBg 20s ease-in-out infinite;
  border-radius: 50%;
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.shape.square {
  border-radius: 30%;
  background: rgba(255, 255, 255, 0.03);
}

.shape:nth-child(1) {
  width: 150px;
  height: 150px;
  top: 5%;
  left: 8%;
  animation-delay: 0s;
}
.shape:nth-child(2) {
  width: 100px;
  height: 100px;
  top: 80%;
  left: 75%;
  animation-delay: 3s;
}
.shape:nth-child(3) {
  width: 200px;
  height: 200px;
  top: 25%;
  left: 82%;
  animation-delay: 5s;
}
.shape:nth-child(4) {
  width: 80px;
  height: 80px;
  top: 70%;
  left: 10%;
  animation-delay: 7s;
}
.shape:nth-child(5) {
  width: 250px;
  height: 250px;
  top: 10%;
  left: 50%;
  animation-delay: 1.5s;
}

@keyframes floatBg {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.25;
  }
  25% {
    transform: translateY(-40px) rotate(8deg) scale(1.08);
    opacity: 0.5;
  }
  75% {
    transform: translateY(30px) rotate(-6deg) scale(0.92);
    opacity: 0.35;
  }
}

/* ============================================================
   3. SPLASH SCREEN
   ============================================================ */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #0a3d7c, #1565c0, #42a5f5);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  animation: splashOut 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.5s;
}

#splash img {
  width: 170px;
  height: auto;
  animation: pulseLogo 0.8s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.25));
}

#splash .loader {
  margin-top: 28px;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spinLoader 0.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spinLoader {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseLogo {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes splashOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ============================================================
   4. NAVBAR
   ============================================================ */
.navbar-custom {
  background: rgba(10, 61, 124, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand img {
  height: 36px;
  width: auto;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand img:hover {
  transform: scale(1.06) rotate(-2deg);
}

.navbar-custom .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
  position: relative;
}

.navbar-custom .nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #64b5f6;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.navbar-custom .nav-link:hover::after {
  width: 60%;
}

.navbar-custom .nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08);
}

.navbar-custom .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

.navbar-custom .nav-link.active::after {
  width: 60%;
}

.navbar-custom .dropdown-menu {
  background: rgba(10, 61, 124, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 0.4rem;
  margin-top: 0.3rem;
}

.navbar-custom .dropdown-item {
  color: rgba(255, 255, 255, 0.8) !important;
  border-radius: 10px;
  padding: 0.4rem 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
}

.navbar-custom .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  transform: translateX(4px);
}

.navbar-toggler {
  border: none;
  color: #fff;
  padding: 0.2rem 0.4rem;
  transition: transform 0.3s ease;
}

.navbar-toggler:hover {
  transform: rotate(90deg);
}

.navbar-toggler .material-icons {
  font-size: 28px;
}

/* ============================================================
   5. LOGIN WRAPPER & CARD
   ============================================================ */
.login-wrapper {
  min-height: calc(100vh - 62px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem 80px;
  position: relative;
  z-index: 2;
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 28px;
  padding: 2.5rem 2.2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  color: #1a1a2e;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(25, 118, 210, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.login-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.login-header img {
  height: 120px;
  width: auto;
  margin-bottom: 0.5rem;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-header img:hover {
  transform: scale(1.08) rotate(-3deg);
}

.login-header h4 {
  font-weight: 800;
  color: #0a3d7c;
  margin-bottom: 0.2rem;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
}

.login-header p {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 0;
  font-weight: 400;
}

/* ============================================================
   6. FORM
   ============================================================ */
.form-control {
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  font-size: 0.95rem;
  border: 2px solid #eef2f7;
  background: #f8fafc;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 52px;
  font-weight: 500;
}

.form-control:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
  background: #fff;
}

.form-control::placeholder {
  color: #adb5bd;
  font-weight: 400;
}

.input-group-custom {
  position: relative;
}

.input-group-custom .form-control {
  padding-right: 3.2rem;
}

.input-group-custom .input-icon {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  pointer-events: none;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group-custom .form-control:focus+.input-icon {
  color: #1976d2;
  transform: translateY(-50%) scale(1.1);
}

/* ============================================================
   7. BUTTON LOGIN
   ============================================================ */
.btn-login {
  border-radius: 50px;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(145deg, #0a3d7c, #1976d2);
  border: none;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 24px rgba(25, 118, 210, 0.3);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: skewX(-25deg);
  transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-login:hover::before {
  left: 125%;
}

.btn-login:hover {
  background: linear-gradient(145deg, #1565c0, #1e88e5);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(25, 118, 210, 0.45);
}

.btn-login:active {
  transform: translateY(1px) scale(0.97);
}

.btn-login i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.btn-login:hover i {
  transform: translateX(4px);
}

/* ============================================================
   8. EXTRA LINKS & DIVIDER
   ============================================================ */
.extra-links {
  text-align: center;
  margin-top: 1.2rem;
  position: relative;
  z-index: 1;
}

.extra-links a {
  color: #1976d2;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.8rem;
  position: relative;
}

.extra-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #1976d2;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.extra-links a:hover::after {
  width: 100%;
}

.extra-links a:hover {
  color: #0a3d7c;
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.2rem 0;
  color: #adb5bd;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

.divider::before {
  margin-right: 1rem;
}

.divider::after {
  margin-left: 1rem;
}

/* ============================================================
   9. FOOTER
   ============================================================ */
.footer-custom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.8);
  z-index: 3;
  padding: 0.6rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-custom p {
  margin-bottom: 0;
  font-size: 0.85rem;
  font-weight: 400;
}

.footer-custom .fw-bold {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.footer-custom .opacity-75 {
  opacity: 0.6;
}

/* ============================================================
   10. BUTTON SURVEI
   ============================================================ */
.survey-trigger-wrapper {
  position: fixed;
  bottom: 80px;
  right: 28px;
  z-index: 5;
}

.btn-survey {
  background: linear-gradient(145deg, #00c853, #00e676);
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 6px 28px rgba(0, 200, 83, 0.35);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: pulseButton 2.5s ease-in-out infinite;
  backdrop-filter: blur(4px);
}

@keyframes pulseButton {
  0%, 100% {
    box-shadow: 0 6px 28px rgba(0, 200, 83, 0.35);
  }
  50% {
    box-shadow: 0 6px 40px rgba(0, 200, 83, 0.6);
  }
}

.btn-survey:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 40px rgba(0, 200, 83, 0.55);
  background: linear-gradient(145deg, #00e676, #00c853);
}

.btn-survey:active {
  transform: translateY(2px) scale(0.96);
}

.btn-survey i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.btn-survey:hover i {
  transform: rotate(-10deg) scale(1.1);
}

/* ============================================================
   11. MODAL SURVEY
   ============================================================ */
.modal-survey {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-survey.show {
  display: flex !important;
  opacity: 1;
}

.modal-survey .modal-content {
  background: #fff;
  border-radius: 24px;
  padding: 0;
  width: 92%;
  max-width: 880px;
  max-height: 92vh;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-survey.show .modal-content {
  transform: scale(1) translateY(0);
}

.modal-survey .modal-header {
  padding: 1.1rem 1.8rem;
  border-bottom: 2px solid #f0f4f8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafcff;
  flex-shrink: 0;
  border-radius: 24px 24px 0 0;
}

.modal-survey .modal-header h5 {
  font-weight: 700;
  color: #0a3d7c;
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-survey .modal-header h5 i {
  font-size: 1.2rem;
}

.modal-survey .modal-body {
  padding: 0;
  flex: 1;
  min-height: 380px;
  max-height: 68vh;
  overflow: hidden;
  position: relative;
  background: #fff;
}

.modal-survey .modal-body iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: none;
  display: block;
}

.modal-survey .close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

.modal-survey .close-btn:hover {
  background: #f1f4f8;
  color: #dc3545;
  transform: rotate(90deg) scale(1.05);
}

.modal-survey .empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: #6c757d;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  z-index: 1;
}

.modal-survey .empty-state i {
  font-size: 4rem;
  color: #e8ecf1;
  margin-bottom: 1rem;
  animation: pulseIcon 1.5s ease-in-out infinite;
}

@keyframes pulseIcon {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.modal-survey .empty-state .spinner-border {
  width: 2.8rem;
  height: 2.8rem;
  border-width: 3px;
}

.modal-survey .empty-state h5 {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.3rem;
}

/* ============================================================
   12. NOTIFICATION BADGE
   ============================================================ */
.survey-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff1744;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgePulse 1.5s ease-in-out infinite;
  border: 2px solid #fff;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* ============================================================
   13. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .login-card {
    padding: 2rem 1.5rem;
    max-width: 380px;
  }
  .login-header img {
    height: 65px;
  }
  .login-header h4 {
    font-size: 1.4rem;
  }
  .btn-survey {
    padding: 11px 18px;
    font-size: 0.8rem;
  }
  .btn-survey i {
    font-size: 1rem;
  }
  .survey-trigger-wrapper {
    bottom: 75px;
    right: 16px;
  }
  .modal-survey .modal-content {
    width: 95%;
  }
  .modal-survey .modal-body {
    max-height: 60vh;
  }
  .modal-survey .modal-body iframe {
    min-height: 380px;
  }
}

@media (max-width: 576px) {
  .login-card {
    padding: 1.5rem 1.2rem;
    border-radius: 22px;
  }
  .login-header img {
    height: 55px;
  }
  .login-header h4 {
    font-size: 1.2rem;
  }
  .form-control {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    height: 46px;
  }
  .btn-login {
    padding: 0.6rem;
    font-size: 0.9rem;
    height: 46px;
  }
  .navbar-custom .nav-link {
    font-size: 0.85rem;
    padding: 0.3rem 0.7rem;
  }
  .modal-survey .modal-body iframe {
    min-height: 320px;
  }
  .modal-survey .modal-header h5 {
    font-size: 0.95rem;
  }
  .modal-survey .modal-header {
    padding: 0.8rem 1.2rem;
  }
  .btn-survey {
    padding: 10px 14px;
    font-size: 0.75rem;
  }
  .btn-survey i {
    font-size: 0.9rem;
  }
}