/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  display: block;
  overflow-x: hidden;
}

/* Log In Page */
.logInPage {
  background-color: #f0f2f5; /* fallback colour */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background 0.5s ease;
  min-height: 100dvh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;

}

.login-box {
  background: #fff;
  padding: 1.5rem 2rem;
  width: 400px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: width 0.2s, height 0.2s;
  text-align: left;
}

.login-box h2 {
  margin-bottom: 1.2rem;
  font-weight: 600;
  font-size: 1.5rem;
}

.login-box input {
  width: 100%;
  padding: 12px;
  margin: 6px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: color 0.2s;
}

.login-box input.error {
  border: 1px solid red;
}

.login-box input.disabled {
  color: grey;
  cursor: not-allowed;
}

.login-box button {
  width: 100%;
  padding: 12px;
  margin: 6px 0;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  background: #0C1B26;
  color: white;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-box button:hover {
  background: #357ABD;
}

.login-box button.disabled {
  cursor: not-allowed;
  background: #222423;
  color: gray;
}

.login-box button.backButtonLogIn {
  background: #80D32C;
  color: black;
  width: fit-content;
  padding: 8px 8px;
  display: inline-flex;       /* ensures flex alignment inside the button */
  justify-content: flex-start; /* left-align content inside the button */
  position: relative;
  margin-left: 0;            /* overrides any inherited centering */
  text-align: left;  
  transition: color 0.2s, background 0.2s;
  font-size: 0.95rem;
  margin-top: 1rem;
}

.login-box button.backButtonLogIn:hover {
  background: #0C1B26;
  color: white;
}

.login-box button.backButtonLogIn.disabled {
  cursor: not-allowed;
  background: #222423;
  color: gray;
}

.logInError {
  color: red;
  display: none;
  margin-top: 1rem;
  font-size: 1rem;
}

.logInSpinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #80D32C;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.logInPage section.hidden {
  display: none;
}

.logInPage p {
  text-align: start;
  margin: 1rem 0;
}

.logInPage p.infoText {
  color: grey;
  font-style: italic;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.login-box.labSearch {
  width: 600px;
}

.logInPage ul {
  margin-top: 8px;
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  list-style: none;
  padding: 0;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-size: 0.95rem;
}

.logInPage ul.hidden {
  display: none;
}

.logInPage li {
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.logInPage li:hover{
  background-color: #0C1B26;
  color: #80D32C;
}

.logInPage li.no-results {
  color: grey;
  cursor: default;
}

.logInPage li.selected {
    background-color: #80D32C;
    color: black;
}

.logInPage table {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
  margin: 20px auto;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

.logInPage td {
  padding: 12px 15px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1rem;
  color: #333;
  text-align: left;
}

.logInPage tr:last-child td {
  border-bottom: none;
}

.logInPage td:nth-child(n+1) {
  font-style: italic;
}

.logInPage td:first-child {
  color: #0C1B26;
  font-weight: 600;
  width: 30%;
  font-style: normal;
}

/* Divider with lines */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1rem 0;
  color: #555;
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ccc;
  margin: 0 10px;
}

/* SSO buttons stacked */
.sso-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}

.sso-buttons button.disabled {
  cursor: not-allowed;
  background-color: #0C1B26;
  color: lightgrey;
  font-style: italic;
}

.sso-buttons button {
  width: 100%;
  padding: 12px;
  background-color: #eee;
  color: #333;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: background-color 0.2s, color 0.2s, font-style 0.2s;
}

/* Sign up centered at bottom */
.signup-container {
  margin-top: 1rem;
  text-align: center;
}

.signup-link {
  color: #0C1B26;
  text-decoration: none;
  font-weight: 600;
}

.signup-link:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 600px) {

  .logInPage {
    padding: 20px;
  }

  .login-box {
    width: 100%;
    height: auto;
    padding: 1rem 1.5rem;
    border-radius: 12px;
  }
}


/* Nav Bar */

.navBar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.navBar__container {
  background: #0C1B26;
  width: 100%;
  max-width: 100vw;
  min-height: clamp(50px, 8vh, 90px);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 0 20px;
  align-items: center;
}

.navBar__title {
  font-weight: bolder;
  color: #80D32C;
  font-size: 1.3rem;
  cursor: pointer;
  width: fit-content;
  transition: color 0.2s;
}

.navBar__title:hover {
  color: white;
}

.navBar__options__item {
  cursor: pointer;
  font-weight: bold;
}

.navBar__options__item_TEXT {
  color: white;
  transition: color 0.2s;
}

.navBar__options__item_TEXT:hover {
  color: #80D32C;
}

/* Page Loading Spinner */

.pageLoadingSpinner {
  position: fixed;
  inset: 0;
  background: #0C1B26;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.4s ease;
}

.pageLoadingSpinner_spinner__container{
  display: flex;
  justify-content: center;
  align-items: center;
}

.pageLoadingSpinner__spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-top-color: #80D32C;
  border-radius: 50%;
  animation: pageLoadingSpinnerSpin 1s linear infinite;
}

@keyframes pageLoadingSpinnerSpin {
  to { transform: rotate(360deg); }
}

.pageLoadingSpinner.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Footer */

.footer {
  width: 100%;
  max-width: 100%;
  min-height: clamp(50px, 8vh, 90px);
  background: #0C1B26;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  padding: 20px 40px;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
}
 
.footer_title {
  font-weight: bolder;
  font-size: 1.5rem;
  color: #80D32C;
  transition: color 0.2s;
  cursor: pointer;
  width: fit-content;
  align-items: center;
}
 
.footer_title:hover {
  color: white;
}
 
.footer__container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.footer_items {
  font-style: italic;
  color: white;
  cursor: pointer;
  width: fit-content;
  height: fit-content;
  transition: 0.2s color;
}

.footer_items:hover {
  color: #80D32C;
}

.footer_row_title {
  font-style: normal;
  cursor: default;
  font-weight: bold;
  margin-bottom: 10px;
}

.footer_row_title:hover {
  color: white;
}

.footer_items__container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 50%;
  justify-content: right;
}

.footer_rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Main Content */

main.mainContent {
  margin: 10px 20px;
}

main h1 {
  color: black;
}

main p {
  margin-top: 10px;
  width: auto;
  height: fit-content;
}

main hr.main-divider {
  border: none;
  height: 2px;
  background-color: #0C1B26;
  margin: 1rem 0;
  width: 100%;
}

/* Dashboard Apps */

.dashboardApps__container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: flex-start;
  padding: 1rem;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.dashboardApps__item {
  border: 2px solid #0C1B26;
  border-radius: 30px;
  min-height: clamp(50px, 2rem, 80px);
  background: #f0f2f5;
  cursor: pointer;
  padding: 10px 20px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
  
  flex: 1 1 20rem;
  min-width: 15rem;
  max-width: 20rem;
  min-height: clamp(50px, 2rem, 80px);
  box-sizing: border-box;

  transition: background-color 0.2s, color 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.dashboardApps__item.logOut {
  background-color: rgb(238, 64, 64);
}

.dashboardApps__item:hover {
  background-color: #0C1B26;
  color: white;
  border-color: #80D32C;
  transform: scale(1.1);
  box-shadow: #555 5px 5px;
}

.dashboardApps__item:hover .dashboardApps_item__Logo {
  background-color: white;
  color: #0C1B26;
}

.dashboardApps_item__Logo {
  background-color: #0C1B26;
  color: white;
  font-size: 3rem;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s, color 0.2s;
}

.dashboardApps_item__title {
  font-weight: 200;
  font-size: 1.1rem;
}

@media (max-width: 743px) {
  .dashboardApps__item {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }

  .dashboardApps__item:hover {
    transform: scale(1.05);
  }
}

/* Back Button (Return Button) */

.backButton {
  width: fit-content;
  cursor: pointer;
  padding: 10px 10px;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  margin-top: 1rem;
  border-radius: 6px;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  display: flex;
  gap: 10px;
  font-weight: bolder;
}

.backButton:hover {
  transform: scale(1.05);
}

.backButton.backButtonLMGreen {
  background: #80D32C;
  color: black;
}

.backButton.backButtonLMGreen:hover {
  background: #0C1B26;
  color: white;
}

.backButton.backButtonLMBlue {
  background: #0C1B26;
  color: white;
}

.backButton.backButtonLMBlue:hover {
  background: #80D32C;
  color: black;
}

/* Notification */

/* Container for stacking notifications */
#notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

/* Each notification */
.notification {
  min-width: 280px;
  max-width: 420px;
  padding: 15px 20px;
  border-radius: 12px;
  font-family: Arial, sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
}

.notification-message {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.4;
}

.notification button {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
}

/* Types */
.notification.success { background-color: #4CAF50; }
.notification.error   { background-color: #f44336; }
.notification.warning { background-color: #ff9800; }
.notification.info    { background-color: #2196F3; }