.skillward-account {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.25rem;
}

.skillward-account .nav-pill {
  width: 5.5rem;
  min-width: 5.5rem;
  justify-content: center;
  padding-inline: 0.75rem;
}

.skillward-account-label {
  width: 9rem;
  max-width: 9rem;
  flex: 0 0 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skillward-billing-panel {
  margin: 0 0 1rem;
  border: 0;
  border-bottom: 1px solid #e7e5e4;
  border-radius: 0;
  background: transparent;
  padding: 0 0 1rem;
}

.skillward-billing-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.skillward-billing-title {
  color: #292524;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skillward-billing-session {
  color: #79716b;
  font-size: 0.6875rem;
}

.skillward-billing-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.skillward-billing-selected {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.15rem;
}

.skillward-billing-selected strong {
  overflow: hidden;
  color: #292524;
  font-size: 0.8125rem;
  line-height: 1.15rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skillward-billing-selected span {
  color: #a6a09b;
  font-size: 0.6875rem;
  line-height: 1rem;
}

.skillward-billing-configure {
  flex: none;
  border: 1px solid #d6d3d1;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.55rem 0.75rem;
  color: #57534d;
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 700;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.skillward-billing-configure:hover {
  border-color: #8d54ff;
  background: #f5f3ff;
  color: #5d0ec0;
}

.skillward-billing-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.skillward-billing-modal-modes {
  margin-top: 1rem;
}

.skillward-agent-configuration-dialog {
  display: flex;
  max-height: calc(100vh - 2rem);
  flex-direction: column;
}

.skillward-agent-configuration-dialog > .space-y-5 {
  overflow-y: auto;
}

.skillward-billing-agent-modal-section {
  border: 1px solid #e7e5e4;
  border-radius: 0.9rem;
  background: #fafaf9;
  padding: 0.85rem;
}

.skillward-billing-agent-modal-section .skillward-billing-title {
  margin-bottom: 0.65rem;
}

.skillward-fangcun-models {
  margin-top: 0.75rem;
  border-top: 1px solid #e7e5e4;
  padding-top: 0.75rem;
}

.skillward-fangcun-models-label {
  margin-bottom: 0.5rem;
  color: #57534d;
  font-size: 0.6875rem;
  font-weight: 700;
}

.skillward-pricing-note {
  margin-top: 0.55rem;
  color: #79716b;
  font-size: 0.625rem;
  line-height: 1rem;
}

.skillward-agent-fields-hidden > :not(.skillward-billing-agent-modal-section) {
  display: none;
}

.skillward-billing-mode {
  display: flex;
  min-width: 0;
  cursor: pointer;
  flex-direction: column;
  gap: 0.2rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.7rem 0.75rem;
  color: #57534d;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.skillward-billing-mode:hover {
  border-color: #c4b4ff;
}

.skillward-billing-mode[aria-pressed="true"] {
  border-color: #8d54ff;
  background: #f5f3ff;
  color: #5d0ec0;
}

.skillward-billing-mode strong {
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skillward-billing-mode span {
  color: #a6a09b;
  font-size: 0.625rem;
  line-height: 0.9rem;
}

.skillward-billing-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.75rem;
  color: #57534d;
  font-size: 0.6875rem;
}

.skillward-credential-list-label,
.skillward-credential-list,
.skillward-credential-label-field,
.skillward-credential-security-note {
  width: 100%;
}

.skillward-credential-list-label {
  color: #57534d;
  font-weight: 700;
}

.skillward-credential-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.skillward-credential-row {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e7e5e4;
  border-radius: 0.65rem;
  background: #fff;
}

.skillward-credential-row[data-selected="true"] {
  border-color: #8d54ff;
  background: #f5f3ff;
}

.skillward-credential-choice {
  display: flex;
  min-width: 0;
  cursor: pointer;
  flex-direction: column;
  gap: 0.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.55rem 4.8rem 0.55rem 0.65rem;
  color: #57534d;
  text-align: left;
}

.skillward-credential-actions {
  position: absolute;
  z-index: 1;
  top: 0.45rem;
  right: 0.45rem;
  display: flex;
  gap: 0.2rem;
}

.skillward-credential-actions button {
  cursor: pointer;
  border: 1px solid #ddd6fe;
  border-radius: 0.35rem;
  background: rgb(255 255 255 / 0.82);
  padding: 0.12rem 0.3rem;
  color: #6d28d9;
  font-size: 0.625rem;
  font-weight: 700;
}

.skillward-credential-actions button[data-danger="true"] {
  color: #b91c1c;
}

.skillward-credential-choice[data-selected="true"] {
  color: #5d0ec0;
}

.skillward-credential-choice strong,
.skillward-credential-choice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skillward-credential-choice strong {
  font-size: 0.6875rem;
}

.skillward-credential-choice span {
  color: #8a817a;
  font-size: 0.625rem;
}

.skillward-add-credential {
  border: 1px dashed #c4b4ff;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.45rem 0.65rem;
  color: #6d28d9;
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 700;
}

.skillward-credential-label-field {
  display: flex !important;
  align-items: flex-start !important;
  flex-direction: column;
}

.skillward-credential-label-field input {
  width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.55rem 0.65rem;
  color: #292524;
}

.skillward-credential-security-note {
  margin: 0;
  color: #79716b;
  font-size: 0.625rem;
  line-height: 1rem;
}

.skillward-legacy-browser-storage-copy {
  display: none !important;
}

.skillward-billing-options label {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  gap: 0.4rem;
}

.skillward-billing-options input,
.skillward-billing-options select {
  accent-color: #7f22fe;
}

.skillward-billing-options select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.skillward-billing-options select {
  max-width: 12rem;
  border: 1px solid #d6d3d1;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.35rem 0.5rem;
  color: #44403b;
}

.skillward-billing-help {
  margin-top: 0.65rem;
  color: #79716b;
  font-size: 0.6875rem;
  line-height: 1rem;
}

.skillward-scan-card {
  position: relative;
  overflow: visible;
}

.skillward-billing-notice {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: -0.4rem;
  left: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  border: 1px solid #ddd6ff;
  border-radius: 0.75rem;
  background: #f5f3ff;
  padding: 0.7rem 0.8rem;
  color: #5d0ec0;
  font-size: 0.75rem;
  line-height: 1.15rem;
}

.skillward-billing-notice[data-visible="true"] {
  display: flex;
}

.skillward-billing-notice[data-tone="error"] {
  border-color: #ffcaca;
  background: #fef2f2;
  color: #bf000f;
}

.skillward-billing-notice-action {
  flex: none;
  border: 1px solid currentColor;
  border-radius: 0.55rem;
  padding: 0.35rem 0.65rem;
  color: inherit;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1rem;
  text-decoration: none;
}

.skillward-billing-notice-action:hover {
  background: rgb(255 255 255 / 0.72);
}

.skillward-scan-action {
  position: relative;
  display: flex;
  width: 100%;
  margin-top: 1.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  transition: background 150ms ease;
}

.skillward-scan-action[data-disabled="true"] {
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

.skillward-scan-action[data-busy="true"] {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

button.skillward-managed-button {
  display: none !important;
  width: auto !important;
  min-width: 0;
  flex: 1;
  margin-top: 0 !important;
  border-radius: 0.75rem 0 0 0.75rem;
  background: transparent !important;
  padding-right: 1rem !important;
  padding-left: 7rem !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

button.skillward-managed-button[data-visible="true"] {
  display: inline-flex !important;
}

.skillward-runtime-trigger {
  display: inline-flex;
  width: 6rem;
  min-width: 6rem;
  height: 3rem;
  flex: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-left: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 0 0.75rem 0.75rem 0;
  background: transparent;
  padding: 0 0.75rem;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  transition: background 150ms ease;
}

.skillward-runtime-trigger:hover {
  background: rgb(255 255 255 / 0.1);
}

.skillward-runtime-trigger:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgb(196 181 253 / 0.65);
  outline-offset: 2px;
}

.skillward-runtime-trigger:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.skillward-runtime-menu {
  position: absolute;
  z-index: 80;
  right: 0;
  bottom: calc(100% + 0.55rem);
  display: none;
  width: min(100%, 25rem);
  overflow: hidden;
  border: 1px solid #ddd6fe;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.35rem;
  box-shadow: 0 18px 50px rgb(41 22 78 / 0.18);
}

.skillward-runtime-menu[data-visible="true"] {
  display: block;
}

.skillward-runtime-option {
  display: flex;
  width: 100%;
  cursor: pointer;
  align-items: flex-start;
  gap: 0.65rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  padding: 0.7rem;
  color: #44403c;
  text-align: left;
}

.skillward-runtime-option:hover {
  background: #faf7ff;
}

.skillward-runtime-option:disabled,
.skillward-runtime-option[data-disabled="true"] {
  cursor: not-allowed;
  background: transparent;
  opacity: 0.42;
}

.drop-zone.skillward-drop-active {
  border-color: #8b5cf6;
  background: #f5f3ff;
}

.drop-zone.skillward-restored-upload > :not(.skillward-restored-upload-content) {
  display: none;
}

.skillward-runtime-option[data-selected="true"] {
  background: #f5f3ff;
  color: #5d0ec0;
}

.skillward-runtime-option-marker {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  color: #7f22fe;
  font-size: 0.6875rem;
  font-weight: 900;
}

.skillward-runtime-option[data-selected="true"] .skillward-runtime-option-marker {
  border-color: #a78bfa;
  background: #fff;
}

.skillward-runtime-option-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.18rem;
}

.skillward-runtime-option-content strong {
  font-size: 0.75rem;
  line-height: 1rem;
}

.skillward-runtime-option-content > span {
  color: #78716c;
  font-size: 0.6875rem;
  line-height: 1rem;
}

.skillward-modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.skillward-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(12 10 9 / 0.38);
  backdrop-filter: blur(4px);
}

.skillward-modal-card {
  position: relative;
  width: min(100%, 30rem);
  overflow: hidden;
  border: 1px solid #e7e5e4;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 24px 80px rgb(28 25 23 / 0.22);
}

.skillward-modal-body {
  padding: 1.5rem;
}

.skillward-modal-title {
  color: #1c1917;
  font-size: 1rem;
  font-weight: 800;
}

.skillward-modal-copy {
  margin-top: 0.65rem;
  color: #57534d;
  font-size: 0.8125rem;
  line-height: 1.35rem;
}

.skillward-modal-history {
  margin-top: 0.75rem;
  border-radius: 0.75rem;
  background: #fafaf9;
  padding: 0.75rem;
  color: #79716b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  word-break: break-all;
}

.skillward-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  border-top: 1px solid #f5f5f4;
  background: #fafaf9;
  padding: 1rem 1.5rem;
}

.skillward-modal-actions button {
  border-radius: 0.65rem;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.skillward-modal-cancel {
  border: 1px solid #d6d3d1;
  background: #fff;
  color: #57534d;
}

.skillward-modal-confirm {
  border: 1px solid #7f22fe;
  background: #7f22fe;
  color: #fff;
}

@media (max-width: 760px) {
  .skillward-account {
    gap: 0.25rem;
  }

  .skillward-account .nav-pill {
    width: 4.75rem;
    min-width: 4.75rem;
    padding-inline: 0.5rem;
  }

  .skillward-account-label {
    display: none;
  }

  .skillward-billing-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skillward-credential-list {
    grid-template-columns: 1fr;
  }

  button.skillward-managed-button {
    padding-left: 4rem !important;
  }

  .skillward-runtime-trigger {
    width: 3rem;
    min-width: 3rem;
    padding: 0;
  }

  .skillward-runtime-trigger span {
    display: none;
  }
}
