/* SeedDeck RC5 Build 4.3.0 — isolated user dialog */
.ud-overlay,
.ud-overlay * {
  box-sizing: border-box;
}

.ud-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(2, 7, 18, 0.84);
  backdrop-filter: blur(14px);
  font-family: inherit;
}

.ud-dialog {
  width: min(1080px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #2b3c59;
  border-radius: 22px;
  background: #101a2d;
  color: #f7f9fc;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.58);
}

.ud-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px 24px;
  border-bottom: 1px solid #263750;
  background: #111c30;
}

.ud-header__copy {
  min-width: 0;
}

.ud-eyebrow {
  display: block;
  margin: 0 0 8px;
  color: #9b7cff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ud-header h2 {
  margin: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1.15;
}

.ud-header p {
  margin: 10px 0 0;
  color: #a9b7cc;
  font-size: 1rem;
  line-height: 1.55;
}

.ud-close {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #33445f;
  border-radius: 13px;
  background: #152137;
  color: #f5f7fb;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.ud-form {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ud-body {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 18px;
  padding: 22px 26px;
}

.ud-section {
  padding: 24px 26px;
  border: 1px solid #273953;
  border-radius: 18px;
  background: #131f34;
}

.ud-section--security {
  background: #121d31;
}

.ud-section__title {
  margin-bottom: 20px;
}

.ud-section__title h3 {
  margin: 0;
  color: #f7f9fc;
  font-size: 1.14rem;
}

.ud-section__title p {
  margin: 7px 0 0;
  color: #9fb0c8;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ud-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ud-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  margin: 0;
}

.ud-field > span {
  color: #c7d2e2;
  font-size: 0.85rem;
  font-weight: 800;
}

.ud-field input,
.ud-field select {
  width: 100%;
  min-width: 0;
  height: 52px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid #344763;
  border-radius: 11px;
  outline: none;
  background: #0e192b;
  color: #f6f8fc;
  font: inherit;
}

.ud-field input:focus,
.ud-field select:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.ud-password {
  position: relative;
}

.ud-password input {
  padding-right: 52px;
}

.ud-password__toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #b9c7d9;
  cursor: pointer;
}

.ud-password-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  margin-top: 18px;
}

.ud-password-note {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #2b558f;
  border-radius: 11px;
  background: #17355e;
  color: #9ed0ff;
  font-size: 0.82rem;
}

.ud-password-note.is-hidden {
  visibility: hidden;
}

.ud-password-note > span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
}

.ud-strength {
  min-width: 0;
}

.ud-strength__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
  color: #c6d2e2;
  font-size: 0.82rem;
}

.ud-strength__head strong {
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #202d44;
  color: #f4f6fb;
  text-align: center;
}

.ud-strength__bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #2b3b56;
}

.ud-strength__bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b6b, #ffb547 48%, #55df89);
  transition: width 0.2s ease;
}

.ud-rules {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ud-rules > div {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid #2b3c57;
  border-radius: 11px;
  background: #0f1a2d;
  color: #9fb0c8;
}

.ud-rules i {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid #687991;
  border-radius: 50%;
}

.ud-rules span {
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.ud-rules > div.is-valid {
  border-color: #2f7554;
  background: #123326;
  color: #d8f8e6;
}

.ud-rules > div.is-valid i {
  border-color: #55df89;
  background: #55df89;
  box-shadow: inset 0 0 0 4px #123326;
}

.ud-force-change {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #2b3c57;
  border-radius: 13px;
  background: #0f1a2d;
  cursor: pointer;
}

.ud-switch {
  flex: 0 0 auto;
  position: relative;
}

.ud-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ud-switch__track {
  width: 52px;
  height: 30px;
  display: block;
  padding: 4px;
  border-radius: 999px;
  background: #34435d;
  transition: 0.2s;
}

.ud-switch__thumb {
  width: 22px;
  height: 22px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
  transition: 0.2s;
}

.ud-switch input:checked + .ud-switch__track {
  background: #7c5cff;
}

.ud-switch input:checked + .ud-switch__track .ud-switch__thumb {
  transform: translateX(22px);
}

.ud-force-change__copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ud-force-change__copy strong {
  color: #f5f7fb;
  font-size: 0.92rem;
}

.ud-force-change__copy small {
  color: #9fb0c8;
  font-size: 0.82rem;
  line-height: 1.45;
}

.ud-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 20px 32px;
  border-top: 1px solid #263750;
  background: #0d1728;
}

.ud-footer .btn {
  min-width: 132px;
  height: 48px;
}

@media (max-width: 900px) {
  .ud-overlay {
    align-items: flex-end;
    padding: 14px;
  }

  .ud-dialog {
    width: 100%;
    max-height: calc(100vh - 28px);
    border-radius: 20px 20px 0 0;
  }

  .ud-profile-grid {
    grid-template-columns: 1fr;
  }

  .ud-password-meta {
    grid-template-columns: 1fr;
  }

  .ud-password-note.is-hidden {
    display: none;
  }

  .ud-rules {
    grid-template-columns: 1fr 1fr;
  }

  .ud-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ud-footer .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .ud-header {
    padding: 22px 20px 18px;
  }

  .ud-header h2 {
    font-size: 1.55rem;
  }

  .ud-body {
    padding: 16px;
  }

  .ud-section {
    padding: 20px 18px;
  }

  .ud-rules {
    grid-template-columns: 1fr;
  }
}


/* RC5 Build 4.3.1 — save feedback */
.ud-footer {
  justify-content: space-between;
}

.ud-footer__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.ud-save-status {
  min-height: 24px;
  display: flex;
  align-items: center;
  color: #9fb0c8;
  font-size: 0.84rem;
  font-weight: 700;
}

.ud-save-status.is-success {
  color: #55df89;
}

.ud-save-status.is-error {
  color: #ff7f87;
}

.ud-footer button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.ud-footer .btn.is-saved {
  background: #259b63;
  border-color: #259b63;
  color: #fff;
}

.ud-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 30000;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 15px 18px;
  border: 1px solid #2c7653;
  border-radius: 13px;
  background: #123326;
  color: #d8f8e6;
  box-shadow: 0 18px 60px rgba(0,0,0,.4);
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .2s ease, transform .2s ease;
}

.ud-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ud-toast.is-error {
  border-color: #8f3f49;
  background: #401d24;
  color: #ffd9dd;
}

@media (max-width: 900px) {
  .ud-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .ud-footer__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ud-save-status:empty {
    display: none;
  }
}
