/* Modern Login Page CSS - SSCN Verifikasi 2025 */

:root {
  --primary-color: #32a2d7;
  --primary-dark: #2591c1;
  --primary-light: #5bb3df;
  --card-shadow: 0 4px 20px rgba(50, 162, 215, 0.15);
  --card-hover-shadow: 0 8px 30px rgba(50, 162, 215, 0.25);
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --transition: all 0.3s ease;
}

/* Body and Layout */
body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../img/bg-ver.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  z-index: -1;
}

/* Login Container */
.login-container {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Modern Login Card */
.modern-login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(50, 162, 215, 0.1);
  overflow: hidden;
  transition: var(--transition);
  animation: slideUp 0.6s ease-out;
}

.modern-login-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-5px);
}

/* Login Header */
.login-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: shimmer 3s infinite;
}

.login-header .logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.login-header .logo:hover {
  transform: scale(1.05);
}

.login-header h6 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

/* Login Body */
.login-body {
  padding: 2rem 1.5rem;
}

/* Keycloak Login Button */
.keycloak-login {
  display: inline-block;
  background: linear-gradient(45deg, #4285f4, #34a853);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 1.5rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
  width: 100%;
  text-align: center;
}

.keycloak-login:hover {
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

/* Form Divider */
.form-divider {
  text-align: center;
  margin: 0.5rem 0;
  position: relative;
  color: #6c757d;
}

.form-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #dee2e6;
}

.form-divider span {
  background: rgba(255, 255, 255, 0.95);
  padding: 0 1rem;
}

/* Form Groups and Controls */
.modern-form-group {
  margin-bottom: 0.75rem;
}

.modern-form-group label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  display: block;
}

.modern-form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: #fff;
}

.modern-form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(50, 162, 215, 0.1);
  transform: translateY(-1px);
}

/* Captcha Styles */
.captcha-container {
  text-align: center;
  margin: 1.5rem 0;
}

.captcha-display {
  background: linear-gradient(45deg, #28a745, #20c997);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 0.3rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
  display: inline-block;
  min-width: 200px;
}

.captcha-refresh {
  background: #ffc107;
  color: #212529;
  padding: 0.5rem 0.5rem;
  padding-top: 10px;
  border-radius: 15px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  margin-left: 0.5rem;
  transition: var(--transition);
  display: inline-block;
}

.captcha-refresh:hover {
  background: #e0a800;
  color: #212529;
  text-decoration: none;
  transform: scale(1.05);
}

/* Modern Button */
.modern-btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
  border: none;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(50, 162, 215, 0.3);
  width: 100%;
  cursor: pointer;
}

.modern-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(50, 162, 215, 0.4);
  background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
}

.modern-btn-primary:active {
  transform: translateY(0);
}

.modern-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Error Message */
.error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  animation: shake 0.5s ease-in-out;
  position: relative;
}

.error-message .close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #721c24;
  cursor: pointer;
  opacity: 0.7;
}

.error-message .close:hover {
  opacity: 1;
}

/* Footer */
.footer-copyright {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #dee2e6;
  background: rgba(248, 249, 250, 0.8);
  color: #6c757d;
  font-size: 0.875rem;
}

.footer-copyright a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.footer-copyright a:hover {
  text-decoration: underline;
}

/* Error Display */
.help-inline {
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    transform: rotate(0deg);
    opacity: 0.3;
  }

  50% {
    opacity: 0.1;
  }

  100% {
    transform: rotate(360deg);
    opacity: 0.3;
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

/* Focus States */
.modern-form-group.focused label {
  color: var(--primary-color);
}

/* Loading State */
.loading .modern-btn-primary {
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 1rem 0;
  }

  .login-container {
    padding: 0 0.5rem;
  }

  .modern-login-card {
    margin: 1rem 0;
    border-radius: var(--border-radius);
  }

  .login-header {
    padding: 1.5rem 1rem 1rem;
  }

  .login-body {
    padding: 1.5rem 1rem;
  }

  .login-header h6 {
    font-size: 1rem;
  }

  .login-header .logo {
    max-width: 150px;
  }

  .captcha-display {
    font-size: 1.2rem;
    letter-spacing: 0.2rem;
    min-width: 150px;
  }
}

@media (max-width: 480px) {
  .modern-login-card {
    margin: 0.5rem 0;
  }

  .login-header {
    padding: 1rem;
  }

  .login-body {
    padding: 1rem;
  }

  .modern-form-group {
    margin-bottom: 1rem;
  }

  .captcha-display {
    font-size: 1rem;
    letter-spacing: 0.1rem;
    padding: 0.75rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .modern-login-card {
    border: 2px solid var(--primary-color);
  }

  .modern-form-control {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}