:root {
  --myrm-brand-color: #fddd04;
  --myrm-brand-color-hover: #e6c803;
  --myrm-brand-text: #000000;
  --myrm-bg-overlay: rgba(30, 35, 45, 0.85);
  --myrm-surface: #ffffff;
  --myrm-surface-muted: #f8f9fa;
  --myrm-text: #17212b;
  --myrm-text-muted: #65717d;
  --myrm-border: #d8dee8;
  --myrm-danger: #b42318;
  --myrm-info: #0b5cad;
  --myrm-shadow-panel: 0 20px 40px rgba(0, 0, 0, 0.4);
  --myrm-focus-ring: 0 0 0 3px rgba(253, 221, 4, 0.32);
}

@media (prefers-color-scheme: dark) {
  :root {
    --myrm-bg-overlay: rgba(15, 18, 22, 0.92);
    --myrm-surface: #212529;
    --myrm-surface-muted: #2b3035;
    --myrm-text: #f1f3f5;
    --myrm-text-muted: #c1c7ce;
    --myrm-border: #3e464f;
    --myrm-danger: #ffb4ab;
    --myrm-info: #9dccff;
  }
}

html.login-pf,
html.login-pf body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

html.login-pf body {
  -webkit-overflow-scrolling: touch;
}

html.login-pf body.myrm-body {
  align-items: center;
  background-color: #333333;
  background-image: url("../img/loginbackground.jpg");
  background-position: center;
  background-size: cover;
  color: var(--myrm-text);
  display: flex;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
  overflow-y: auto;
  padding: 0;
  position: relative;
}

.myrm-bg-overlay-layer {
  background: var(--myrm-bg-overlay);
  backdrop-filter: blur(5px);
  inset: 0;
  position: fixed;
  z-index: 0;
}

body.myrm-kiosk {
  background: var(--myrm-surface) none !important;
}

body.myrm-kiosk .myrm-bg-overlay-layer,
body.myrm-kiosk .myrm-col-info,
body.myrm-kiosk .myrm-top-actions {
  display: none;
}

body.myrm-kiosk .myrm-wrapper {
  max-width: none;
  padding: 0;
}

body.myrm-kiosk .myrm-login-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 100vh;
}

body.myrm-kiosk .myrm-col-form {
  min-height: 100vh;
}

@supports (min-height: 100dvh) {
  html.login-pf body.myrm-body,
  body.myrm-kiosk .myrm-login-card,
  body.myrm-kiosk .myrm-col-form {
    min-height: 100dvh;
  }
}

.myrm-top-actions {
  display: flex;
  gap: 8px;
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 20;
}

.myrm-top-button {
  align-items: center;
  background: rgba(18, 22, 28, 0.66);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  text-decoration: none;
}

.myrm-top-button:focus-visible {
  outline: none;
  box-shadow: var(--myrm-focus-ring);
}

.myrm-lang-menu {
  position: relative;
}

.myrm-lang-menu summary {
  list-style: none;
}

.myrm-lang-menu summary::-webkit-details-marker {
  display: none;
}

.myrm-lang-list {
  background: var(--myrm-surface);
  border: 1px solid var(--myrm-border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  list-style: none;
  margin: 8px 0 0;
  min-width: 160px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 100%;
}

.myrm-lang-list a {
  border-radius: 6px;
  color: var(--myrm-text);
  display: block;
  padding: 8px 10px;
  text-decoration: none;
}

.myrm-lang-list a:hover,
.myrm-lang-list a:focus,
.myrm-lang-list a.myrm-active {
  background: rgba(253, 221, 4, 0.22);
}

.myrm-wrapper {
  max-width: 1100px;
  padding: 15px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.myrm-login-card {
  background: var(--myrm-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: var(--myrm-shadow-panel);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  min-height: 600px;
  overflow: hidden;
}

.myrm-col-form,
.myrm-col-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}

.myrm-col-info {
  background: var(--myrm-surface-muted);
  border-left: 1px solid var(--myrm-border);
  gap: 32px;
}

.myrm-col-form > .myrm-logo-link,
.myrm-col-form > .myrm-logo,
.myrm-logo {
  align-self: flex-start;
  display: block;
  margin-bottom: 32px;
}

.myrm-logo-link {
  border-radius: 8px;
  line-height: 0;
  text-decoration: none;
}

.myrm-logo-link:focus-visible {
  box-shadow: var(--myrm-focus-ring);
  outline: none;
}

.myrm-logo-link .myrm-logo,
.myrm-logo {
  height: auto;
  margin-bottom: 0;
  max-height: 70px;
  max-width: 280px;
  object-fit: contain;
  width: auto;
}

.myrm-title {
  color: var(--myrm-text);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 8px;
}

.myrm-subtitle,
.myrm-info-block p {
  color: var(--myrm-text-muted);
  line-height: 1.5;
}

.myrm-subtitle {
  margin: 0 0 28px;
}

.myrm-form {
  width: 100%;
}

.myrm-field {
  margin-bottom: 16px;
  position: relative;
}

.myrm-input {
  background: var(--myrm-surface);
  border: 1px solid var(--myrm-border);
  border-radius: 8px;
  color: var(--myrm-text);
  font: inherit;
  line-height: 1.4;
  min-height: 58px;
  padding: 23px 14px 9px;
  width: 100%;
}

.myrm-input:focus {
  border-color: var(--myrm-brand-color);
  box-shadow: var(--myrm-focus-ring);
  outline: none;
}

.myrm-input[readonly] {
  opacity: 0.72;
}

.myrm-input.myrm-invalid {
  border-color: var(--myrm-danger);
}

.myrm-identity-field .myrm-input {
  padding-right: 82px;
}

.myrm-identity-field label {
  max-width: calc(100% - 96px);
}

.myrm-sso-button {
  align-items: center;
  background: var(--myrm-surface-muted);
  border: 0;
  border-left: 1px solid var(--myrm-border);
  border-radius: 0 7px 7px 0;
  bottom: 1px;
  color: var(--myrm-text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  min-width: 64px;
  padding: 0 12px;
  position: absolute;
  right: 1px;
  top: 1px;
  z-index: 2;
}

.myrm-identity-field:focus-within .myrm-sso-button {
  border-left-color: var(--myrm-brand-color);
}

.myrm-sso-button:hover,
.myrm-sso-button:focus-visible {
  background: var(--myrm-brand-color);
  color: var(--myrm-brand-text);
  outline: none;
}

.myrm-sso-button:focus-visible {
  box-shadow: inset 0 0 0 2px var(--myrm-brand-text);
}

.myrm-sso-button:disabled {
  cursor: default;
  opacity: 0.64;
}

.myrm-field label {
  color: var(--myrm-text-muted);
  left: 14px;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  top: 20px;
  transform-origin: left top;
  transition: color 0.18s ease, transform 0.18s ease;
}

.myrm-field .myrm-input:focus + label,
.myrm-field .myrm-input:not(:placeholder-shown) + label {
  color: var(--myrm-text-muted);
  transform: translateY(-10px) scale(0.82);
}

.myrm-password-field .myrm-input {
  padding-right: 54px;
}

.myrm-password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--myrm-text-muted);
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 38px;
}

.myrm-password-toggle:hover,
.myrm-password-toggle:focus-visible {
  color: var(--myrm-text);
  outline: none;
  box-shadow: var(--myrm-focus-ring);
}

#myrm-password-section-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 98px;
}

#myrm-password-section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  visibility: visible;
}

#myrm-password-section.myrm-password-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  visibility: hidden;
}

.myrm-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 12px;
}

.myrm-forgot-row a {
  color: var(--myrm-info);
  text-decoration: none;
}

.myrm-forgot-row a:hover {
  text-decoration: underline;
}

.myrm-alert-area {
  margin-bottom: 16px;
  min-height: 58px;
}

.myrm-alert {
  align-items: center;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  line-height: 1.4;
  margin: 0;
  min-height: 50px;
  padding: 12px 14px;
}

.myrm-alert-error,
.myrm-alert-danger {
  background: rgba(180, 35, 24, 0.12);
  color: var(--myrm-danger);
}

.myrm-alert-info,
.myrm-alert-success,
.myrm-alert-warning {
  background: rgba(11, 92, 173, 0.12);
  color: var(--myrm-info);
}

.myrm-field-alert {
  margin: -4px 0 16px;
}

.myrm-inline-spinner {
  animation: myrm-spin 0.75s linear infinite;
  border: 2px solid currentColor;
  border-radius: 999px;
  border-right-color: transparent;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.myrm-support-info {
  background: rgba(253, 221, 4, 0.16);
  border: 1px solid rgba(253, 221, 4, 0.4);
  border-radius: 8px;
  color: var(--myrm-text);
  line-height: 1.45;
  margin-top: 10px;
  padding: 12px 14px;
}

.myrm-support-info p {
  margin: 0 0 8px;
}

.myrm-support-info p:last-child {
  margin-bottom: 0;
}

.myrm-support-action {
  color: var(--myrm-info);
  font-weight: 700;
  text-decoration: none;
}

.myrm-support-action:hover,
.myrm-support-action:focus {
  text-decoration: underline;
}

.myrm-check-options {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.myrm-check {
  align-items: flex-start;
  color: var(--myrm-text-muted);
  display: flex;
  font-size: 14px;
  gap: 10px;
  line-height: 1.45;
  margin-bottom: 0;
}

.myrm-check[hidden] {
  display: none !important;
}

.myrm-check input {
  accent-color: var(--myrm-brand-color);
  flex: 0 0 auto;
  margin-top: 2px;
}

.myrm-btn-primary,
.myrm-btn-secondary {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 10px;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  text-decoration: none;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.myrm-btn-primary {
  background: var(--myrm-brand-color);
  border: 0;
  color: var(--myrm-brand-text);
  width: 100%;
}

.myrm-btn-primary:hover,
.myrm-btn-primary:focus-visible {
  background: var(--myrm-brand-color-hover);
  box-shadow: 0 4px 12px rgba(253, 221, 4, 0.4);
  color: var(--myrm-brand-text);
  outline: none;
}

.myrm-btn-primary:disabled {
  cursor: wait;
  opacity: 0.78;
}

.myrm-reset-actions {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.myrm-reset-submit {
  order: -1;
}

.myrm-secondary-link {
  color: var(--myrm-info);
  font-weight: 600;
  justify-self: center;
  text-decoration: none;
}

.myrm-secondary-link:hover,
.myrm-secondary-link:focus {
  text-decoration: underline;
}

.myrm-update-password-actions {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.myrm-update-password-cancel {
  justify-self: center;
}

.myrm-update-password-check {
  margin-bottom: 16px;
}

.myrm-required-note {
  color: var(--myrm-text-muted);
  display: flex;
  gap: 6px;
  margin: 0 0 16px;
}

.myrm-profile-form {
  display: grid;
  gap: 16px;
}

.myrm-profile-form > div {
  margin: 0;
}

.myrm-profile-form label {
  color: var(--myrm-text);
  display: inline-flex;
  font-weight: 600;
  gap: 4px;
  margin-bottom: 6px;
}

.myrm-profile-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.myrm-profile-form select,
.myrm-profile-form textarea {
  background: var(--myrm-surface);
  border: 1px solid var(--myrm-border);
  border-radius: 8px;
  color: var(--myrm-text);
  font: inherit;
  line-height: 1.4;
  min-height: 48px;
  padding: 11px 14px;
  width: 100%;
}

.myrm-profile-form textarea {
  min-height: 96px;
  resize: vertical;
}

.myrm-profile-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.myrm-profile-form select:focus,
.myrm-profile-form textarea:focus {
  border-color: var(--myrm-brand-color);
  box-shadow: var(--myrm-focus-ring);
  outline: none;
}

.myrm-profile-form input[aria-invalid="true"],
.myrm-profile-form select[aria-invalid="true"],
.myrm-profile-form textarea[aria-invalid="true"] {
  border-color: var(--myrm-danger);
}

.myrm-profile-form input:disabled,
.myrm-profile-form select:disabled,
.myrm-profile-form textarea:disabled {
  opacity: 0.72;
}

.myrm-profile-form [id^="form-help-text-"] {
  color: var(--myrm-text-muted);
  line-height: 1.45;
  margin: 6px 0;
}

.myrm-profile-form [id^="input-error-"] {
  color: var(--myrm-danger);
  display: block;
  font-weight: 600;
  line-height: 1.45;
  margin-top: 6px;
}

.myrm-profile-actions {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.myrm-btn-secondary.myrm-profile-cancel {
  min-height: 48px;
  width: 100%;
}

.myrm-broker-link-form {
  margin-top: 24px;
}

.myrm-broker-actions {
  display: grid;
  gap: 12px;
}

.myrm-btn-secondary.myrm-broker-secondary {
  min-height: 48px;
  width: 100%;
}

.myrm-idp-email-actions {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.myrm-idp-email-action {
  background: var(--myrm-surface-muted);
  border: 1px solid var(--myrm-border);
  border-radius: 8px;
  color: var(--myrm-text-muted);
  line-height: 1.5;
  margin: 0;
  padding: 14px;
}

.myrm-idp-email-action a {
  color: var(--myrm-info);
  font-weight: 700;
  text-decoration: none;
}

.myrm-idp-email-action a:hover,
.myrm-idp-email-action a:focus {
  text-decoration: underline;
}

.myrm-page-expired-actions {
  display: grid;
  gap: 14px;
}

.myrm-page-expired-note {
  color: var(--myrm-text-muted);
  line-height: 1.5;
  margin: 10px 0 0;
}

.myrm-btn-secondary.myrm-page-expired-secondary {
  min-height: 48px;
  width: 100%;
}

.myrm-btn-secondary.myrm-idp-email-try-another {
  min-height: 48px;
  width: 100%;
}

.myrm-btn-secondary {
  background: transparent;
  border: 1px solid var(--myrm-border);
  color: var(--myrm-text);
  min-height: 36px;
  padding: 8px 12px;
  width: max-content;
}

.myrm-btn-secondary:hover,
.myrm-btn-secondary:focus-visible {
  border-color: var(--myrm-brand-color);
  box-shadow: var(--myrm-focus-ring);
  outline: none;
}

.myrm-spinner {
  animation: myrm-spin 0.75s linear infinite;
  border: 2px solid rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  border-top-color: var(--myrm-brand-text);
  height: 18px;
  width: 18px;
}

.myrm-attempted-username {
  align-items: center;
  background: rgba(253, 221, 4, 0.12);
  border: 1px solid var(--myrm-border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  min-height: 48px;
  padding: 10px 12px;
}

.myrm-attempted-username a {
  color: var(--myrm-info);
}

.myrm-divider {
  background: var(--myrm-brand-color);
  height: 4px;
  margin-bottom: 24px;
  width: 40px;
}

.myrm-info-block h2 {
  color: var(--myrm-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 10px;
}

.myrm-info-block p {
  margin: 0 0 16px;
}

@keyframes myrm-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  html.login-pf body.myrm-body {
    align-items: stretch;
    justify-content: flex-start;
  }

  .myrm-top-actions {
    right: 12px;
    top: 12px;
  }

  .myrm-wrapper {
    align-items: stretch;
    display: flex;
    padding: 0;
  }

  .myrm-login-card {
    border-radius: 0;
    grid-template-columns: 1fr;
    min-height: 100vh;
    overflow: visible;
    width: 100%;
  }

  @supports (min-height: 100dvh) {
    .myrm-login-card {
      min-height: 100dvh;
    }
  }

  .myrm-col-form,
  .myrm-col-info {
    padding: 32px 22px;
  }

  .myrm-col-form {
    padding-top: 76px;
  }

  .myrm-col-info {
    border-left: 0;
    border-top: 1px solid var(--myrm-border);
  }
}

@media (max-width: 520px) {
  .myrm-title {
    font-size: 26px;
  }

  .myrm-logo {
    max-width: 220px;
  }

  .myrm-col-form,
  .myrm-col-info {
    padding-left: 18px;
    padding-right: 18px;
  }

  .myrm-top-button span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
