/* Multi-Dimensions — Roundcube (Elastic) login page
   Tokens: ink #0A0C0E, navy #0A142F, accent #30A0D9, ice #ECF6FF, white, deep-blue #002C50.
   Type: Work Sans (Light display, ExtraLight Italic eyebrow). Radii: 7px control, 24.5px pill. */

@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url(../fonts/work-sans-300.woff2) format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/work-sans-400.woff2) format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/work-sans-500.woff2) format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: italic; font-weight: 200; font-display: swap; src: url(../fonts/work-sans-200-italic.woff2) format("woff2"); }

html,
html.dark-mode {
  background: #0A0C0E;
}

html body.task-login {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  --md-ink: #0A0C0E;
  --md-navy: #0A142F;
  --md-accent: #30A0D9;
  --md-ice: #ECF6FF;
  --md-white: #FFFFFF;
  --md-deep: #002C50;
  --md-edge: max(24px, 9.43vw);
  margin: 0;
  min-height: 100vh;
  background: var(--md-ink);
  color: var(--md-white);
  font-family: "Work Sans", system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ---- Ground: masked prism photograph under an ink fade + header scrim ---- */
html body.task-login #layout {
  position: relative;
  min-height: 100vh;
  height: auto;
  background:
    linear-gradient(90deg, #0A0C0E 0%, #0A0C0E 34%, rgba(10, 12, 14, 0.82) 50%, rgba(10, 12, 14, 0.25) 72%, rgba(10, 12, 14, 0) 100%),
    url(../images/hero.webp) right center / cover no-repeat,
    var(--md-ink);
  overflow-x: hidden;
}

html body.task-login #layout::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 117px;
  background: linear-gradient(180deg, #002C50 0%, rgba(2, 7, 1, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

html body.task-login #layout-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 140px var(--md-edge) 120px;
  text-align: left;
  background: transparent;
  box-sizing: border-box;
}

/* ---- Wordmark, top-left like the site header ---- */
html body.task-login #layout-content #logo {
  position: absolute;
  top: 22px;
  left: 22px;
  width: auto;
  height: 46px;
  max-width: 60vw;
  margin: 0;
  padding: 0;
  object-fit: contain;
}

/* ---- Editorial panel ---- */
html body.task-login .md-hero {
  max-width: 780px;
  margin: 0 0 40px;
}

html body.task-login .md-eyebrow {
  margin: 0 0 18px;
  font-style: italic;
  font-weight: 200;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--md-ice);
}

html body.task-login .md-title {
  margin: 0;
  font-family: "Work Sans", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(32px, 3.9vw, 64px);
  line-height: 1.31;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--md-white);
}

html body.task-login .md-title span {
  display: block;
}

html body.task-login .md-title .md-title-accent {
  font-weight: 400;
  color: var(--md-accent);
}

/* Hairline under the heading, ending in a thin arrow */
html body.task-login .md-rule {
  position: relative;
  display: block;
  width: min(100%, 560px);
  height: 1px;
  margin: 22px 0 20px;
  background: var(--md-accent);
}

html body.task-login .md-rule::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--md-accent);
  border-right: 1px solid var(--md-accent);
  transform: rotate(45deg);
}

html body.task-login .md-lede {
  max-width: 460px;
  margin: 0;
  font-size: 18px;
  line-height: 25px;
  font-weight: 300;
  color: var(--md-white);
}

/* ---- Form ---- */
html body.task-login #login-form {
  position: static;
  top: 0;
  width: min(100%, 420px);
  max-width: 420px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: left;
}

html body.task-login #login-form table,
html body.task-login #login-form tbody {
  display: block;
  width: 100%;
  margin: 0;
}

html body.task-login #login-form tr.form-group {
  display: block;
  margin: 0 0 16px;
}

html body.task-login #login-form td.input.input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(236, 246, 255, 0.45);
  border-radius: 7px;
  background: rgba(10, 12, 14, 0.6);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html body.task-login #login-form td.input.input-group:focus-within {
  border-color: var(--md-accent);
  box-shadow: 0 0 0 1px var(--md-accent);
}

html body.task-login #login-form .input-group-prepend {
  display: flex;
  margin: 0;
}

html body.task-login #login-form .input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  padding: 0;
  border: 0;
  border-radius: 7px 0 0 7px;
  background: transparent;
  color: rgba(236, 246, 255, 0.6);
  font-size: 16px;
}

html body.task-login #login-form td.input.input-group:focus-within .input-group-text {
  color: var(--md-accent);
}

html body.task-login #login-form input.form-control {
  flex: 1 1 auto;
  height: 100%;
  min-width: 0;
  padding: 0 16px 0 2px;
  border: 0;
  border-radius: 0 7px 7px 0;
  background: transparent;
  box-shadow: none;
  color: var(--md-white);
  font-family: "Work Sans", system-ui, sans-serif;
  font-weight: 300;
  font-size: 17px;
  letter-spacing: 0.01em;
}

html body.task-login #login-form input.form-control:focus {
  outline: none;
  box-shadow: none;
  background: transparent;
  color: var(--md-white);
}

html body.task-login #login-form input.form-control::placeholder {
  color: rgba(236, 246, 255, 0.55);
  opacity: 1;
}

/* Browser autofill would otherwise paint the field white */
html body.task-login #login-form input.form-control:-webkit-autofill,
html body.task-login #login-form input.form-control:-webkit-autofill:hover,
html body.task-login #login-form input.form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--md-white);
  caret-color: var(--md-white);
  -webkit-box-shadow: 0 0 0 1000px #0E1216 inset;
  transition: background-color 9999s ease-out 0s;
}

/* ---- Signature CTA pill ---- */
html body.task-login #login-form .formbuttons {
  margin: 28px 0 0;
  padding: 0;
  text-align: left;
}

html body.task-login #login-form #rcmloginsubmit {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 220px;
  height: 51px;
  padding: 0 32px;
  border: 0;
  border-radius: 24.5px;
  background-color: transparent;
  background-image: linear-gradient(90.1deg, rgb(48, 160, 217) 14.486%, rgba(48, 160, 217, 0.21) 55.392%, rgba(48, 160, 217, 0) 77.141%);
  background-size: 100% 100%;
  box-shadow: none;
  color: var(--md-white);
  font-family: "Work Sans", system-ui, sans-serif;
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  transition: background-size 0.25s ease;
}

html body.task-login #login-form #rcmloginsubmit:hover {
  background-size: 160% 100%;
}

html body.task-login #login-form #rcmloginsubmit:focus-visible {
  outline: 1px solid var(--md-ice);
  outline-offset: 3px;
}

html body.task-login #login-form #rcmloginsubmit:disabled {
  opacity: 0.6;
}

/* ---- Footer: hairline + uppercase legal line ---- */
html body.task-login #login-footer {
  position: absolute;
  left: var(--md-edge);
  right: var(--md-edge);
  bottom: 0;
  margin: 0;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(236, 246, 255, 0.18);
  background: transparent;
  color: rgba(236, 246, 255, 0.6);
  font-family: "Work Sans", system-ui, sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: left;
}

html body.task-login #login-footer a {
  color: var(--md-accent);
}

/* ---- Notices (wrong password etc.) ---- */
html body.task-login #messagestack > div {
  border-radius: 7px;
  font-family: "Work Sans", system-ui, sans-serif;
}

/* ---- Small screens: image becomes a quiet top band ---- */
@media (max-width: 860px) {
  html body.task-login #layout {
    background:
      linear-gradient(180deg, rgba(10, 12, 14, 0.45) 0%, rgba(10, 12, 14, 0.78) 24%, rgba(10, 12, 14, 0.9) 40%, #0A0C0E 62%),
      url(../images/hero.webp) 72% top / auto 62vh no-repeat,
      var(--md-ink);
  }

  html body.task-login #layout-content {
    justify-content: flex-start;
    padding: 120px 24px 110px;
  }

  html body.task-login #layout-content #logo {
    top: 18px;
    left: 16px;
    height: 38px;
  }

  html body.task-login .md-hero {
    margin-bottom: 32px;
  }

  html body.task-login .md-title {
    font-size: clamp(25px, 7.3vw, 34px);
  }

  html body.task-login .md-eyebrow {
    font-size: 15px;
    margin-bottom: 14px;
  }

  html body.task-login .md-rule {
    margin: 20px 0 18px;
  }

  html body.task-login .md-lede {
    font-size: 16px;
    line-height: 22px;
  }

  html body.task-login #login-form {
    width: 100%;
    max-width: none;
  }

  html body.task-login #login-form #rcmloginsubmit {
    width: 100%;
  }

  html body.task-login #login-footer {
    left: 24px;
    right: 24px;
  }
}
