@layer components {
  .d1-registration-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(2, 10, 18, 0.72);
    backdrop-filter: blur(14px);
  }

  .d1-registration-modal {
    width: min(100%, 560px);
    max-height: min(92vh, 860px);
    overflow: auto;
    position: relative;
    background: rgba(8, 24, 38, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.42);
    padding: 2rem;
    color: #f8fafc;
  }

  .d1-registration-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 30, 45, 0.72);
    color: #f8fafc;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
  }

  .d1-registration-modal h2 {
    margin: 1rem 0;
    color: #f8fafc;
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    line-height: 1.14;
  }

  .d1-registration-modal form {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
  }

  .d1-registration-modal label {
    display: grid;
    gap: 0.42rem;
    color: rgba(226, 232, 240, 0.86);
    font-size: 0.94rem;
  }

  .d1-registration-modal label span {
    color: rgba(226, 232, 240, 0.52);
    font-size: 0.82rem;
  }

  .d1-registration-modal input,
  .d1-registration-modal select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(15, 30, 45, 0.86);
    color: #f8fafc;
    padding: 0.9rem 1rem;
    outline: none;
  }

  .d1-registration-modal input:focus,
  .d1-registration-modal select:focus {
    border-color: rgba(37, 209, 218, 0.7);
    box-shadow: 0 0 0 3px rgba(37, 209, 218, 0.14);
  }

  .d1-registration-field {
    display: grid;
    gap: 0.35rem;
  }

  .d1-registration-hint {
    color: rgba(226, 232, 240, 0.58);
    font-size: 0.82rem;
  }

  .d1-role-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.5rem;
  }

  .d1-role-chip {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 30, 45, 0.78);
    color: rgba(226, 232, 240, 0.9);
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
    transition:
      background 160ms ease,
      border-color 160ms ease,
      color 160ms ease,
      transform 160ms ease;
  }

  .d1-role-chip:hover {
    border-color: rgba(37, 209, 218, 0.45);
    color: #ffffff;
    transform: translateY(-1px);
  }

  .d1-role-chip.is-selected {
    background: rgba(37, 209, 218, 0.16);
    border-color: rgba(37, 209, 218, 0.65);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 209, 218, 0.08);
  }

  .d1-registration-consent {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.65rem;
  }

  .d1-registration-consent input {
    width: auto;
    margin-top: 0.2rem;
  }

  .d1-registration-error {
    min-height: 1.25rem;
    color: #fca5a5;
    font-size: 0.9rem;
  }

  .d1-registration-modal .dig-btn-primary {
    color: #061b2a;
    font-weight: 800;
  }
}

