/* ==========================================================================
   Akfilni FinTech Platform - Modern Application Loading Screen
   ========================================================================== */

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

@keyframes akfilni-aura {
  0% {
    transform: scale(0.9);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}

@keyframes akfilni-progress {
  0% {
    left: -40%;
    width: 40%;
  }
  50% {
    left: 30%;
    width: 60%;
  }
  100% {
    left: 100%;
    width: 30%;
  }
}

@keyframes akfilni-dots {
  0%,
  20% {
    content: '';
  }
  40% {
    content: '.';
  }
  60% {
    content: '..';
  }
  80%,
  100% {
    content: '...';
  }
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

.app-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f1f5f9 100%);
  z-index: 99999;
  font-family:
    'Cairo',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  direction: rtl;
}

.akfilni-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.25rem 2.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(27, 58, 92, 0.08);
  border-radius: 28px;
  box-shadow:
    0 20px 45px -15px rgba(27, 58, 92, 0.12),
    0 0 0 1px rgba(27, 58, 92, 0.04);
  max-width: 340px;
  width: 88%;
  text-align: center;
}

.akfilni-logo-wrapper {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.akfilni-logo-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 58, 92, 0.14) 0%, rgba(197, 155, 39, 0.08) 55%, transparent 75%);
  animation: akfilni-aura 2.2s ease-in-out infinite alternate;
}

.akfilni-loader-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 6px 14px rgba(27, 58, 92, 0.15));
  animation: akfilni-float 3s ease-in-out infinite;
}

.akfilni-loader-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #1b3a5c;
  margin: 0 0 0.2rem 0;
  letter-spacing: 0.5px;
}

.akfilni-loader-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 1.5rem 0;
  letter-spacing: 0.2px;
}

.akfilni-progress-track {
  width: 140px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.85rem;
}

.akfilni-progress-bar {
  position: absolute;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1b3a5c 0%, #c59b27 100%);
  animation: akfilni-progress 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.akfilni-loader-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.akfilni-dots::after {
  content: '';
  display: inline-block;
  width: 14px;
  text-align: right;
  animation: akfilni-dots 1.5s infinite steps(1);
}

/* Error Troubleshooting Screen */
#jhipster-error {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1.5rem 2rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #fee2e2;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.1);
  direction: ltr;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#jhipster-error h1 {
  color: #dc2626;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

#jhipster-error h2 {
  color: #1e293b;
  font-size: 1.1rem;
  margin-top: 1.25rem;
}

#jhipster-error ol,
#jhipster-error ul {
  padding-left: 1.25rem;
  color: #475569;
  font-size: 0.9rem;
}

#jhipster-error code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}
