#page-profile .profile-wrap {
  max-width: 1020px;
  margin: 0;
}
#page-profile .profile-heading {
  margin-bottom: 22px;
}
#page-profile .profile-heading h1 {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 7px;
}
#page-profile .profile-heading > p {
  color: var(--text-2);
  font-size: 13px;
  margin: 0;
}
#page-profile .profile-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  margin-bottom: 18px;
}
#page-profile .profile-avatar {
  display: grid;
  place-items: center;
  background: #edf1fe;
  color: #364ebf;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 600;
}
#page-profile .profile-account strong {
  font-size: 14px;
  display: block;
  font-weight: 600;
}
#page-profile .profile-account small {
  display: block;
  color: var(--text-2);
  font-size: 12px;
  margin-top: 2px;
}
#page-profile .profile-role {
  margin-left: auto;
  background: #f1f5f9;
  border: 1px solid #e0e6ef;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
}
#page-profile .profile-card {
  margin-bottom: 18px;
  box-shadow: none;
}
#page-profile .profile-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
}
#page-profile .section-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  background: #edf1fd;
  border-radius: 7px;
  color: #3a53d0;
}
#page-profile .section-icon svg {
  width: 18px;
  height: 18px;
}
#page-profile .profile-card h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 5px;
}
#page-profile .profile-card p {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.6;
  margin: 0;
  max-width: 75ch;
}
#page-profile .profile-card-title {
  flex: 1;
  min-width: 0;
}
#page-profile .profile-card .btn {
  min-height: 36px;
  min-width: 120px;
  justify-content: center;
  white-space: normal;
}
#page-profile .profile-card .btn svg {
  width: 15px;
  height: 15px;
}
#page-profile .profile-card-body {
  padding: 0 20px 20px 66px;
}
#page-profile .profile-card-footer {
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
}
#page-profile .save-status {
  font-size: 12px;
  color: #64748b;
  flex: 1;
  min-width: 0;
}
#page-profile .save-status.saved {
  color: #087f72;
}
#page-profile .save-status.dirty {
  color: #a15c00;
}
#page-profile .save-status.error {
  color: #b42332;
}
#page-profile .profile-card-footer .btn {
  font-size: 12px;
}
#page-profile .setting-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
#page-profile .setting-copy {
  flex: 1;
}
#page-profile .setting-title {
  font-size: 13px;
  font-weight: 600;
  display: block;
  line-height: 1.5;
  cursor: pointer;
}
#page-profile .setting-copy p {
  margin-top: 5px;
}
#page-profile .switch {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 42px;
  height: 24px;
  margin-top: 2px;
}
#page-profile .switch input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
#page-profile .switch-track {
  display: block;
  width: 42px;
  height: 24px;
  border: 1px solid #b8c3d2;
  border-radius: 20px;
  background: #c4cdd9;
  pointer-events: none;
  transition: background 0.15s;
}
#page-profile .switch-track:after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 1px 2px #0002;
  transition: transform 0.15s;
}
#page-profile .switch input:checked + .switch-track {
  background: #3a53d0;
  border-color: #3a53d0;
}
#page-profile .switch input:checked + .switch-track:after {
  transform: translateX(18px);
}
#page-profile .switch input:focus-visible + .switch-track {
  outline: 3px solid #087f72;
  outline-offset: 3px;
}
#page-profile .switch input:disabled {
  cursor: wait;
}
#page-profile .setting-detail {
  margin-top: 13px !important;
  padding: 9px 12px;
  background: #f7f9fc;
  border-radius: 5px;
  border: 1px solid #e4e9f1;
  font-size: 12px !important;
}
#page-profile .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  padding: 3px 8px;
  background: #f1f5f9;
  color: #627186;
  font-size: 11px;
  white-space: nowrap;
  font-weight: 500;
}
#page-profile .status-chip.on {
  background: #e8f6ef;
  color: #08734d;
}
#page-profile .status-chip.missing {
  background: #fff3d8;
  color: #97600d;
}
#page-profile .signature-warning {
  background: #fff7e8;
  border: 1px solid #f0d49c;
  border-radius: 6px;
  padding: 17px 18px;
  display: flex;
  gap: 18px;
  align-items: center;
}
#page-profile .signature-warning strong {
  display: block;
  font-size: 13px;
  color: #7a5114;
  margin-bottom: 5px;
}
#page-profile .signature-warning p {
  color: #7a5b28;
  max-width: 62ch;
}
#page-profile .signature-warning .btn {
  flex: none;
}
#page-profile .upload-btn {
  background: #087f72;
  color: white;
  border: 1px solid #087f72;
}
#page-profile .upload-btn:hover {
  background: #06665c;
}
#page-profile .signature-stored {
  border: 1px solid #d7dfea;
  border-radius: 6px;
  background: #fafbfd;
  max-width: 490px;
  padding: 13px 18px;
  margin-bottom: 10px;
}
#page-profile .signature-image {
  height: 92px;
  width: 100%;
  object-fit: contain;
  display: block;
  background: white;
}
#page-profile .signature-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #62738d;
  margin-top: 8px;
}
#page-profile .signature-footnote {
  font-size: 12px !important;
  line-height: 1.7 !important;
}
#page-profile .profile-note {
  color: #64748b;
  font-size: 11.5px;
  margin-top: 2px;
}
#page-profile .profile-feedback {
  margin-top: 12px;
  font-size: 12px;
  color: #087f72;
}
.yqbb-profile-dialog {
  padding: 0;
  border: 1px solid #cfd8e7;
  border-radius: 10px;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 96px);
  margin: auto;
  background: white;
  color: #172544;
  box-shadow: 0 22px 70px #0c1d3a44;
  overflow: hidden;
}
.yqbb-profile-dialog[open] {
  display: flex;
  flex-direction: column;
}
.yqbb-profile-dialog::backdrop {
  background: #12203880;
}
.yqbb-profile-dialog header {
  padding: 17px 20px;
  border-bottom: 1px solid #e1e6ef;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.yqbb-profile-dialog h2 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0;
  flex: 1;
}
.yqbb-profile-dialog .dialog-close {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 5px;
  font-size: 24px;
  line-height: 1;
}
.yqbb-profile-dialog .dialog-close:hover {
  background: #f1f4f9;
}
.yqbb-profile-dialog form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.yqbb-profile-dialog .dialog-body {
  padding: 20px;
  overflow-y: auto;
  min-height: 0;
}
.yqbb-profile-dialog footer {
  padding: 14px 20px;
  border-top: 1px solid #e1e6ef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex: none;
  background: #fbfcfe;
}
.yqbb-profile-dialog .btn {
  min-height: 36px;
  justify-content: center;
  min-width: 92px;
}
.yqbb-profile-dialog p {
  font-size: 12.5px;
  color: #52617b;
  line-height: 1.65;
  margin: 0 0 17px;
}
.yqbb-profile-dialog .field {
  margin-bottom: 16px;
}
.yqbb-profile-dialog .field:last-child {
  margin-bottom: 0;
}
.yqbb-profile-dialog label:not(.check-label) {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #293954;
}
.yqbb-profile-dialog input:not([type="checkbox"]):not([type="file"]) {
  width: 100%;
  min-width: 0;
  padding: 10px 44px 10px 11px;
  border: 1px solid #c5cfdf;
  border-radius: 6px;
  background: white;
  color: #172544;
  font-size: 13.5px;
  line-height: 20px;
}
#login-screen .password-wrap, .yqbb-profile-dialog .password-wrap {
  position: relative;
}
#login-screen .password-eye, .yqbb-profile-dialog .password-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #5f6d83;
  cursor: pointer;
  flex: none;
}
#login-screen .password-eye:hover, .yqbb-profile-dialog .password-eye:hover {
  background: #edf1fa;
  color: #3047ae;
}
#login-screen .password-eye svg, .yqbb-profile-dialog .password-eye svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}
#login-screen .password-eye[aria-pressed="true"], .yqbb-profile-dialog .password-eye[aria-pressed="true"] {
  color: #3047ae;
  background: #eef2ff;
}
.yqbb-profile-dialog input:focus {
  border-color: #5369d8;
  outline: 2px solid #5369d827;
  outline-offset: 0;
}
.yqbb-profile-dialog .field-hint {
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.6;
  display: block;
  margin-top: 6px;
}
.yqbb-profile-dialog .field-error {
  display: block;
  font-size: 11.5px;
  color: #b42332;
  line-height: 1.5;
  margin-top: 6px;
}
.yqbb-profile-dialog .field-error:empty {
  display: none;
}
.yqbb-profile-dialog input[aria-invalid="true"] {
  border-color: #c53c48 !important;
  background: #fff8f8 !important;
}
.yqbb-profile-dialog .form-error {
  font-size: 12px;
  color: #b42332;
  line-height: 1.6;
  padding: 9px 11px;
  border: 1px solid #efc1c1;
  border-radius: 5px;
  background: #fff3f3;
  margin-top: 14px;
}
.yqbb-profile-dialog .form-error:empty {
  display: none;
}
.yqbb-profile-dialog .dialog-preview {
  height: 154px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c9d2e2;
  border-radius: 6px;
  background: #fafbfd;
  margin: 15px 0;
}
.yqbb-profile-dialog .dialog-preview img {
  max-width: 100%;
  width: auto;
  max-height: 126px;
  object-fit: contain;
}
.yqbb-profile-dialog .dialog-preview span {
  font-size: 12px;
  color: #718099;
}
.yqbb-profile-dialog .signature-file-field {
  font-size: 12px;
  width: 100%;
  max-width: 100%;
  padding: 7px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
}
.yqbb-profile-dialog .signature-file-field::file-selector-button {
  border: 0;
  background: #edf1fb;
  color: #2d459f;
  border-radius: 4px;
  padding: 7px 10px;
  margin-right: 10px;
  cursor: pointer;
}
.yqbb-profile-dialog .check-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 12px 0;
}
.yqbb-profile-dialog .check-label input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: #3a53d0;
  flex: none;
}
.yqbb-profile-dialog .signature-processing {
  font-size: 12px;
  color: #556b8c;
  min-height: 20px;
  margin-top: 10px;
}
.yqbb-profile-dialog .approval-document {
  background: #f7f9fc;
  border: 1px solid #e0e6ef;
  border-radius: 6px;
  padding: 13px;
  margin-bottom: 16px;
}
.yqbb-profile-dialog .approval-document strong {
  display: block;
  font-size: 13px;
}
.yqbb-profile-dialog .approval-document small {
  font-size: 12px;
  color: #64748b;
}
#page-profile [hidden],
.yqbb-profile-dialog [hidden] {
  display: none !important;
}
#page-profile .profile-identity {
  flex: 1;
  min-width: 0;
}
#page-profile .display-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
#page-profile .display-name-row strong {
  overflow-wrap: anywhere;
}
#page-profile .display-name-form {
  max-width: 430px;
}
#page-profile .display-name-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
#page-profile .display-name-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid #c5cfdf;
  border-radius: 5px;
  padding: 9px 11px;
  font-size: 14px;
  color: #172544;
  background: white;
}
#page-profile .display-name-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
#page-profile .display-name-actions .btn {
  min-height: 36px;
  justify-content: center;
}
#page-profile .profile-account .profile-avatar {
  align-self: flex-start;
}
#page-profile .profile-avatar svg {
  width: 22px;
  height: 22px;
}
#page-profile .profile-account .profile-role {
  display: inline-block;
  width: fit-content;
  margin: 6px 0 0;
  padding: 3px 9px;
  border: 1px solid #dce3ee;
  border-radius: 6px;
  background: #f1f5f9;
  color: #52617b;
  font-size: 11px;
}
#page-profile .profile-account .name-action {
  justify-content: center;
}
#page-profile .profile-account .profile-avatar,
#page-profile .profile-card .section-icon {
  width: 34px;
  height: 34px;
}
#page-profile .profile-card .profile-card-header {
  gap: 12px;
}
#page-profile .profile-card .approval-header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 5px;
  align-items: start;
}
#page-profile .approval-header > .section-icon {
  grid-column: 1;
  grid-row: 1/3;
}
#page-profile .approval-header > .profile-card-title {
  display: contents;
}
#page-profile .approval-header h2 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}
#page-profile .approval-header p {
  grid-column: 2;
  grid-row: 2;
}
#page-profile .profile-card[aria-labelledby="approval-section-title"] .profile-card-body {
  padding-left: 20px;
}
#page-profile .setting-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}
#page-profile .setting-row .switch {
  margin-left: -4px;
}
#page-profile #display-name-edit,
#page-profile #open-password {
  width: 140px;
  min-width: 140px;
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: 36px;
}
#page-profile .profile-card .preference-autosave {
  margin: 0;
  padding: 0 20px 16px 66px;
  font-size: 11.5px;
  color: #087f72;
}
#page-profile .signature-saved-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}
#page-profile .signature-saved-row .signature-stored {
  width: 260px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
}
#page-profile .signature-saved-row .signature-image {
  height: 64px;
}
#page-profile .signature-saved-row .signature-caption {
  font-size: 10.5px;
  margin-top: 6px;
}
#page-profile .signature-saved-row #signature-change {
  flex: none;
  min-width: 120px;
}
#login-screen .password-wrap, .yqbb-profile-dialog .password-wrap {
  position: relative;
}
#login-screen .password-wrap > input, .yqbb-profile-dialog .password-wrap > input {
  padding-right: 44px !important;
}
#page-profile #profile-load-status {
  font-size: 13px;
  color: #64748b;
}
#page-profile #profile-load-status.profile-error,
#page-profile .profile-card .preference-autosave.profile-error {
  color: #b42332;
}
#page-profile .profile-status-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.yqbb-profile-dialog .field-error {
  color: #b42332;
}
.yqbb-profile-dialog {
  max-height: calc(100dvh - 60px);
}
.yqbb-profile-dialog[open] {
  display: flex;
  flex-direction: column;
}
.yqbb-profile-dialog form {
  min-height: 0;
}
@media (max-width: 760px) {
  #page-profile .profile-account {
    padding: 14px 16px;
    flex-wrap: wrap;
  }
  #page-profile .profile-card-header {
    padding: 17px 16px;
    flex-wrap: wrap;
  }
  #page-profile .profile-card-title {
    flex: 1;
    min-width: 0;
  }
  #page-profile .profile-card-body {
    padding: 0 16px 17px;
  }
  #page-profile .profile-card[aria-labelledby="approval-section-title"] .profile-card-body {
    padding-left: 16px;
  }
  #page-profile .profile-card .preference-autosave {
    padding-left: 62px;
    padding-right: 16px;
  }
  #page-profile .signature-warning {
    flex-wrap: wrap;
  }
  .yqbb-profile-dialog {
    width: calc(100vw - 24px);
  }
  #page-profile .profile-account strong {
    font-size: 13px;
  }
  #page-profile .profile-account small {
    font-size: 11px;
  }
}
@media (max-width: 480px) {
  #page-profile .profile-account .profile-identity {
    flex-basis: calc(100% - 46px);
  }
  #page-profile .signature-saved-row {
    gap: 10px;
  }
  #page-profile .signature-saved-row .signature-stored {
    width: 190px;
    flex: 1;
  }
  #page-profile .signature-saved-row #signature-change {
    min-width: 96px;
    padding: 7px 10px;
  }
  #page-profile .signature-saved-row .signature-image {
    height: 52px;
  }
  #page-profile .profile-account .name-action {
    margin-left: 46px;
  }
  #page-profile .profile-card-header > #open-password {
    margin-left: 46px;
  }
}
@media (max-width: 480px) {
  #page-profile
    .profile-card[aria-labelledby="password-section-title"]
    .profile-card-title {
    flex-basis: calc(100% - 46px);
  }
}
