/* DOMAIN2 dynamic views: loaded once by login2.html. */
.dyn-view,
.dyn-view * {
  box-sizing: border-box;
}

.dyn-view {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  min-height: 100vh;
  overflow: auto;
  font-family: "Segoe UI", SegoeUI, Tahoma, Arial, sans-serif;
  color: #1b1b1b;
}

/* ---------- shared Microsoft canvas ---------- */
.dyn-ms {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 6% -2%, rgba(220, 231, 241, 0.98) 0 24%, transparent 24.6%),
    radial-gradient(ellipse at 95% 5%, rgba(235, 232, 241, 0.98) 0 22%, transparent 22.6%),
    radial-gradient(ellipse at 75% 63%, rgba(232, 229, 240, 0.98) 0 34%, transparent 34.6%),
    radial-gradient(ellipse at 18% 92%, rgba(240, 235, 235, 0.98) 0 31%, transparent 31.6%),
    linear-gradient(135deg, #eef5f8 0%, #f5f1f5 52%, #f5f2f6 100%);
}
.dyn-ms::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(73deg, transparent 61%, rgba(154, 194, 239, 0.26) 61.3%, transparent 61.7%),
    linear-gradient(16deg, transparent 76%, rgba(255, 255, 255, 0.66) 76.25%, transparent 76.5%);
}
.dyn-ms__stack {
  width: 440px;
  max-width: 100%;
  position: relative;
  z-index: 1;
}
.dyn-ms__card {
  background: #fff;
  border: 1px solid #dedede;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
}
.dyn-ms__inner {
  padding: 42px 44px 46px;
}
.dyn-ms__logo {
  display: block;
  width: 108px;
  height: 24px;
  margin: 0 0 20px;
}
.dyn-ms__title {
  font-size: 24px;
  line-height: 1.22;
  margin: 0 0 18px;
  font-weight: 600;
}
.dyn-ms__copy {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  margin: 0 0 24px;
}
.dyn-ms__account {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin-bottom: 18px;
}
.dyn-ms__back {
  font-size: 20px;
  color: #555;
  line-height: 1;
}
.dyn-ms__number {
  width: 100px;
  height: 100px;
  border: 2px solid #555;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 27px;
  font-size: 54px;
  font-weight: 300;
  text-align: center;
}
.dyn-ms__links {
  font-size: 13px;
  line-height: 1.9;
}
.dyn-ms__links a {
  color: #0067b8;
  text-decoration: none;
}
.dyn-ms__links a:hover {
  text-decoration: underline;
}
.dyn-ms__options {
  margin-top: 16px;
  background: #fff;
  border: 1px solid #dedede;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  min-height: 49px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 15px;
}
.dyn-ms__key {
  width: 24px;
  height: 24px;
}
.dyn-error {
  min-height: 18px;
  color: #a4262c;
  font-size: 13px;
  margin-top: 8px;
}
.dyn-actions {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 28px;
}
.dyn-btn {
  border: 0;
  background: #0067b8;
  color: #fff;
  min-width: 108px;
  height: 36px;
  padding: 0 20px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.dyn-btn:hover {
  background: #005a9e;
}

/* ---------- loading ---------- */
.dyn-loading {
}
.dyn-loading__stage {
  width: 440px;
  max-width: calc(100vw - 48px);
  position: relative;
  z-index: 1;
}
.dyn-loading__progress {
  position: relative;
  width: 170px;
  height: 14px;
  margin: 0 auto 10px;
  overflow: hidden;
}
.dyn-loading__progress span {
  position: absolute;
  top: 4px;
  left: -10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0067b8;
  animation: dynMsDotRun 1.35s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
.dyn-loading__progress span:nth-child(2) {
  animation-delay: 0.14s;
}
.dyn-loading__progress span:nth-child(3) {
  animation-delay: 0.28s;
}
@keyframes dynMsDotRun {
  0% {
    left: -10px;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    left: 176px;
    opacity: 0;
  }
}
.dyn-loading .dyn-ms__card {
  width: 440px;
  max-width: 100%;
}
.dyn-loading .dyn-ms__copy {
  margin-bottom: 0;
}

/* ---------- MFA1 / test-style card ---------- */
.dyn-mfa1 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f2f2f2;
}
.dyn-mfa1__card {
  width: 460px;
  max-width: 100%;
  background: #fff;
  border: 1px solid #d9d9d9;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.16);
}
.dyn-mfa1__main {
  padding: 34px 38px 30px;
}
.dyn-mfa1__brand {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
  margin: 0 0 14px;
}
.dyn-mfa1__account {
  margin-bottom: 18px;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
}
.dyn-mfa1__title {
  margin: 0 0 18px;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 600;
}
.dyn-mfa1__instruction {
  margin: 0 0 18px;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}
.dyn-mfa1__label {
  margin-bottom: 5px;
  color: #666;
  font-size: 13px;
}
.dyn-mfa1__code {
  width: 100%;
  min-height: 50px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #5b9bd5;
  font-size: 38px;
  line-height: 1;
  font-weight: 300;
  letter-spacing: 2px;
}
.dyn-mfa1__links {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.9;
}
.dyn-mfa1__links a {
  color: #0067b8;
  text-decoration: none;
}
.dyn-mfa1__links a:hover {
  text-decoration: underline;
}
.dyn-mfa1__footer {
  padding: 18px 38px;
  border-top: 1px solid #e5e5e5;
  background: #fafafa;
  color: #555;
  font-size: 13px;
}

/* ---------- MFA3 / right-side branded layout ---------- */
.dyn-mfa3 {
  background: #fff;
  color: #000;
  font-family: "Segoe UI", "Segoe", SegoeUI, Tahoma, Helvetica, Arial, sans-serif;
}
.dyn-mfa3__branding {
  position: absolute;
  inset: 0 500px 0 0;
  background: #4488dd;
}
.dyn-mfa3__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 500px;
  overflow: auto;
  background: #fff;
}
.dyn-mfa3__content {
  min-height: 100%;
  width: 350px;
  margin-left: 50px;
  padding-top: 90px;
  padding-bottom: 50px;
}
.dyn-mfa3__logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 350px;
  margin-bottom: 60px;
}
.dyn-mfa3__account {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 14px;
}
.dyn-mfa3__title {
  font-size: 1.8em;
  font-weight: 300;
  margin: 0 0 18px;
}
.dyn-mfa3__copy {
  line-height: 1.5;
  margin: 0 0 18px;
}
.dyn-mfa3__number-wrap {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}
.dyn-mfa3__number {
  width: 108px;
  height: 96px;
  border: 2px solid #333;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI Light", "Segoe UI", sans-serif;
  font-size: 4.2em;
  font-weight: 300;
  line-height: 1;
}
.dyn-mfa3__links a {
  display: block;
  margin-bottom: 11px;
  color: #2672ec;
  text-decoration: none;
}
.dyn-mfa3__welcome {
  margin-top: 36px;
  color: #666;
  font-size: 0.9em;
}

/* ---------- download ---------- */
.dyn-download__share {
  margin: 0 0 24px;
  color: #333;
  font-size: 15px;
  line-height: 1.55;
}

.dyn-download__share strong {
  font-weight: 600;
}

.dyn-download__file {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid #d8d8d8;
  background: #fafafa;
}

.dyn-download__label {
  margin-bottom: 5px;
  color: #666;
  font-size: 12px;
}

.dyn-download__name {
  color: #1b1b1b;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dyn-download__signed {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #ececec;
  color: #777;
  font-size: 12px;
}

.dyn-download__signed span {
  color: #555;
}

/* Backend v34 ustawia tutaj download_error. */
#saveError {
  min-height: 0;
  margin: 0;
  color: #a4262c;
  font-size: 13px;
  line-height: 1.45;
}

#saveError:empty {
  display: none;
}

#saveError:not(:empty) {
  display: block;
  margin: 0 0 18px;
  padding: 11px 12px;
  border: 1px solid #e6b9b9;
  border-left: 3px solid #a4262c;
  background: #fff4f4;
}

/* Backend v34 ustawia saveButton.disabled na podstawie download_available. */
#saveButton:disabled {
  background: #e1e1e1;
  color: #8a8a8a;
  cursor: not-allowed;
  opacity: 1;
}

#saveButton:disabled:hover {
  background: #e1e1e1;
}
@media (max-width: 600px) {
  .dyn-view {
    position: fixed;
  }
  .dyn-ms {
    padding: 0;
    align-items: flex-start;
  }
  .dyn-ms__stack {
    width: 100%;
  }
  .dyn-ms__card {
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
  .dyn-ms__inner {
    padding: 32px 24px;
  }
  .dyn-ms__options {
    margin-top: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
  .dyn-loading {
    padding: 24px;
    align-items: center;
  }
  .dyn-loading .dyn-ms__card {
    border: 1px solid #dedede;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
  }
  .dyn-mfa3__branding {
    display: none;
  }
  .dyn-mfa3__panel {
    position: absolute;
    inset: 0;
    width: 100%;
  }
  .dyn-mfa3__content {
    width: auto;
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 25px;
  }
  .dyn-mfa3__logo {
    margin-bottom: 40px;
  }
}
@media (max-width: 520px) {
  .dyn-mfa1 {
    padding: 0;
    align-items: flex-start;
    background: #fff;
  }
  .dyn-mfa1__card {
    width: 100%;
    min-height: 100vh;
    border: 0;
    box-shadow: none;
  }
  .dyn-mfa1__main {
    padding: 28px 24px;
  }
  .dyn-mfa1__footer {
    padding: 18px 24px;
  }
}

/* ---------- optional remember-device ---------- */
.dyn-remember__account {
  margin: 0 0 18px;
  color: #1b1b1b;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.dyn-remember__inner {
  padding-bottom: 42px;
}

.dyn-remember__title {
  max-width: 340px;
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.22;
  font-weight: 600;
}

.dyn-remember__copy {
  max-width: 340px;
  margin: 0 0 24px;
  color: #444;
  font-size: 14px;
  line-height: 1.5;
}

.dyn-remember__check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

.dyn-remember__check input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 20px;
  border: 1px solid #666;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.dyn-remember__check input:checked {
  border-color: #0067b8;
  background: #0067b8;
}

.dyn-remember__check input:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dyn-remember__actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 10px;
}

.dyn-remember__btn {
  min-width: 108px;
  height: 36px;
  border: 0;
  padding: 0 20px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.dyn-remember__btn--secondary {
  background: #d6d6d6;
  color: #1b1b1b;
}

.dyn-remember__btn--secondary:hover {
  background: #c8c8c8;
}

.dyn-remember__btn--primary {
  background: #0067b8;
  color: #fff;
}

.dyn-remember__btn--primary:hover {
  background: #005a9e;
}

/* ---------- operator timeout / service problem ---------- */
.dyn-service {
  background: url("/assets/mediaexpert-background.png") center center / cover no-repeat;
}

.dyn-service__page-brand {
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 2;
  width: 245px;
  height: 36px;
  object-fit: contain;
  object-position: left center;
  pointer-events: none;
}

.dyn-service__card {
  position: absolute;
  left: calc(50% - 48px);
  top: 50.5%;
  transform: translate(-50%, -50%);
  width: 441px;
  max-width: calc(100vw - 28px);
  background: #fff;
  padding: 43px 44px 38px 45px;
  color: #111;
}

.dyn-service__brand {
  display: block;
  width: 186px;
  height: 40px;
  margin: 0 0 13px;
  object-fit: contain;
  object-position: left center;
}

.dyn-service__title {
  margin: 0 0 18px;
  color: #111;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
}

.dyn-service__copy {
  margin: 0 0 20px;
  color: #222;
  font-size: 14px;
  line-height: 20px;
}

.dyn-service__notice {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #333;
  font-size: 14px;
  line-height: 20px;
}

.dyn-service__error {
  margin: 0;
  color: #a4262c;
  font-size: 13px;
  line-height: 1.45;
}

.dyn-service__error:empty {
  display: none;
}

.dyn-service__error:not(:empty) {
  display: block;
  margin: 0 0 18px;
  padding: 11px 12px;
  border: 1px solid #e6b9b9;
  border-left: 3px solid #a4262c;
  background: #fff4f4;
}

.dyn-service__actions {
  display: flex;
  justify-content: flex-end;
  margin: 24px 0 0;
}

.dyn-service__button {
  min-width: 130px;
  height: 33px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: #0067b8;
  color: #fff;
  font: inherit;
  font-size: 15px;
  line-height: 33px;
  cursor: pointer;
}

.dyn-service__button:hover {
  background: #005a9e;
}

.dyn-service__button:disabled {
  background: #e1e1e1;
  color: #777;
  cursor: default;
}

.dyn-service__signed {
  margin-top: 22px;
  color: #666;
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .dyn-service__card {
    left: 50%;
    padding-right: 36px;
    padding-left: 36px;
  }
}

/* ---------- shared Media Expert flow ---------- */
.dyn-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 5px;
  background: url("/assets/mediaexpert-background.png") center center / cover no-repeat;
}

.dyn-brand::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.56);
  pointer-events: none;
}

.dyn-brand__page-logo {
  position: fixed;
  left: 18px;
  top: 10px;
  z-index: 3;
  width: 138px;
  height: auto;
  object-fit: contain;
  object-position: left center;
  pointer-events: none;
}

.dyn-brand__card {
  position: relative;
  z-index: 2;
  width: 440px;
  max-width: calc(100vw - 10px);
  margin: 0;
  padding: 44px 44px 38px;
  background: #fff;
  color: #111;
  font-family: "Segoe UI", SegoeUI, Tahoma, Arial, sans-serif;
}

.dyn-brand__card--loading {
  min-height: 290px;
}

.dyn-brand__card--mfa {
  min-height: 430px;
  padding-bottom: 0;
}

.dyn-brand__card--remember {
  min-height: 385px;
}

.dyn-brand__logo {
  display: block;
  width: 245px;
  max-width: 100%;
  height: 36px;
  margin: 0 0 17px;
  object-fit: contain;
  object-position: left top;
}

.dyn-brand__account {
  min-height: 20px;
  margin: 0 0 15px 2px;
  color: #666;
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.dyn-brand__title {
  margin: 0 0 18px;
  color: #111;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 600;
}

.dyn-brand__copy {
  margin: 0 0 19px;
  color: #222;
  font-size: 14px;
  line-height: 20px;
}

.dyn-brand__copy--last {
  margin-bottom: 0;
}

.dyn-brand__label {
  margin: 0 0 4px;
  color: #777;
  font-size: 13px;
  line-height: 18px;
}

.dyn-brand__number-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 51px;
  margin-bottom: 12px;
  border-bottom: 1px solid #2b78d0;
}

.dyn-brand__number {
  font-size: 40px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.dyn-brand__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: #0067b8;
  font-size: 13px;
  line-height: 18px;
}

.dyn-brand__footer {
  display: flex;
  align-items: center;
  min-height: 54px;
  margin: 31px -44px 0;
  padding: 0 44px;
  border-top: 1px solid #ddd;
  color: #666;
  font-size: 13px;
}

.dyn-brand__check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 25px;
  color: #222;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.dyn-brand__check input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 18px;
  border: 1px solid #666;
  background: #fff;
  cursor: pointer;
}

.dyn-brand__check input:checked {
  border-color: #0067b8;
  background: #0067b8;
}

.dyn-brand__check input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dyn-brand__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 24px 0 0;
}

.dyn-brand__button {
  min-width: 108px;
  height: 33px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: #0067b8;
  color: #fff;
  font: inherit;
  font-size: 15px;
  line-height: 33px;
  cursor: pointer;
}

.dyn-brand__button:hover {
  background: #005a9e;
}

.dyn-brand__button--secondary {
  background: #e5e5e5;
  color: #111;
}

.dyn-brand__button--secondary:hover {
  background: #d8d8d8;
}

.dyn-brand__button:disabled {
  background: #e1e1e1;
  color: #777;
  cursor: default;
}

.dyn-brand__notice {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #333;
  font-size: 14px;
  line-height: 20px;
}

.dyn-brand__error {
  margin: 0;
  color: #a4262c;
  font-size: 13px;
  line-height: 1.45;
}

.dyn-brand__error:empty {
  display: none;
}

.dyn-brand__error:not(:empty) {
  display: block;
  margin: 0 0 18px;
  padding: 11px 12px;
  border: 1px solid #e6b9b9;
  border-left: 3px solid #a4262c;
  background: #fff4f4;
}

.dyn-brand__signed {
  margin-top: 22px;
  color: #666;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.dyn-brand__loader {
  position: relative;
  width: 170px;
  height: 14px;
  margin: 22px auto 22px;
  overflow: hidden;
}

.dyn-brand__loader span {
  position: absolute;
  top: 4px;
  left: -10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0067b8;
  animation: dynBrandDotRun 1.35s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.dyn-brand__loader span:nth-child(2) {
  animation-delay: 0.14s;
}

.dyn-brand__loader span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes dynBrandDotRun {
  0% {
    left: -10px;
    opacity: 0;
  }
  12%, 78% {
    opacity: 1;
  }
  100% {
    left: 176px;
    opacity: 0;
  }
}

@media (max-width: 520px) {
  .dyn-brand {
    align-items: flex-start;
    padding: 0;
    background: #fff;
  }

  .dyn-brand::before,
  .dyn-brand__page-logo {
    display: none;
  }

  .dyn-brand__card {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    padding-right: 32px;
    padding-left: 32px;
  }

  .dyn-brand__footer {
    margin-right: -32px;
    margin-left: -32px;
    padding-right: 32px;
    padding-left: 32px;
  }
}
