@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap");

/*
  Nafath login — Graduation Party; visual match to Creative Ideas login (IBM Plex, card, background).
*/

.login-page {
  --login-text: #1a1a1a;
  --login-text-muted: #6b6b6b;
  --login-input-radius: 8px;
  width: 100% !important;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  position: relative;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
}

.login-page.fade-in {
  animation: nafathFadeIn 0.4s ease-out;
}

@keyframes nafathFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #d3d9d6;
  background-image: url("../assets/images/login/background_image.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-container {
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 80px;
  background: #fff;
  border-radius: 0 0 40px 40px;
  box-shadow: -25px 0px 50px 0px rgba(0, 0, 0, 0.05);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 2.327px;
}

.logo-img {
  width: 150px;
  height: 100px;
  object-fit: contain;
}

.header {
  align-self: stretch;
  color: #000;
  text-align: center;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
  font-size: 30px;
  font-style: normal;
  font-weight: 400;
  line-height: 38px;
  margin: 0;
}

.form-group {
  width: 100% !important;
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: 100% !important;
  text-align: right;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
  font-size: 16px;
  font-weight: 400;
  color: #161616;
  margin-bottom: 8px;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--login-input-radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
  width: 100%;
  box-sizing: border-box;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
}

.alert strong {
  font-weight: 700;
}

.input-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: 100% !important;
  position: relative;
}

.input-container input,
.input-container .form-control {
  width: 100% !important;
  padding: 10px 40px 10px 10px;
  box-sizing: border-box;
  border: 1px solid #9da4ae;
  border-radius: 4px;
  font-size: 16px;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
  font-weight: 400;
  line-height: 24px;
  background: #fff;
  color: #161616;
  text-align: right;
  direction: rtl;
  min-height: 40px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-container input:focus,
.input-container .form-control:focus {
  outline: none;
  border-color: #1b8354;
  box-shadow: 0 0 0 2px rgba(27, 131, 84, 0.1);
}

.input-container input::placeholder,
.input-container .form-control::placeholder {
  color: #9ca3af;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
  text-align: right;
  direction: rtl;
}

.input-container input:disabled,
.input-container .form-control:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f3f4f6;
}

.input-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-button {
  display: flex !important;
  height: 48px !important;
  min-height: 24px !important;
  max-height: 48px !important;
  padding: 0 112px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 4px !important;
  width: 100% !important;
  border: none !important;
  border-radius: 4px !important;
  background: #1b8354 !important;
  color: #fff !important;
  cursor: pointer !important;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 500 !important;
  line-height: 24px !important;
  transition: background-color 0.3s ease;
  margin-top: 64px;
}

.login-button:hover:not(:disabled) {
  background-color: #059669 !important;
}

.login-button:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #333;
  text-align: center;
  font-family: "IBM Plex Sans Arabic", "DIN Next LT W23", Arial, sans-serif !important;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  gap: 10px;
}

.footer-logo {
  width: 21.154px;
  height: 25px;
}

.nafath-dialog {
  width: 100%;
  box-sizing: border-box;
  background-color: #f9f9f9;
  padding: 24px;
  border: 2px dashed #1b8354;
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.nafath-dialog h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--login-text);
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
}

.random-container {
  background-color: #1b8354;
  border-radius: 16px;
  width: 142px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 36px;
  font-style: normal;
  font-weight: 700;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
  color: #fff;
}

.nafath-dialog p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--login-text-muted);
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
}

.page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #6b7280;
  background-color: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}

.page-footer .version {
  flex-shrink: 0;
  color: #6b7280;
}

.page-footer .copyright {
  flex-shrink: 0;
  text-align: right;
  color: #6b7280;
}

@media (max-width: 768px) {
  .login-container {
    padding: 30px;
    gap: 30px;
  }

  .header {
    font-size: 26px;
    line-height: 32px;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 20px;
    gap: 20px;
  }

  .header {
    font-size: 22px;
    line-height: 28px;
  }

  .page-footer {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }

  .page-footer .version,
  .page-footer .copyright {
    margin: 0;
    text-align: center;
  }
}
