body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  height: 100vh;
  background: linear-gradient(-45deg, 
    #ff9a9e, 
    #fad0c4, 
    #fbc2eb, 
    #a6c1ee, 
    #a1ffce, 
    #fcd1d1, 
    #f6d365, 
    #fda085, 
    #84fab0, 
    #8fd3f4
  );
  background-size: 400% 400%;
  animation: gradientBG 10s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

.header {
  position: absolute;
  top: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 15px 0;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 2px;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 15px;
  width: 90%;
  max-width: 360px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  text-align: center;
  margin-top: 80px;
}

.login-container h2 {
  margin-bottom: 25px;
  color: #333;
  font-size: 55px;
}

@media (max-width: 480px) {
  .login-container {
    padding: 25px 20px;
  }
  .login-container h2 {
    font-size: 32px;
  }
  input, button {
    font-size: 15px;
    padding: 10px;
  }
}

input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 15px;
  color: #222222;
  font-weight: 500;
}

button {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

/* DISABLED BUTTON: GREY + WHITE TEXT */
button:disabled,
#loginBtn:disabled {
  background: grey !important;
  color: #ffffff !important;
  border: 1px solid grey !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
  transform: none !important;
}

.error {
  color: red;
  font-size: 14px;
  margin-top: 10px;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
}

/* ================================================= */
/* CUSTOM POPUP SYSTEM */
/* ================================================= */

body.popup-open {
  overflow: hidden;
}

.custom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  animation: fadeIn 0.2s ease-out;
}

.custom-popup-content {
  background: white;
  padding: 24px 28px;
  border-radius: 16px;
  text-align: center;
  max-width: 320px;
  width: 85%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

@keyframes popUp {
  to { transform: scale(1); }
}

.custom-popup-content p {
  color: #333;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.4;
}

.custom-popup-content .btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.custom-popup-content button {
  width: auto;
  min-width: 90px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0;
}

.custom-popup-content #okBtn,
.custom-popup-content #yesBtn {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.custom-popup-content #noBtn,
.custom-popup-content #cancelBtn {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.custom-popup-content #okBtn:hover,
.custom-popup-content #yesBtn:hover,
.custom-popup-content #noBtn:hover,
.custom-popup-content #cancelBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-prompt-input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  margin-top: 10px;
  box-sizing: border-box; 
}


/* ================================================= */
/* SEAMLESS AUTO-LOGIN SPLASH & FLICKER PREVENTION   */
/* ================================================= */
html.auto-logging-in #loginScreen {
  display: none !important;
}

html.auto-logging-in #autoLoginSplash {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.auth-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
  margin-bottom: 16px;
}

@keyframes authSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



