/* Design/components/user-create-form.css, Form 1. Scope adapted for light DOM. */
.form-1 {
  display: block;
  width: 100%;
  color: var(--ink, #f5f5f5);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --user-ink: var(--ink, #f5f5f5);
  --user-muted: var(--muted, #a3a3a3);
  --user-line: var(--line, #303030);
  --user-page: var(--page, #111);
  --user-card: var(--bar, #171717);
  --user-field: color-mix(in srgb, var(--user-ink) 7%, var(--user-page));
  --user-accent: #3b82f6;
}

*, *::before, *::after { box-sizing: border-box; }
button, input, textarea, select { color: inherit; font: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--user-accent); outline-offset: 2px; }
.user-create-form { width: 100%; }
.user-create-grid { display: grid; grid-template-columns: minmax(225px, .48fr) minmax(0, 1fr); align-items: start; gap: 20px; width: min(100%, 820px); margin-inline: auto; }
.user-profile, .user-form { min-width: 0; border: 1px solid var(--user-line); border-radius: 12px; background: var(--user-card); }
.user-profile { overflow: hidden; padding-top: 16px; text-align: center; }
.user-avatar { display: grid; place-items: center; width: 80px; height: 80px; margin: 0 auto 12px; border-radius: 50%; background: color-mix(in srgb, var(--user-ink) 8%, var(--user-page)); color: var(--user-muted); font-size: 20px; font-weight: 500; }
.user-profile h2 { margin: 0 0 3px; font-size: 16px; font-weight: 620; line-height: 1.35; }
.profile-email { margin: 0; color: var(--user-muted); font-size: 12px; }
.profile-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 16px 12px; }
.profile-badges span { padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--user-ink) 8%, var(--user-page)); color: var(--user-ink); font-size: 10px; font-weight: 580; line-height: 1.2; }
.profile-badges .profile-status { background: var(--user-accent); color: #fff; }
.profile-badges .profile-status.is-inactive { background: color-mix(in srgb, var(--user-muted) 22%, transparent); color: var(--user-muted); }
.profile-meta { padding: 14px 16px; border-top: 1px solid var(--user-line); text-align: left; }
.profile-meta p { display: flex; justify-content: space-between; gap: 14px; margin: 0; color: var(--user-muted); font-size: 11px; line-height: 1.8; }
.profile-meta strong { overflow: hidden; color: var(--user-muted); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.profile-bio { min-height: 56px; margin: 0; padding: 15px 16px; border-top: 1px solid var(--user-line); color: var(--user-muted); font-size: 11px; line-height: 1.55; text-align: left; overflow-wrap: anywhere; }

.user-form { position: relative; overflow: visible; padding: 16px 16px 0; }
.user-form__header { margin-bottom: 20px; }
.user-form__header > div { display: flex; align-items: center; gap: 9px; }
.user-form__header .icon { width: 16px; height: 16px; color: var(--user-ink); }
.user-form__header h2 { margin: 0; font-size: 14px; font-weight: 640; }
.user-form__header p { margin: 6px 0 0; color: var(--user-muted); font-size: 11px; line-height: 1.5; }
.form-section + .form-section { margin-top: 19px; }
.form-section h3 { margin: 0 0 12px; color: var(--user-muted); font-size: 12px; font-weight: 560; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 15px; }
.user-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.user-field--full { grid-column: 1 / -1; }
.user-field__label { color: var(--user-ink); font-size: 11px; font-weight: 570; line-height: 1.35; }
.user-control { display: flex; align-items: center; min-width: 0; height: 37px; gap: 9px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--user-line) 82%, transparent); border-radius: 9px; background: var(--user-field); transition: border-color .16s ease, background .16s ease; }
.user-control:focus-within { border-color: color-mix(in srgb, var(--user-accent) 74%, var(--user-line)); }
.user-control > .icon { width: 15px; height: 15px; flex: 0 0 auto; color: var(--user-muted); }
.user-control input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--user-ink); font-size: 11px; }
.user-control input::placeholder, .user-field textarea::placeholder { color: var(--user-muted); opacity: 1; }
.user-control input[type="date"] { color-scheme: inherit; }
.user-control--select { position: relative; }
.user-control--select:focus-within { z-index: 40; }
.user-control--select input[type="hidden"] { display: none; }
.select-trigger { display: flex; align-items: center; width: 100%; min-width: 0; height: 100%; gap: 9px; padding: 0; border: 0; background: transparent; color: var(--user-ink); text-align: left; cursor: pointer; }
.select-trigger > .icon { width: 15px; height: 15px; flex: 0 0 auto; color: var(--user-muted); }
.select-value { overflow: hidden; flex: 1; font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.user-field[data-empty="true"] .select-value { color: var(--user-muted); }
.select-caret { position: absolute; right: 10px; width: 7px; height: 7px; border-right: 1.4px solid var(--user-muted); border-bottom: 1.4px solid var(--user-muted); transform: translateY(-2px) rotate(45deg); pointer-events: none; }
.select-menu { position: absolute; z-index: 50; top: calc(100% + 5px); right: -1px; left: -1px; display: grid; gap: 0; padding: 4px; border: 1px solid var(--user-line); border-radius: 10px; background: var(--user-card); box-shadow: 0 14px 32px rgb(0 0 0 / .3); }
.select-menu[hidden] { display: none; }
.select-option { display: flex; align-items: center; width: 100%; min-height: 32px; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--user-ink); font-size: 11px; line-height: 1.45; text-align: left; cursor: pointer; }
.select-option:hover, .select-option:focus-visible { outline: 0; background: color-mix(in srgb, var(--user-ink) 8%, transparent); }
.user-field textarea { min-height: 64px; resize: vertical; padding: 9px 10px; border: 1px solid color-mix(in srgb, var(--user-line) 82%, transparent); border-radius: 9px; background: var(--user-field); color: var(--user-ink); font-size: 11px; line-height: 1.5; }
.user-field textarea:focus { border-color: color-mix(in srgb, var(--user-accent) 74%, var(--user-line)); outline: 0; }
.user-control--password { gap: 8px; }
.user-control--password input { flex: 1; }
.password-toggle { display: grid; place-items: center; width: 23px; height: 27px; flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--user-muted); cursor: pointer; }
.password-toggle .icon { width: 15px; height: 15px; }
.user-switches { display: grid; gap: 9px; margin-top: 17px; }
.user-switch { display: inline-flex; align-items: center; width: fit-content; gap: 10px; cursor: pointer; }
.user-switch input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.user-switch__track { display: flex; align-items: center; width: 32px; height: 18px; flex: 0 0 auto; padding: 2px; border-radius: 999px; background: color-mix(in srgb, var(--user-muted) 33%, transparent); transition: background .16s ease; }
.user-switch__track > span { width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .16s ease; }
.user-switch input:checked + .user-switch__track { background: var(--user-accent); }
.user-switch input:checked + .user-switch__track > span { transform: translateX(14px); }
.user-switch input:focus-visible + .user-switch__track { outline: 2px solid var(--user-accent); outline-offset: 3px; }
.user-switch__label { font-size: 11px; font-weight: 560; line-height: 1.35; }
.user-form__footer { display: flex; justify-content: flex-end; gap: 9px; margin: 17px -16px 0; padding: 12px 16px; border-top: 1px solid var(--user-line); border-radius: 0 0 11px 11px; background: color-mix(in srgb, var(--user-ink) 2%, var(--user-card)); }
.user-form__footer button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; gap: 6px; padding: 7px 11px; border: 1px solid var(--user-line); border-radius: 8px; background: transparent; color: var(--user-ink); font-size: 11px; font-weight: 570; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.user-form__footer .form-cancel:hover { background: color-mix(in srgb, var(--user-ink) 7%, transparent); }
.user-form__footer .form-submit { border-color: var(--user-accent); background: var(--user-accent); color: #fff; }
.user-form__footer .form-submit:hover { border-color: #2563eb; background: #2563eb; }
.form-submit .icon { width: 13px; height: 13px; }

@media (max-width: 820px) {
  .user-create-grid { grid-template-columns: minmax(0, .68fr) minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 660px) {
  .user-create-grid { grid-template-columns: 1fr; }
  .user-profile { max-width: 420px; margin-inline: auto; }
}
@media (max-width: 480px) {
  .user-form { padding-inline: 13px; }
  .form-grid { grid-template-columns: 1fr; gap: 11px; }
  .user-field--full { grid-column: auto; }
  .user-form__footer { margin-inline: -13px; padding-inline: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
