/* =========================================================
   MODERN LOGIN - S-WASKIM
   Dinas Perumahan Rakyat & Kawasan Permukiman Prov. Kalsel
   Tema Biru Muda Segar, Bersih & Profesional
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --sky-50:       #f0f9ff;
  --sky-100:      #e0f2fe;
  --sky-200:      #bae6fd;
  --sky-300:      #7dd3fc;
  --sky-400:      #38bdf8;
  --sky-500:      #0ea5e9;
  --sky-600:      #0284c7;
  --sky-700:      #0369a1;
  --sky-800:      #075985;
  --sky-900:      #0c4a6e;
  
  --primary-blue: #0284c7;
  --primary-hover:#0369a1;
  --accent-gold:  #d97706;
  
  --text-main:    #0f172a;
  --text-muted:   #64748b;
  --border-light: #e2e8f0;
  --border-focus: #0ea5e9;
  
  --radius-card:  18px;
  --radius-input: 12px;
  --transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font-gov:     'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-gov);
  background-color: var(--sky-100);
  background-image: 
    radial-gradient(at 10% 10%, rgba(56, 189, 248, 0.4) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(14, 165, 233, 0.3) 0px, transparent 50%),
    radial-gradient(at 50% 50%, #f0f9ff 0px, #e0f2fe 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  color: var(--text-main);
}

/* Subtle architectural grid pattern on light blue */
.bg-decorations {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(rgba(2, 132, 199, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(2, 132, 199, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 1;
}

.login-section {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  padding: 24px 16px;
  margin: auto;
}

/* Crisp White Login Card */
.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-card);
  padding: 36px 32px 30px;
  box-shadow: 0 16px 40px -10px rgba(2, 132, 199, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.9);
  border-top: 4px solid var(--sky-500);
  position: relative;
}

/* Brand Identity */
.brand-container {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo-wrapper {
  margin-bottom: 12px;
}

.brand-logo {
  height: 68px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(2, 132, 199, 0.15));
  transition: transform var(--transition);
}

.brand-logo:hover {
  transform: scale(1.04);
}

.brand-gov-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--sky-700);
  text-transform: uppercase;
  margin: 0 0 3px 0;
}

.brand-dept-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0 0 6px 0;
}

.brand-app-badge {
  display: inline-block;
  background: var(--sky-50);
  border: 1px solid var(--sky-200);
  color: var(--sky-700);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.brand-subtitle-only {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Custom Alert */
.alert-custom {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #991b1b;
  font-size: 0.84rem;
  line-height: 1.4;
}

.alert-custom i {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.alert-custom.alert-custom-success {
  background: #f0fdf4;
  border-left-color: #10b981;
  color: #065f46;
}

.alert-custom.alert-custom-success i {
  color: #10b981;
}

/* Form Styling */
.form-group-custom {
  position: relative;
  margin-bottom: 20px;
}

.form-group-custom .form-control {
  width: 100%;
  height: 50px;
  padding: 18px 14px 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  background-color: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-input);
  transition: all var(--transition);
}

.form-group-custom .form-control:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--sky-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.form-group-custom .form-control-password {
  padding-right: 42px;
}

.form-group-custom .placeholder-custom {
  position: absolute;
  top: 15px;
  left: 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
  transition: all var(--transition);
}

/* Floating Label Behavior */
.form-group-custom .form-control:focus ~ .placeholder-custom,
.form-group-custom .form-control:not(:placeholder-shown) ~ .placeholder-custom,
.form-group-custom select.form-control ~ .placeholder-custom {
  top: 6px;
  left: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--sky-600);
}

.password-toggle-btn {
  position: absolute;
  right: 14px;
  top: 17px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color var(--transition);
}

.password-toggle-btn:hover {
  color: var(--sky-600);
}

/* Submit Button in Soft Light Blue Gradient */
.btn-submit-custom {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--sky-500) 0%, var(--sky-600) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-input);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-submit-custom:hover {
  background: linear-gradient(135deg, var(--sky-600) 0%, var(--sky-700) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.btn-submit-custom:active {
  transform: translateY(0);
}

/* Footer Link & Security Shield */
.login-footer-info {
  text-align: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.back-link {
  color: var(--sky-700);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--sky-500);
  text-decoration: underline;
}

.security-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 12px;
}

.security-seal i {
  color: #059669;
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px 22px;
  }
}

/* Shimmer Loading & Top Progress Bar */
@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

#shimmerTopProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 99999;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #10b981, #0284c7);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s linear infinite;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

#shimmerTopProgressBar.is-active {
  opacity: 1;
}

.btn-submit-custom.is-loading {
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #0284c7 100%) !important;
  background-size: 200% 100% !important;
  animation: skeletonShimmer 1.2s linear infinite !important;
  pointer-events: none;
  opacity: 0.92;
}

/* =========================================================
   LOGIN VERIFICATION ANIMATION MODAL
   ========================================================= */
.verify-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(11, 27, 50, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.verify-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.verify-modal-card {
  background: #ffffff;
  border-radius: 26px;
  max-width: 440px;
  width: 100%;
  padding: 36px 30px 32px;
  text-align: center;
  position: relative;
  box-shadow: 0 30px 70px -15px rgba(2, 132, 199, 0.4), 0 0 0 1px rgba(224, 242, 254, 0.85);
  transform: scale(0.85) translateY(24px);
  transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.verify-modal-overlay.is-active .verify-modal-card {
  transform: scale(1) translateY(0);
}

/* Subtle top gradient bar */
.verify-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #10b981, #0284c7);
  background-size: 200% 100%;
  animation: skeletonShimmer 2s linear infinite;
}

/* Radar & Scanner Shield */
.verify-radar-container {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-radar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(14, 165, 233, 0.45);
  animation: verifyRadarPulse 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

.verify-radar-ring.ring-2 {
  inset: -22px;
  animation-delay: 0.65s;
  border-color: rgba(56, 189, 248, 0.28);
}

.verify-radar-ring.ring-3 {
  inset: -36px;
  animation-delay: 1.3s;
  border-color: rgba(125, 211, 252, 0.15);
}

@keyframes verifyRadarPulse {
  0% { transform: scale(0.5); opacity: 0.95; }
  100% { transform: scale(1.35); opacity: 0; }
}

.verify-radar-core {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 34px;
  position: relative;
  z-index: 3;
  box-shadow: 0 12px 28px -4px rgba(2, 132, 199, 0.55);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.verify-radar-core i {
  transition: all 0.3s ease;
}

.verify-radar-core.is-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 12px 30px -4px rgba(16, 185, 129, 0.6) !important;
  transform: scale(1.08);
}

.verify-radar-core.is-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 12px 30px -4px rgba(239, 68, 68, 0.6) !important;
  animation: modalShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes modalShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

/* Modal Titles */
.verify-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.verify-subtitle {
  font-size: 0.86rem;
  color: #64748b;
  margin: 0 0 20px;
  min-height: 22px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.verify-subtitle.is-success {
  color: #059669;
  font-weight: 700;
}

.verify-subtitle.is-error {
  color: #dc2626;
  font-weight: 600;
}

/* Step list */
.verify-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  background: #f8fafc;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin-bottom: 22px;
}

.verify-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  transition: all 0.28s ease;
}

.verify-step-item.is-active {
  color: #0284c7;
}

.verify-step-item.is-done {
  color: #059669;
}

.verify-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: #e2e8f0;
  color: #94a3b8;
  flex-shrink: 0;
  transition: all 0.28s ease;
}

.verify-step-item.is-active .verify-step-icon {
  background: #e0f2fe;
  color: #0284c7;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.verify-step-item.is-done .verify-step-icon {
  background: #d1fae5;
  color: #059669;
}

/* Progress bar */
.verify-progress-track {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}

.verify-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.verify-progress-bar.is-success {
  background: linear-gradient(90deg, #10b981, #34d399) !important;
}

.verify-progress-bar.is-error {
  background: linear-gradient(90deg, #ef4444, #f87171) !important;
}

/* Retry Button */
.verify-retry-btn {
  display: none;
  margin-top: 14px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.verify-retry-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

