/* GitHub App identity entry: one clear action, stable hierarchy, no simulated production roles. */

.identity-login-panel {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
  border-top: 1px solid #2d2d2d;
  background:
    linear-gradient(135deg, rgb(255 77 77 / 7%), transparent 54%),
    #111111;
}

.identity-login-copy {
  display: grid;
  gap: 5px;
}

.identity-login-copy strong,
.identity-login-copy p {
  margin: 0;
}

.identity-login-copy strong {
  color: #eeeeee;
  font-family: var(--font-heading, "Instrument Sans", "PingFang SC", system-ui, sans-serif);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.identity-login-copy p {
  color: #8b8b8b;
  font-size: 12px;
  line-height: 1.65;
}

.identity-github-login {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #d8d8d8;
  border-radius: 0;
  background: #eeeeee;
  color: #111111;
  font: 650 13px/1.4 var(--font-body, Montserrat, "PingFang SC", system-ui, sans-serif);
  text-align: left;
  cursor: pointer;
}

.identity-github-login:hover,
.identity-github-login:focus-visible {
  border-color: #ffffff;
  background: #ffffff;
  outline: 0;
}

.identity-github-login:focus-visible {
  box-shadow: inset 0 0 0 2px #111111, 0 0 0 1px #ffffff;
}

.identity-github-login:disabled {
  border-color: #303030;
  background: #171717;
  color: #676767;
  cursor: not-allowed;
}

.identity-github-login .ui-icon {
  width: 18px;
  height: 18px;
}

.identity-github-login .identity-login-arrow {
  width: 15px;
  height: 15px;
  justify-self: end;
}

.identity-profile-card {
  display: grid;
  gap: 12px;
  padding: 16px 20px 14px;
  border: 0;
  border-bottom: 1px solid #2b2b2b;
  background: #111111;
}

.identity-profile-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.identity-profile-heading-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.identity-profile-heading strong,
.identity-profile-heading small,
.identity-profile-summary strong,
.identity-profile-summary span {
  margin: 0;
}

.identity-profile-heading strong {
  color: #ededed;
  font-family: var(--font-heading, "Instrument Sans", "PingFang SC", system-ui, sans-serif);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.identity-profile-heading small {
  overflow: hidden;
  color: #777777;
  font-size: 10px;
  font-weight: 450;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-profile-edit {
  display: inline-grid;
  grid-template-columns: 14px auto;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #343434;
  border-radius: 0;
  background: #151515;
  color: #d6d6d6;
  font-family: var(--font-body, Montserrat, "PingFang SC", system-ui, sans-serif);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.identity-profile-edit .ui-icon {
  width: 14px;
  height: 14px;
}

.identity-profile-edit:hover {
  border-color: #525252;
  background: #1a1a1a;
  color: #ffffff;
}

.identity-profile-edit:focus-visible {
  border-color: #6b6b6b;
  outline: 1px solid #9b9b9b;
  outline-offset: 2px;
}

.identity-profile-summary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.identity-profile-summary strong {
  overflow: hidden;
  color: #f2f2f2;
  font-family: var(--font-heading, "Instrument Sans", "PingFang SC", system-ui, sans-serif);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-profile-summary span {
  overflow: hidden;
  color: #858585;
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-profile-id {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid #262626;
  color: #707070;
  font-size: 10px;
  line-height: 1.4;
}

.identity-profile-id code {
  overflow: hidden;
  color: #9b9b9b;
  font: 500 10px/1.4 var(--font-mono, "SFMono-Regular", Consolas, monospace);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-profile-id small {
  color: #626262;
  font-size: 10px;
  white-space: nowrap;
}

.identity-profile-form {
  display: grid;
  gap: 10px;
  min-width: 0;
  animation: identity-profile-editor-enter 160ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.identity-profile-form[hidden],
.identity-profile-summary[hidden],
.identity-profile-edit[hidden] {
  display: none;
}

.identity-profile-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.identity-profile-field > span {
  color: #8a8a8a;
  font-size: 10px;
  font-weight: 550;
  line-height: 1.4;
}

.identity-profile-input,
.identity-profile-cancel,
.identity-profile-save {
  min-height: 42px;
  border-radius: 0;
  font-family: var(--font-body, Montserrat, "PingFang SC", system-ui, sans-serif);
  font-size: 12px;
  line-height: 1.4;
}

.identity-profile-input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #393939;
  background: #0d0d0d;
  color: #ededed;
  outline: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.identity-profile-input:hover {
  border-color: #4b4b4b;
}

.identity-profile-input:focus {
  border-color: #8a4444;
  background: #101010;
  box-shadow: inset 3px 0 0 var(--brand);
}

.identity-profile-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.identity-profile-cancel,
.identity-profile-save {
  min-width: 76px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.identity-profile-cancel {
  border: 1px solid #353535;
  background: #151515;
  color: #bcbcbc;
  font-weight: 550;
}

.identity-profile-cancel:hover,
.identity-profile-cancel:focus-visible {
  border-color: #555555;
  background: #1b1b1b;
  color: #ffffff;
  outline: none;
}

.identity-profile-save {
  border: 1px solid #d9d9d9;
  background: #ededed;
  color: #111111;
  font-weight: 650;
}

.identity-profile-save:hover,
.identity-profile-save:focus-visible {
  border-color: #ffffff;
  background: #ffffff;
  outline: none;
}

.identity-profile-save:focus-visible {
  box-shadow: inset 0 0 0 2px #111111, 0 0 0 1px #ffffff;
}

.identity-profile-save:disabled {
  border-color: #333333;
  background: #1b1b1b;
  color: #777777;
  cursor: wait;
}

.identity-profile-status {
  color: #9b9b9b;
  font-size: 11px;
  line-height: 1.45;
}

.identity-profile-status:empty {
  display: none;
}

@keyframes identity-profile-editor-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.identity-owner-linker {
  border-bottom: 1px solid #2b2b2b;
  background: #101010;
}

.identity-owner-linker summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 20px;
  color: #d7d7d7;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.identity-owner-linker summary::-webkit-details-marker {
  display: none;
}

.identity-owner-linker summary::after {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background: currentColor;
  color: #777777;
  content: "";
  -webkit-mask: url("./assets/icons/untitledui/chevron-down.svg") center / contain no-repeat;
  mask: url("./assets/icons/untitledui/chevron-down.svg") center / contain no-repeat;
  transition: color 160ms ease, transform 160ms cubic-bezier(0.33, 1, 0.68, 1);
}

.identity-owner-linker[open] summary::after {
  transform: rotate(180deg);
}

.identity-owner-linker summary small {
  margin-left: auto;
  color: #787878;
  font-size: 10px;
  font-weight: 500;
}

.identity-owner-linker-body {
  display: grid;
  max-height: 270px;
  overflow: auto;
  border-top: 1px solid #262626;
}

.identity-owner-linker-body > p {
  margin: 0;
  padding: 14px 20px 16px;
  color: #7f7f7f;
  font-size: 11px;
  line-height: 1.55;
}

.identity-owner-link-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(0, 1.2fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px 10px 20px;
  border-bottom: 1px solid #242424;
}

.identity-owner-link-row:last-child {
  border-bottom: 0;
}

.identity-owner-link-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.identity-owner-link-copy strong,
.identity-owner-link-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-owner-link-copy strong {
  color: #d6d6d6;
  font-size: 11px;
  font-weight: 600;
}

.identity-owner-link-copy small {
  color: #707070;
  font-size: 10px;
}

.identity-owner-link-row select,
.identity-owner-link-row button {
  min-height: 34px;
  border-radius: 0;
  font: 550 10px/1.3 var(--font-body, Montserrat, "PingFang SC", system-ui, sans-serif);
}

.identity-owner-link-row select {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #333333;
  background: #0d0d0d;
  color: #bdbdbd;
}

.identity-owner-link-row button {
  padding: 7px 10px;
  border: 1px solid #4d3434;
  background: #1b1212;
  color: #e66b6b;
  cursor: pointer;
}

.identity-owner-link-row button:disabled {
  color: #777777;
  cursor: wait;
}

@media (max-width: 720px) {
  .identity-login-panel {
    padding: 16px;
  }

  .identity-profile-card {
    padding: 15px 16px 13px;
  }

  .identity-profile-id {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .identity-profile-id small {
    display: none;
  }

  .identity-owner-link-row {
    grid-template-columns: minmax(80px, 0.9fr) minmax(0, 1.1fr) auto;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .identity-profile-input,
  .identity-profile-cancel,
  .identity-profile-save {
    transition: none;
  }

  .identity-profile-form {
    animation: none;
  }
}
