/* ---------- Helper ---------- */
@keyframes slideDownModal {
  from {
    transform: translateY(25px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px); /* adds subtle glass effect */
  animation: fadeInOverlay 0.3s ease forwards;
}

.modal {
  background: #fff;
  border-radius: 10px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: slideDownModal 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards; /* smoother easing */
  overflow: hidden; /* ensures inner radius applies */
}

.modal h2 {
  margin: 0 0 20px;
  padding: 5px 0;
  font-size: 18px;
  color: #fff;
  background-color: #343a40;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.modal h2.alert-attention {background-color: #dc3545;}
.modal h2.alert-success {background-color: #28a745;}
.modal h2.alert-confirm {background-color: #007bff;}
.modal h2.alert-delete {background-color: #dc3545;}
.modal h2.alert-archive {background-color: #dc3545;}
.modal h2.alert-announcement {background-color: #007bff;}
.modal h2.alert-invoice-insights {background-color: #007bff;}
.modal h2.alert-password {background-color: #212529;}

.modal p {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 16px;
  color: #222;
  white-space: pre-line;
}

.modal-input {
  display: block;
  width: 90%;
  max-width: 250px;
  margin: 0 auto 10px auto;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #aaa;
  border-radius: 6px;
  box-sizing: border-box;
  background-color: #fff;
}

.modal-input:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.4);
}


.modal-buttons {
  display: flex;
  margin-bottom: 10px;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.modal-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

/* OK button */
.ok-btn, .announcement-btn {
  background-color: #007bff;
  color: white;
}
.ok-btn:hover, .announcement-btn:hover {
  background-color: #0056b3;
}

/* Confirm button */
.confirm-btn {
  background-color: #28a745;
  color: white;
}
.confirm-btn:hover {
  background-color: #1e7e34;
}

/* Cancel button */
.cancel-btn {
  background-color: #dc3545;
  color: white;
}
.cancel-btn:hover {
  background-color: #a71d2a;
}

/* Success button */
.success-btn {
  background-color: #28a745;
  color: white;
}
.success-btn:hover {
  background-color: #1e7e34;
}



#pageLoader {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
  background-size: 300% 100%;
  animation: gradientShift 1.5s linear infinite;
  transition: width 0.4s ease, opacity 0.5s ease;
  z-index: 9999;
  opacity: 0;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

