/* ==========================================================================
   Zimbra 2025 Harmony Skin Stylesheet - Exact Prudent Corporate Match
   ========================================================================== */

* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}

.ScreenReaderOnly {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.LoginScreen {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  min-height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: #0088c1 url("../img/new-back-ground-image.png") center top / cover no-repeat;
  background-attachment: fixed;
}

.modernCenter {
  flex: 1;
  padding: 40px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modernContentBox {
  background-color: #ffffff;
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.3);
  padding: 40px;
  width: 400px;
  max-width: 92vw;
  margin: 0 auto;
  position: relative;
  border-radius: 1px;
}

/* Logo */
.logo {
  margin-bottom: 6px;
}

.logo img,
.ImgLoginBanner img {
  height: 44px;
  display: block;
  margin-left: -9px;
  object-fit: contain;
}

.ImgLoginBanner {
  display: block;
}

/* Titles */
.signIn {
  font-size: 20px;
  padding: 16px 0 14px;
  color: #4d4d4d;
  font-weight: bold;
}

.subTitleText {
  font-size: 12px;
  color: #666666;
  margin: 0 0 16px;
  line-height: 1.4;
}

/* Form */
.form {
  border-collapse: collapse;
  margin: 0 auto;
  text-align: left;
  width: 100%;
}

.loginSection {
  padding: 0;
}

.zLoginFieldLabel {
  display: inline-block;
  padding: 2px 0 5px;
  color: #4d4d4d;
  font-size: 12px;
}

.zLoginFieldInput,
form#zLoginForm .form input[type='text'],
form#zLoginForm .form input[type='password'],
.form input[type='text'],
.form input[type='password'],
.form input[type='email'] {
  border: 1px solid #d9d9d9;
  padding: 6px 10px;
  width: 100%;
  height: 34px;
  box-sizing: border-box;
  margin-bottom: 12px;
  font-size: 13px;
  color: #333333;
  outline: none;
  border-radius: 1px;
  background: #ffffff;
  transition: border-color 0.2s ease;
}

.zLoginFieldInput:focus,
form#zLoginForm .form input[type='text']:focus,
form#zLoginForm .form input[type='password']:focus,
.form input[type='text']:focus,
.form input[type='password']:focus,
.form input[type='email']:focus {
  border-color: #0088c1;
  outline: none;
}

.passwordWrapper {
  position: relative;
}

.passwordWrapper #hideSpan,
.passwordWrapper #showSpan,
.passwordWrapper .pwdToggleSpan {
  position: absolute;
  z-index: 2;
  font-size: 10px;
  color: #4d4d4d;
  right: 10px;
  top: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: normal;
}

.passwordWrapper #hideSpan:hover,
.passwordWrapper #showSpan:hover,
.passwordWrapper .pwdToggleSpan:hover {
  color: #0088c1;
}

/* Actions Row (Sign In & Stay signed in) */
.signInAndLabel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: 16px;
}

.signInAndLabel > div {
  display: flex;
  align-items: center;
}

button.loginButton,
input.loginButton,
.btn-zimbra {
  background-color: #0088c1;
  color: #ffffff;
  font-size: 13px;
  padding: 7px 22px;
  border-radius: 3px;
  cursor: pointer;
  outline: none;
  border: none;
  font-weight: 500;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s ease;
}

button.loginButton:hover,
input.loginButton:hover,
button.loginButton:focus,
input.loginButton:focus,
.btn-zimbra:hover {
  background-color: #009adb;
}

.rememberCheckWrapper {
  display: flex;
  align-items: center;
  gap: 5px;
}

input#remember {
  margin: 0;
  cursor: pointer;
}

label#remember,
.rememberCheckWrapper label {
  color: #4d4d4d;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

/* Horizontal Rule Divider */
.form hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 14px 0 0;
}

/* Version Block */
.versionBlock {
  padding: 16px 40px 24px;
  background: #eeeeee;
  position: relative;
  margin: 16px -40px -40px;
}

.versionBlock label {
  display: block;
  padding-bottom: 5px;
  color: #4d4d4d;
  font-size: 12px;
}

select#client {
  width: 100%;
  background: #ffffff;
  height: 32px;
  outline: none;
  border: 1px solid #d9d9d9;
  border-radius: 1px;
  padding: 4px 8px;
  font-size: 12px;
  color: #333333;
}

select#client:focus {
  border-color: #0088c1;
}

.alignWhatsThis {
  position: absolute;
  top: 6px;
  right: -24px;
  width: 16px;
  height: 16px;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-weight: bold;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.alignWhatsThis:hover {
  background: #0088c1;
}

/* Help / Tooltip Popup */
#ZLoginWhatsThis {
  display: none;
}

.LoginScreen .ZLoginInfo {
  position: absolute;
  z-index: 30;
  bottom: 85%;
  left: 10px;
  right: 10px;
  padding: 20px 22px;
  border: none;
  border-radius: 3px;
  background-color: #ffffff;
  box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.35);
  color: #4d4d4d;
}

.LoginScreen .ZLoginInfo p {
  font-size: 12px;
  margin: 0 0 10px;
  line-height: 1.4;
}

.LoginScreen .ZLoginInfo p strong {
  font-size: 13px;
  color: #0088c1;
}

#dialogCloseButton {
  position: absolute;
  font-size: 20px;
  right: 12px;
  top: 8px;
  cursor: pointer;
  color: #888888;
  font-weight: bold;
}

#dialogCloseButton:hover {
  color: #333333;
}

/* Messages / Alerts */
.errorMessage {
  border: 0;
  background-color: #efcbcb;
  padding: 10px 40px;
  font-size: 12px;
  color: #721c24;
  text-align: left;
  border-bottom: 1px solid #f72525;
  margin: 0 -40px 12px;
}

.infoMessage,
.successMessage {
  border: 0;
  background-color: #d4edda;
  padding: 10px 40px;
  font-size: 12px;
  color: #155724;
  text-align: left;
  border-bottom: 1px solid #28a745;
  margin: 0 -40px 12px;
}

/* Password rules checklist */
.passwordRuleBox {
  background: #f9f9f9;
  border: 1px solid #e5e5e5;
  padding: 10px 12px;
  margin: 8px 0 12px;
  font-size: 11px;
  color: #555555;
  border-radius: 2px;
}

.passwordRuleBox ul {
  margin: 4px 0 0 14px;
  padding: 0;
}

.passwordRuleBox li {
  margin-bottom: 2px;
}

.zimbraLink {
  color: #007CC3;
  text-decoration: none;
  font-size: 12px;
}

.zimbraLink:hover {
  text-decoration: underline;
}

/* Admin Console Top Bar & Badge */
.adminHeaderBadge {
  background: #232c3d;
  color: #ffffff;
  padding: 10px 40px;
  margin: -40px -40px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.adminHeaderBadge span {
  color: #e2ecf5;
}

.adminPortTag {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-family: monospace;
}

.adminBadgeTag {
  display: inline-block;
  background: #eef5fb;
  color: #007cc3;
  border: 1px solid #bce1f5;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 2px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Footer Copyright */
.Footer {
  text-align: center;
  width: 100%;
  padding: 12px 10px 20px;
  z-index: 10;
}

.legalNotice-small,
.LoginScreen .copyright {
  cursor: default;
  margin-bottom: 5px;
  font-size: 12px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  font-family: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
}

.decor1, .decor2 {
  display: none;
}

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

@media (max-width: 480px) {
  .modernCenter {
    padding: 20px 10px 10px;
  }

  .modernContentBox {
    padding: 24px 20px;
    width: 100%;
    max-width: 95vw;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .logo img,
  .ImgLoginBanner img {
    height: 32px;
  }

  .signIn {
    font-size: 18px;
    padding: 12px 0 10px;
  }

  .versionBlock {
    padding: 14px 20px 20px;
    margin: 14px -20px -24px;
  }

  .errorMessage,
  .infoMessage,
  .successMessage {
    padding: 8px 20px;
    margin: 0 -20px 12px;
  }

  .adminHeaderBadge {
    padding: 8px 20px;
    margin: -24px -20px 16px;
  }

  .signInAndLabel {
    flex-wrap: wrap;
    gap: 12px;
  }

  .legalNotice-small,
  .LoginScreen .copyright {
    font-size: 11px;
    padding: 0 10px;
  }

  .LoginScreen .ZLoginInfo {
    left: 5px;
    right: 5px;
    padding: 15px;
    bottom: 95%;
  }
}

@media (max-width: 360px) {
  .modernContentBox {
    padding: 20px 16px;
  }

  .versionBlock {
    padding: 12px 16px 18px;
    margin: 12px -16px -20px;
  }

  .errorMessage,
  .infoMessage,
  .successMessage {
    padding: 8px 16px;
    margin: 0 -16px 12px;
  }

  .signInAndLabel {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  button.loginButton,
  input.loginButton {
    width: 100%;
    text-align: center;
  }
}

@media (max-height: 650px) {
  .modernCenter {
    padding: 15px 0 10px;
  }
  .LoginScreen {
    position: relative;
    min-height: 100vh;
  }
}
