/* ------------------------------
   Global Box Sizing Fix
------------------------------ */
*, *::before, *::after {
  box-sizing: border-box; /* Ensures padding & border are included within width/height */
}

/* ------------------------------
   Base Reset & Page Layout
------------------------------ */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: #10243E;  /* Holm dark navy */
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* Fill screen vertically */
}

/* ------------------------------
   Login Form Container
------------------------------ */
.login-container {
  text-align: center;
  max-width: 380px;
  width: 100%;
  padding: 40px 30px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); /* Soft outer glow */
}

/* ------------------------------
   Logo Styling
------------------------------ */
.logo {
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------
   Heading: "Partner Portal"
------------------------------ */
h2 {
  font-size: 18px;
  margin: 0 0 15px;
  color: #ffb600;
  text-align: right;
}

/* ------------------------------
   Login Form Layout
------------------------------ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Spacing between inputs/buttons */
}

/* Label Styling */
label {
  text-align: left;
  font-weight: bold;
  color: #ffb600;
  font-size: 14px;
  display: block;
}

/* ------------------------------
   Icon inside Input
------------------------------ */
.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #999;
}

/* ------------------------------
   Text Input Styling
------------------------------ */
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 10px 10px 10px 36px; /* Space for icon */
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
  background-color: #fff;
  color: #000;
}

/* ------------------------------
   Checkbox Section
------------------------------ */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 14px;
  color: #fff;
}

/* ------------------------------
   Login Button Styling
------------------------------ */
button {
  width: 100%;
  max-width: 180px;       /* Controls how wide the button is */
  align-self: center;     /* Center inside the flex container */
  padding: 12px;
  font-size: 16px;
  background-color: transparent;
  color: #ffb600;
  border: 1px solid #ffb600;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s, color 0.2s;
  margin-top: 20px;
}

button:hover {
  background-color: #ffb600;
  color: #0f1f36;
}

/* ------------------------------
   MODAL STYLING FOR 2FA
------------------------------ */

/* Fullscreen Modal Overlay */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 31, 54, 0.8); /* Semi-transparent overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999; /* Ensures it's above all other elements */
}

/* Modal Content Box */
.modal-content {
  background-color: #0f1f36;
  padding: 30px 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  color: #fff;
  position: relative;
}

/* Header inside the modal */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 30px;
  color: #FFB600; /* unified brand yellow */
  margin: 0;
}

/* Close Button (X) */
.close-btn {
  font-size: 24px;
  cursor: pointer;
  color: #FFB600; /* unified brand yellow */
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background .15s ease, color .15s ease;
}
.close-btn:hover,
.close-btn:focus {
  background: rgba(255,182,0,0.15);
  outline: none;
}

/* Used to hide modal by default */
.hidden {
  display: none !important;
}

/* Notification Toast Styles */
.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1a1a1a;
  color: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 9999;
  font-family: "Segoe UI", sans-serif;
  transition: opacity 0.3s ease;
  max-width: 300px;
}

.notification-toast.success {
  border-left: 5px solid #43A047;
}

.notification-toast.error {
  border-left: 5px solid #E53935;
}

.notification-toast.warning {
  border-left: 5px solid #FDD835;
}

.notification-toast.info {
  border-left: 5px solid #007bff;
}

.code-input-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;        /* Prevent vertical stacking */
  margin: 10px auto 10px;
  max-width: 300px;
}

input.code-input {
  all: unset;
  display: inline-block;
  width: 42px;
  height: 50px;
  background-color: #ffffff;
  color: #0f1f36;
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.code-input:focus {
  border-color: #ffb600;
  box-shadow: 0 0 0 2px rgba(255, 182, 0, 0.3);
}

.qr-setup img#qrCodeImg {
  display: block;
  margin: 0 auto;
}

.dash {
  font-size: 26px;
  color: #ffb600;
  font-weight: bold;
  margin: 0 4px;
}

.code-input:focus {
  border-color: #ffb600;
  box-shadow: 0 0 0 2px rgba(255, 182, 0, 0.3);
}

#submit2faBtn {
  width: 140px;
  padding: 10px;
  font-size: 14px;
  margin: 10px auto 0;
  display: block;
}

/* ------------------------------
   Password Visibility Toggle (Font Awesome Icon)
------------------------------ */

/* Wrapper holds input + eye icon button */
.password-wrapper {
  position: relative; /* Needed for absolute positioning of the button inside */
}

/* Button that toggles password visibility */
.toggle-password {
  all: unset; /* Reset all inherited styles to avoid conflicts */
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  cursor: pointer;
  color: #999;         /* Neutral grey icon color */
  line-height: 1;
  padding: 0;
  background: none;    /* Ensure no background fill */
  border: none;        /* No border */
}

/* Make sure it doesn't change color or background on hover */
.toggle-password:hover {
  color: #999;         /* Fixed icon color even on hover */
  background: none;
}

/* Ensure Font Awesome icons scale properly inside button */
.toggle-password i {
  font-family: "Font Awesome 6 Free"; /* Use correct FA font */
  font-weight: 900; /* Required for solid icons like eye/eye-slash */
  pointer-events: none; /* Prevent accidental clicks inside the icon */
}

/* Version Display (Debug Mode) */
.version-display {
  position: fixed;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffc107;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  border: 1px solid rgba(255, 193, 7, 0.3);
  z-index: 9999;
}

.version-display.hidden {
  display: none;
}

/* ------------------------------
   PASSWORD RESET STYLING
------------------------------ */

/* Reset Password Link */
.reset-password-link {
  text-align: left;
  margin-top: 0;
  padding-top: 0;
}

.reset-password-link a {
  color: #FFB600;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.reset-password-link a:hover {
  color: #e6a300;
  text-decoration: underline;
}

/* Password Reset Modal - Make it wider */
#passwordResetModal .modal-content {
  max-width: 500px;
}

/* Password Reset Modal Button */
.reset-btn {
  width: 100%;
  margin-top: 25px;
  background-color: transparent;
  color: #FFB600;
  border: 1px solid #FFB600;
  padding: 14px 20px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reset-btn:hover {
  background-color: #FFB600;
  color: #0f1f36;
}

.reset-btn:disabled {
  background-color: transparent;
  border-color: #666;
  color: #666;
  cursor: not-allowed;
}

.reset-btn.confirmation {
  background-color: transparent;
  border-color: #e74c3c;
  color: #e74c3c;
}

.reset-btn.confirmation:hover {
  background-color: #e74c3c;
  color: #fff;
}

/* Password Reset Modal Content */
.password-reset-content {
  text-align: left;
}

.password-reset-content label {
  margin-bottom: 8px;
}

.password-reset-content p {
  color: #fff;
  line-height: 1.6;
  font-size: 15px;
}

.confirmation-message {
  display: none;
  color: #FFB600;
  font-size: 13px;
  margin-top: 10px;
  font-style: italic;
}

.confirmation-message.show {
  display: block;
}

/* ------------------------------
   Demo Banner (Top Left Corner)
------------------------------ */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  background-color: transparent;
  color: #10243E;
  font-weight: bold;
  font-size: 14px;
  z-index: 1000;
}

.demo-icon {
  width: 500px;
  height: 500px;
}

.demo-text {
  font-weight: bold;
  letter-spacing: 0.5px;
}