/* ============================================================
   MLW theme for the DMIS sign-in pages (/login/): sign in, forgot and
   reset password, forced password change, signed out.
   Needs brand.css. Loaded after Bootstrap 3 and the shared plugin styles,
   so everything is scoped to body.mlw-auth to win without !important.
   Layout: a brand pane (Emerald, lockup, CREATOR photo) beside the form.
   ============================================================ */

body.mlw-auth { margin: 0; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 16px; font-weight: 400; line-height: 1.5; text-align: left; -webkit-font-smoothing: antialiased; }
.mlw-auth a { color: var(--accent-ink); text-decoration: none; }
.mlw-auth a:hover, .mlw-auth a:focus { color: var(--block-2); text-decoration: underline; text-underline-offset: 3px; }
/* buttons that are links keep their own colours */
.mlw-auth a.ed-btn, .mlw-auth a.ed-btn:hover, .mlw-auth a.ed-btn:focus { text-decoration: none; }
.mlw-auth a.ed-btn-forest, .mlw-auth a.ed-btn-forest:hover, .mlw-auth a.ed-btn-forest:focus { color: #fff; }
.mlw-auth a.ed-btn-outline, .mlw-auth a.ed-btn-outline:hover, .mlw-auth a.ed-btn-outline:focus { color: var(--emerald); }
/* Sizes are in px: Bootstrap 3 sets html{font-size:10px}, so rem would differ
   between pages that load it and pages that don't. */
.mlw-auth :focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.mlw-auth h1, .mlw-auth h2, .mlw-auth p { font-family: var(--sans); }

/* The CREATOR photo is shown whole and edge to edge: its box is exactly 3:2 at
   the brand pane's full width. So the pane is as wide as the photo can be while
   it still fits under the header in one screen (height x 1.5), leaving the
   form at least 420px. Any spare height goes to the header, never beside the
   photo. --au-head is the header's height, rule included. */
.au-shell { --au-head: 222px; display: grid; grid-template-columns: min(calc((100vh - var(--au-head)) * 1.5), calc(100vw - 420px)) minmax(0, 1fr); min-height: 100vh; }

/* ---------- brand pane ---------- */
.au-brand { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; background: var(--block); color: #fff; }
.au-brand-head { flex: 1 0 auto; box-sizing: border-box; min-height: var(--au-head); padding: 30px clamp(24px, 3vw, 48px) 26px; border-bottom: 4px solid var(--mustard); }
.mlw-auth .au-brand .lockup a, .mlw-auth .au-brand .lockup a:hover, .mlw-auth .au-brand .lockup a:focus { color: #fff; text-decoration: none; }
.au-brand-copy { margin-top: 24px; }
/* two lines at most, so the header keeps its height */
.au-title { margin: 0; font-size: clamp(28px, 16px + 1.3vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.04; color: #fff; }
.au-title .ed-em { color: var(--mustard); }
/* The photo (1500x1000, from mlw.mw): a 3:2 box at full width, nothing cut off */
.au-photo { position: relative; flex: none; aspect-ratio: 3 / 2; margin: 0; }
.au-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.au-photo figcaption { position: absolute; left: 0; bottom: 0; padding: 9px 16px; background: var(--block); font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.9); }

/* ---------- form pane ---------- */
.au-main { display: flex; flex-direction: column; min-width: 0; background: var(--paper); }
.au-main-inner { display: flex; flex: 1; flex-direction: column; justify-content: center; width: 100%; max-width: 448px; margin: 0 auto; padding: 56px 24px; box-sizing: border-box; }
.au-eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.mlw-auth .au-h1 { margin: 0; font-size: clamp(30px, 24px + 1vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; color: var(--heading); }
.au-sub { margin: 12px 0 28px; font-size: 16.5px; line-height: 1.55; color: var(--text-2); }
.au-note { margin: 18px 0 0; font-size: 14px; color: var(--label); }
.au-help { margin: 32px 0 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.55; color: var(--text-2); }
.mlw-auth .au-help a { font-weight: 700; }

/* messages */
.au-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 22px; padding: 12px 16px; border-left: 4px solid; font-size: 15px; font-weight: 600; line-height: 1.45; text-align: left; }
.au-alert svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; }
.au-alert > div { min-width: 0; }
.au-alert-error { border-color: var(--crit); background: #FBEDED; color: #8A2626; }
.au-alert-ok { border-color: var(--ok); background: var(--sage-tint); color: #16523A; }
.au-alert-info { border-color: var(--warn); background: #FBF4E4; color: #6B4A0E; }
#msg .au-alert { margin: 18px 0 0; }

/* fields */
.au-field { margin: 0 0 18px; }
.mlw-auth .au-field > label, .au-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 7px; font-size: 14.5px; font-weight: 700; color: var(--text); }
.mlw-auth .au-label label { margin: 0; font-weight: 700; }
.mlw-auth .au-label a { font-size: 14px; font-weight: 600; }
.au-input { position: relative; }
.au-input > svg { position: absolute; z-index: 3; top: 50%; left: 15px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--label); pointer-events: none; }
.mlw-auth .au-input input.form-control { height: 50px; padding: 0 14px 0 46px; border: 1.5px solid #B6BFB9; border-radius: 10px; background: #fff; box-shadow: none; color: var(--text); font-family: var(--sans); font-size: 16px; }
.mlw-auth .au-input input.form-control:focus { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(34,82,69,.16); outline: none; }
.mlw-auth .au-input input.form-control[readonly], .mlw-auth .au-input input.form-control[disabled] { background: var(--bg); color: var(--text-2); cursor: default; }
.mlw-auth .au-input input::placeholder { color: #8A958F; }
.au-input.has-reveal input.form-control { padding-right: 84px; }
.au-reveal { position: absolute; z-index: 3; top: 50%; right: 6px; height: 38px; padding: 0 12px; transform: translateY(-50%); border: 0; border-radius: 8px; background: transparent; color: var(--accent-ink); font-family: var(--sans); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.au-reveal:hover { background: var(--sage-tint); }
.au-hint { display: block; margin-top: 6px; font-size: 13.5px; color: var(--label); }

/* project picker: MlwCombobox's input-group + bootstrap-select 1.12 */
.au-project .au-input > svg { top: 25px; } /* centre on the 50px button, not the plugin's wrapper */
.au-project .input-group { display: block; width: 100%; }
.au-project .input-group-addon { display: none; }
/* Bootstrap floats .form-control inside .input-group, collapsing the wrapper */
.mlw-auth .au-project .input-group .bootstrap-select.form-control { float: none; display: block; }
.mlw-auth .au-project .bootstrap-select { width: 100% !important; } /* the plugin sets an inline width */
.mlw-auth .au-project .bootstrap-select > .dropdown-toggle { height: 50px; padding: 0 40px 0 46px; border: 1.5px solid #B6BFB9; border-radius: 10px; background: #fff; box-shadow: none; color: var(--text); font-family: var(--sans); font-size: 16px; font-weight: 400; text-align: left; }
.mlw-auth .au-project .bootstrap-select > .dropdown-toggle.bs-placeholder .filter-option { color: #8A958F; }
.mlw-auth .au-project .bootstrap-select > .dropdown-toggle:focus, .mlw-auth .au-project .bootstrap-select.open > .dropdown-toggle { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(34,82,69,.16); outline: none !important; }
.mlw-auth .au-project .bootstrap-select .bs-caret .caret { right: 16px; border-top-color: var(--label); }
.mlw-auth .bootstrap-select .dropdown-menu { margin-top: 6px; padding: 6px; border: 1.5px solid var(--line); border-radius: 10px; box-shadow: 0 18px 40px -18px rgba(18,42,34,.45); }
.mlw-auth .bootstrap-select .dropdown-menu.inner { margin: 0; padding: 0; border: 0; box-shadow: none; }
/* the plugin sizes the menu to its longest option; keep it to the field's width */
.mlw-auth .au-project .bootstrap-select > .dropdown-menu { width: 100%; min-width: 0 !important; }
.mlw-auth .au-project .bootstrap-select .dropdown-menu li a { white-space: normal; }
.mlw-auth .bootstrap-select .bs-searchbox { padding: 4px 4px 8px; }
.mlw-auth .bootstrap-select .bs-searchbox input.form-control { height: 42px; padding: 0 12px; border: 1.5px solid #B6BFB9; border-radius: 8px; box-shadow: none; font-size: 15px; }
.mlw-auth .bootstrap-select .bs-searchbox input.form-control:focus { border-color: var(--emerald); }
.mlw-auth .bootstrap-select .dropdown-menu li a { padding: 9px 12px; border-radius: 6px; color: var(--text); font-size: 15px; }
.mlw-auth .bootstrap-select .dropdown-menu li a:hover, .mlw-auth .bootstrap-select .dropdown-menu li a:focus, .mlw-auth .bootstrap-select .dropdown-menu li.active a { background: var(--sage-tint); color: var(--emerald); outline: none; }
.mlw-auth .bootstrap-select .dropdown-menu li.selected a { background: var(--emerald); color: #fff; }
.mlw-auth .bootstrap-select .dropdown-menu li.selected a .check-mark { color: var(--mustard); }
.mlw-auth .bootstrap-select .no-results { margin: 0; padding: 10px 12px; background: var(--bg); color: var(--text-2); font-size: 14.5px; }

/* actions */
.mlw-auth .au-submit { width: 100%; min-height: 52px; margin-top: 8px; font-size: 15px; }
.mlw-auth .au-submit:disabled { opacity: .7; cursor: default; }
.au-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* full-page states: maintenance, signed out, reset done or failed */
.au-state-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 0 22px; border-radius: 50%; }
.au-state-icon svg { width: 28px; height: 28px; }
.au-state-icon.ok { background: var(--sage-tint); color: var(--ok); }
.au-state-icon.warn { background: #FBF4E4; color: var(--warn); }
.au-state-icon.crit { background: #FBEDED; color: var(--crit); }

/* footer of the form pane */
.au-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 18px 24px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--label); }
.au-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.mlw-auth .au-foot a { color: var(--text-2); }

/* Zebra dialogs (forced password change) in brand colours */
.mlw-auth .ZebraDialog { border-radius: 12px; font-family: var(--sans); }
.mlw-auth .ZebraDialog .ZebraDialog_Title { background: var(--block); color: #fff; }
.mlw-auth .ZebraDialog .ZebraDialog_Buttons a { border-radius: 999px; background: var(--emerald); color: #fff; }

@media (max-width: 900px) {
  .au-shell { grid-template-columns: 1fr; }
  .au-brand { min-height: 0; }
  .au-brand-head { flex: none; min-height: 0; padding: 22px 20px 24px; }
  .au-brand-copy { margin-top: 20px; }
  .au-title { font-size: 30px; }
  .au-main-inner { justify-content: flex-start; padding: 36px 20px 48px; }
  .au-foot { padding: 16px 20px; }
}
