/*
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
 * All portions are Copyright (C) 2017-2018 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************
*/

/* ==========================================================================
   Predictiv Clean Login — Modernised Styles
   ==========================================================================
   Standalone page: design tokens are NOT available here (no SmartClient).
   All values are inlined from the design system.
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: normal;
  color: #1F2937;
  background-color: #F9FAFB;
  overflow: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   HTML5 input resets
   ========================================================================== */

input {
  box-shadow: none;
}

input:-moz-ui-valid {
  box-shadow: none;
}

input:-moz-ui-invalid {
  box-shadow: none;
}

/* ==========================================================================
   Main layout — centred card
   ========================================================================== */

.Login_Main {
  background: none !important;
  background-color: #F9FAFB !important;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.Login_Container {
  background: none;
  width: 100%;
  max-width: 460px;
  padding: 24px;
  position: relative;
  top: auto;
  left: auto;
  margin: 0 auto;
}

/* ==========================================================================
   Login card
   ========================================================================== */

.Login_LogForm {
  background: #fff !important;
  position: relative;
  top: auto;
  left: auto !important;
  width: 100%;
  height: auto;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  padding: 40px 32px 32px;
  margin: 0;
  z-index: 99;
}

.Login_LogForm dl {
  padding-left: 0; /*~RTL   padding-right: 0; */
  position: relative;
}

.Login_LogForm dt {
  margin-bottom: 6px;
}

.Login_LogForm dd {
  margin-bottom: 20px;
}

/* ==========================================================================
   Company logo
   ========================================================================== */

.Login_LogForm_CompanyLogo_Container {
  height: auto;
  text-align: center;
  margin-bottom: 28px;
}

.Login_LogForm_CompanyLogo {
  padding-top: 0;
}

.Login_Logo_Company {
  width: 200px;
  height: 56px;
  background: url(Login/Predictiv_Logo.png) no-repeat center center !important;
  background-size: contain !important;
  margin: 0 auto;
  display: block;
}

/* ==========================================================================
   Input container
   ========================================================================== */

.Login_LogForm_Input_Container {
  height: auto;
}

/* ==========================================================================
   Labels
   ========================================================================== */

.LabelText {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  color: #374151 !important;
  font-size: 13px;
  font-weight: 600;
}

.Login_LabelText {
  font-size: 13px;
}

/* ==========================================================================
   Text inputs
   ========================================================================== */

.dojoValidateEmpty,
.dojoValidateInvalid,
.dojoValidateRange,
.dojoValidateValid,
.dojoValidateEmpty_focus,
.dojoValidateValid_focus,
.dojoValidateInvalid_focus,
.dojoValidateRange_focus {
  border: 1px solid #D1D5DB;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: #1F2937;
  background-color: #fff !important;
  background-image: none;
  padding: 8px 12px; /*~RTL   padding: 8px 12px; */
  height: auto;
  border-radius: 6px;
  resize: none;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.dojoValidateEmpty_focus,
.dojoValidateValid_focus,
.dojoValidateInvalid_focus,
.dojoValidateRange_focus,
.readonly_focus_required_focus,
.TextBox_focus,
.required_focus,
.readonly_focus_required_focus {
  border: 1px solid #5A88B8 !important;
  background-color: #fff !important;
  background-image: none;
  box-shadow: 0 0 0 3px rgba(90, 136, 184, 0.15);
}

.Login_TextBox,
.Login_TextBox_focus {
  background-color: #fff !important;
  width: 100%;
  height: auto;
  padding: 10px 12px;
  outline: none;
  border-radius: 6px;
  border: 1px solid #D1D5DB;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: #1F2937;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  -moz-outline-style: none;
}

.Login_TextBox:focus,
.Login_TextBox_focus {
  border-color: #5A88B8 !important;
  box-shadow: 0 0 0 3px rgba(90, 136, 184, 0.15);
}

/* ==========================================================================
   Button — pure CSS (hide PNG left/right caps)
   ========================================================================== */

.Login_LogForm_Button_Container {
  text-align: center;
  height: auto;
  padding-top: 8px;
}

.Login_LogForm_Button {
  margin-top: 0;
}

.Button_width {
  width: auto;
}

button.ButtonLink, button.ButtonLink:active, button.ButtonLink:hover,
button.ButtonLink:visited, button.ButtonLink:link, button.ButtonLink:focus,
button.ButtonLink_default, button.ButtonLink_disabled {
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  width: 100%;
}

button.ButtonLink_hover, button.ButtonLink_hover:active,
button.ButtonLink_hover:hover, button.ButtonLink_hover:visited,
button.ButtonLink_hover:link, button.ButtonLink_hover:focus {
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  width: 100%;
}

button.ButtonLink_active, button.ButtonLink_active:active,
button.ButtonLink_active:hover, button.ButtonLink_active:visited,
button.ButtonLink_active:link, button.ButtonLink_active:focus {
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  width: 100%;
}

button.ButtonLink_focus, button.ButtonLink_focus:active,
button.ButtonLink_focus:hover, button.ButtonLink_focus:visited,
button.ButtonLink_focus:link, button.ButtonLink_focus:focus {
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  width: 100%;
}

button.ButtonLink_default, button.ButtonLink_default:active,
button.ButtonLink_default:hover, button.ButtonLink_default:visited,
button.ButtonLink_default:link, button.ButtonLink_default:focus {
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  width: 100%;
}

/* Table container */
button.ButtonLink table.Button, .Button {
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  background-color: transparent;
  background-image: none;
  border: 0px none;
  width: 100%;
}

/* Hide left/right PNG caps */
button.ButtonLink table.Button .Button_left, table.Button .Button_left,
button.ButtonLink_hover table.Button .Button_left, table.Button_hover .Button_left,
button.ButtonLink_active table.Button .Button_left, .Button_active .Button_left,
button.ButtonLink_focus table.Button .Button_left, .Button_focus .Button_left,
button.ButtonLink_default table.Button .Button_left, .Button_default .Button_left,
button.ButtonLink_disabled table.Button .Button_left, .Button_disabled .Button_left {
  display: none;
  width: 0;
  padding: 0;
}

button.ButtonLink table.Button .Button_right, table.Button .Button_right,
button.ButtonLink_hover table.Button .Button_right, table.Button_hover .Button_right,
button.ButtonLink_active table.Button .Button_right, table.Button_active .Button_right,
button.ButtonLink_focus table.Button .Button_right, .Button_focus .Button_right,
button.ButtonLink_default table.Button .Button_right, .Button_default .Button_right,
button.ButtonLink_disabled table.Button .Button_right, table.ButtonLink_disabled .Button_right {
  display: none;
  width: 0;
  padding: 0;
}

/* Button text cell — the actual visible button */
button.ButtonLink table.Button .Button_text, table.Button .Button_text {
  background-image: none;
  background-color: #5A88B8;
  text-align: center;
  height: auto;
  min-height: 42px;
  padding: 10px 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  border-radius: 6px;
  transition: background-color 100ms ease;
  width: 100%;
}

/* Hover */
button.ButtonLink_hover table.Button, .Button_hover {
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  background-color: transparent;
  background-image: none;
  border: 0px none;
  width: 100%;
}

button.ButtonLink_hover table.Button .Button_text, table.Button_hover .Button_text {
  background-image: none;
  background-color: #4B79AC;
  height: auto;
  min-height: 42px;
  padding: 10px 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

/* Active/pressed */
button.ButtonLink_active table.Button, .Button_active {
  color: #fff;
}

button.ButtonLink_active table.Button .Button_text, table.Button_active .Button_text {
  background-image: none;
  background-color: #3D6491;
  height: auto;
  min-height: 42px;
  padding: 10px 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
}

/* Focus */
button.ButtonLink_focus table.Button .Button_text, table.Button_focus .Button_text {
  background-image: none;
  background-color: #5A88B8;
  height: auto;
  min-height: 42px;
  padding: 10px 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6B93C0;
}

/* Default */
button.ButtonLink_default table.Button, .Button_default {
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  background-color: transparent;
  background-image: none;
  border: 0px none;
  width: 100%;
}

button.ButtonLink_default table.Button .Button_text, table.Button_default .Button_text {
  background-image: none;
  background-color: #5A88B8;
  height: auto;
  min-height: 42px;
  padding: 10px 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

/* Disabled */
button.ButtonLink_disabled table.Button, .Button_disabled {
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: #9CA3AF;
  font-weight: 500;
  cursor: not-allowed;
  background-color: transparent;
  background-image: none;
  border: 0px none;
}

button.ButtonLink_disabled table.Button .Button_text, table.Button_disabled .Button_text {
  background-image: none;
  background-color: #E5E7EB;
  height: auto;
  min-height: 42px;
  padding: 10px 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #9CA3AF;
}

/* Hide button icon */
.Button_Icon {
  width: 0;
  height: 0;
  display: none;
}

/* ==========================================================================
   Error messages
   ========================================================================== */

.Login_ErrorMsg_Container {
  position: relative;
  overflow: auto;
  height: auto;
  bottom: auto;
  left: auto; /*~RTL   right: auto; */
  margin: 0;
  padding: 12px;
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 6px;
  margin-bottom: 8px;
}

.Login_ErrorMsg_Title {
  color: #991B1B !important;
  font-weight: 600;
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.Login_ErrorMsg_Content {
  color: #991B1B !important;
  font-weight: normal;
  font-size: 13px;
}

/* ==========================================================================
   Logos below the card
   ========================================================================== */

.Login_TopLogos_Container_Support_Forge,
.Login_TopLogos_Container_Support,
.Login_TopLogos_Container_Forge {
  display: none !important;
}

.Login_TopLogos_Container_None {
  display: none !important;
}

.Login_TopLogos_Container_Support_Forge .Login_TopLogos_SupportLogo_Container {
  display: none;
}

.Login_TopLogos_Container_Support .Login_TopLogos_ForgeLogo_Container {
  display: none;
}

.Login_TopLogos_Container_Support .Login_TopLogos_SupportLogo_Container {
  left: auto;
}

.Login_TopLogos_Container_Forge .Login_TopLogos_ForgeLogo_Container {
  left: auto;
}

.Login_TopLogos_Container_Forge .Login_TopLogos_SupportLogo_Container {
  display: none;
}

.Login_TopLogos_Container_None .Login_TopLogos_ForgeLogo_Container {
  display: none;
}

.Login_TopLogos_Container_None .Login_TopLogos_SupportLogo_Container {
  display: none;
}

.Login_TopLogos_SupportLogo_Container {
  width: auto;
  position: relative;
  float: none;
  text-align: center;
}

.Login_TopLogos_SupportLogo_Text {
  display: none;
}

.Login_TopLogos_SupportLogo_Logo_Container {
  text-align: center;
}

.Login_TopLogos_ForgeLogo_Container {
  width: auto;
  position: relative;
  float: none;
  text-align: center;
}

.Login_TopLogos_ForgeLogo_Text {
  display: none;
}

.Login_TopLogos_ForgeLogo_Logo_Container {
  display: none;
}

/* ==========================================================================
   Bottom branding
   ========================================================================== */

.Login_BottomLogos_Container {
  display: none !important;
}

.Login_BottomLogos_Openbravo_Logo_Container {
  height: auto;
  text-align: center;
}

.Login_Logo_Openbravo {
  width: 180px;
  height: 50px;
  background: url(Login/Predictiv_Logo.png) no-repeat center center !important;
  background-size: contain !important;
  margin: 0 auto;
  display: block;
}

.Login_BottomLogos_CopyrightText_Container {
  display: none;
  position: relative;
  clear: left;
  padding-top: 8px;
  background-color: transparent;
}

.Login_BottomLogos_CopyrightText {
  display: block;
  color: #9CA3AF;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.Login_Logo_Support {
  display: none;
}

.Login_Logo_Forge {
  display: none;
}

.Login_Logo_OBAttribution {
  display: none;
}

/* ==========================================================================
   Home / Error page logo
   ========================================================================== */

.Login_Home_Logo_Icon {
  display: block;
  margin: auto;
  padding: 50px 0 0 0;
  width: 520px;
  height: 120px;
  background: url(../../../../../utility/ShowImageLogo?logo=yourcompanybig) no-repeat center center;
}

.error-text {
  margin: 0 auto;
  padding: 50px 0 0 0;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 28px;
  color: #EF4444;
}

.Login_Img_Link img {
  border: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media all and (max-width: 520px) {
  .Login_Container {
    padding: 16px;
  }

  .Login_LogForm {
    padding: 32px 20px 24px;
    border-radius: 8px;
  }

  .Login_Home_Logo_Icon {
    padding: 7.5vw 0 0 0;
    width: 82%;
  }

  .error-text {
    padding: 7.5vw 0 0 0;
    font-size: 4.3vw;
  }
}

/* ---- Predictiv SSO + forgot-password (sso-login.js) ---- */
.predictiv-sso {
  max-width: 320px;
  margin: 16px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.predictiv-sso-btn {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #c7ccd6;
  border-radius: 6px;
  background: #fff;
  color: #1f2733;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s ease, border-color .15s ease;
}
.predictiv-sso-btn svg { flex-shrink: 0; display: block; }
.predictiv-sso-btn:hover {
  background: #f4f6fa;
  border-color: #9aa3b2;
}
.predictiv-forgot-link {
  background: none;
  border: none;
  color: #5d86d7;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
}
.predictiv-forgot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.predictiv-forgot-hint {
  color: #6b7280;
  font-size: 13px;
  margin: 0;
}
.predictiv-forgot-email {
  padding: 9px 12px;
  border: 1px solid #c7ccd6;
  border-radius: 6px;
  font-size: 14px;
}
.predictiv-sso-error {
  color: #c0392b;
  font-size: 13px;
  margin: 0 0 6px;
}
/* Shown in place of the login form while the return from the provider is exchanged.
   It occupies the height the form gave up, so the card does not collapse and reflow
   under the person mid-sign-in. */
.predictiv-sso-progress {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #55606f;
  font-size: 14px;
  text-align: center;
}
