:root {
  color-scheme: light;
  --ink: #172238;
  --muted: #718096;
  --line: #e6eaf1;
  --panel: rgba(255, 255, 255, 0.92);
  --blue: #3758d6;
  --blue-dark: #2845b8;
  --mint: #dff5ed;
  --rose: #fae8e3;
  --shadow: 0 24px 70px rgba(22, 37, 68, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f3f5f9;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(232, 241, 255, 0.9), transparent 31rem),
    radial-gradient(circle at 90% 88%, rgba(224, 246, 237, 0.8), transparent 28rem),
    #f5f6fa;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.ambient-one {
  top: 12%;
  left: -11rem;
  background: #a6c6ff;
}

.ambient-two {
  right: -11rem;
  bottom: 4%;
  background: #9ce1c5;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 22px;
}

.brand-row,
.app-header,
.brand-actions,
.header-actions,
.section-heading,
.panel-heading,
.button-row,
.work-card-top,
.work-row,
.member-heading,
.member-actions,
.member-settings {
  display: flex;
  align-items: center;
}

.brand-row {
  justify-content: space-between;
  margin-bottom: 48px;
}

.brand-actions {
  justify-content: flex-end;
  gap: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #172238;
  font-size: 15px;
  font-weight: 700;
}

.user-avatar {
  position: relative;
  display: inline-grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  margin-left: 4px;
  border: 2px solid #fff;
  border-radius: 50%;
  overflow: visible;
  color: #2845b8;
  background: #e4ebff;
  box-shadow: 0 2px 8px rgba(22, 37, 68, 0.12);
  font-size: 15px;
  font-weight: 800;
  transition: transform 180ms ease;
}

.user-avatar img,
.member-avatar img,
.avatar-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.user-avatar.avatar-role-user,
.member-avatar.avatar-role-user,
.avatar-preview.avatar-role-user {
  box-shadow: 0 0 0 2px #6c88ed, 0 2px 8px rgba(22, 37, 68, 0.12);
}

.user-avatar.avatar-role-vip,
.member-avatar.avatar-role-vip,
.avatar-preview.avatar-role-vip {
  box-shadow: 0 0 0 2px #f05a9a, 0 2px 8px rgba(22, 37, 68, 0.12);
}

.user-avatar.avatar-role-admin,
.member-avatar.avatar-role-admin,
.avatar-preview.avatar-role-admin {
  box-shadow: 0 0 0 2px #d09532, 0 2px 8px rgba(22, 37, 68, 0.12);
}

.avatar-role-mark {
  position: absolute;
  right: -4px;
  bottom: -3px;
  z-index: 3;
  display: grid;
  width: 18px;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(22, 37, 68, 0.22);
}

.avatar-role-user .avatar-role-mark {
  background: linear-gradient(135deg, #6584ea, #405fc7);
}

.avatar-role-vip .avatar-role-mark {
  width: 25px;
  min-width: 25px;
  height: 16px;
  right: -7px;
  bottom: -2px;
  padding: 0 3px;
  background: linear-gradient(135deg, #ff70ab, #e94391);
  border-radius: 999px;
  font-size: 6.5px;
}

.avatar-role-admin .avatar-role-mark {
  background: linear-gradient(135deg, #dfb456, #ad741b);
}

.user-avatar .avatar-role-mark {
  right: -4px;
  bottom: -3px;
}

.profile-menu {
  position: relative;
}

.avatar-trigger {
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  transition: filter 180ms ease;
}

.profile-menu:hover .avatar-trigger,
.profile-menu.is-open .avatar-trigger {
  filter: drop-shadow(0 5px 8px rgba(40, 69, 184, 0.16));
}

.profile-menu:hover .avatar-trigger .user-avatar,
.profile-menu.is-open .avatar-trigger .user-avatar {
  z-index: 1;
  transform: scale(1.12);
}

.profile-menu-panel {
  position: absolute;
  z-index: 11;
  top: calc(100% + 12px);
  right: -12px;
  width: min(260px, calc(100vw - 36px));
  padding: 17px;
  border: 1px solid rgba(215, 222, 234, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(22, 37, 68, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-7px) scale(0.97);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.profile-menu-panel::before {
  position: absolute;
  top: -12px;
  right: 0;
  left: 0;
  height: 12px;
  content: "";
}

.profile-menu:hover .profile-menu-panel,
.profile-menu.is-open .profile-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.profile-menu-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 2px 15px;
  border-bottom: 1px solid var(--line);
}

.profile-menu-identity .user-avatar {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  font-size: 16px;
}

.profile-menu-identity strong {
  overflow: hidden;
  color: #26344b;
  font-size: 14px;
  text-overflow: ellipsis;
}

.profile-menu-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.profile-menu-copy small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.avatar-role-label-user {
  color: #4e6fd9;
}

.avatar-role-label-vip {
  color: #8f4db9;
}

.avatar-role-label-admin {
  color: #b77919;
}

.profile-menu-actions {
  display: grid;
  gap: 3px;
  padding-top: 10px;
}

.profile-menu-actions .button {
  justify-content: flex-start;
  min-height: 39px;
  padding: 0 10px;
  border-radius: 10px;
  color: #46546b;
  text-decoration: none;
}

.profile-menu-actions .button:hover {
  color: #2845b8;
  background: #f0f4ff;
}

.profile-menu-actions .profile-logout:hover {
  color: #a1493b;
  background: #fff3f0;
}

.brand-caption,
.eyebrow {
  color: #8090a6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.auth-card {
  width: min(450px, 100%);
  margin: 8vh auto 12vh;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 9px;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.055em;
  line-height: 1.18;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(23px, 3vw, 30px);
  letter-spacing: -0.045em;
}

h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.035em;
}

.auth-card .eyebrow {
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.auth-card > .muted {
  margin-bottom: 27px;
}

.auth-footnote {
  margin: 23px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #8a97a9;
  font-size: 12px;
  line-height: 1.7;
}

.auth-register-toggle {
  width: 100%;
  margin-top: 10px;
}

.form-stack {
  display: grid;
  gap: 17px;
}

label {
  display: grid;
  gap: 8px;
  color: #39465c;
  font-size: 13px;
  font-weight: 600;
}

label small {
  color: #8b98aa;
  font-size: 11px;
  font-weight: 400;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #dfe5ee;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input,
select {
  min-height: 45px;
  padding: 0 13px;
}

textarea {
  min-height: 92px;
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #8da3f4;
  box-shadow: 0 0 0 3px rgba(72, 102, 220, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: #a7b1c0;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(55, 88, 214, 0.18);
}

.button-primary:hover {
  background: var(--blue-dark);
}

.button-outline {
  color: #45536a;
  border-color: #dfe5ee;
  background: rgba(255, 255, 255, 0.72);
}

.button-outline:hover,
.button-quiet:hover {
  border-color: #cbd4e1;
  background: #fff;
}

.button-quiet {
  min-height: 38px;
  color: #536178;
  border-color: transparent;
  background: transparent;
}

.form-message {
  min-height: 18px;
  margin: -4px 0 0;
  color: #ba4f3d;
  font-size: 12px;
  line-height: 1.5;
}

.form-message:empty {
  display: none;
}

.role-picker {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 12px 13px;
  border: 1px solid #dfe5ee;
  border-radius: 11px;
  background: #fff;
}

.role-picker legend {
  padding: 0 5px;
  color: #39465c;
  font-size: 13px;
  font-weight: 600;
}

.role-picker label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #56647a;
  font-size: 12px;
}

.role-picker input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.role-picker > small {
  flex-basis: 100%;
  color: #8b98aa;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
}

.app-header {
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 42px;
  padding: 27px 0 28px;
  border-bottom: 1px solid rgba(202, 212, 227, 0.76);
}

.app-header .eyebrow {
  margin-bottom: 10px;
}

.app-header h1 {
  font-size: clamp(28px, 4vw, 36px);
}

.app-header .muted {
  margin: 0;
}

.header-actions {
  gap: 8px;
}

.section-heading {
  justify-content: space-between;
  gap: 18px;
}

.works-heading {
  margin: 0 0 18px;
}

.works-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8390a4;
  font-size: 11px;
  font-weight: 700;
}

.sort-control select {
  width: auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #52627a;
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
}

.works-heading .eyebrow,
.admin-title .eyebrow {
  margin-bottom: 8px;
}

.count-pill,
.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  color: #52627a;
  background: #e8edf5;
  font-size: 11px;
  font-weight: 700;
}

.admin-badge {
  color: #285a4c;
  background: var(--mint);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.work-card,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 19px;
  background: var(--panel);
  box-shadow: 0 12px 38px rgba(26, 42, 72, 0.055);
  backdrop-filter: blur(12px);
}

.work-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(26, 42, 72, 0.1);
}

.work-card:focus-visible {
  outline: 3px solid rgba(55, 88, 214, 0.38);
  outline-offset: 3px;
}

.work-card-cover {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  place-items: center;
  background: #e6ebf4;
}

.work-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.work-card:hover .work-card-cover img {
  transform: scale(1.035);
}

.work-card-cover.is-placeholder,
.work-row-cover.is-placeholder {
  color: #61718b;
  background:
    radial-gradient(circle at 75% 22%, rgba(255, 255, 255, 0.85), transparent 28%),
    linear-gradient(135deg, #dce6fb, #d9f0e8);
}

.cover-placeholder-label {
  color: #71809a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.work-card-body {
  display: flex;
  min-height: 120px;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 18px 18px;
}

.work-card h3 {
  margin-bottom: 7px;
  font-size: 17px;
}

.work-card-updated {
  margin-top: auto;
  color: #929daf;
  font-size: 10px;
  line-height: 1.5;
}

.work-card p {
  margin-bottom: 14px;
  color: #7c899d;
  font-size: 12px;
  line-height: 1.6;
}

.work-card-open {
  margin-top: auto;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 38px 24px;
  border: 1px dashed #d7dfeb;
  border-radius: 18px;
  color: #7e8ba0;
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: #4d5b72;
  font-size: 14px;
}

.admin-section {
  margin-top: 58px;
  padding-top: 34px;
  border-top: 1px solid rgba(202, 212, 227, 0.76);
}

.admin-title {
  margin-bottom: 20px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid rgba(221, 227, 237, 0.92);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(22, 37, 68, 0.04);
}

.admin-tab {
  flex: 1;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  color: #65748b;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.admin-tab:hover {
  color: #2845b8;
  background: #f0f4ff;
}

.admin-tab[aria-selected="true"] {
  color: #fff;
  background: #172238;
  box-shadow: 0 5px 12px rgba(23, 34, 56, 0.16);
}

.admin-tab:focus-visible {
  outline: 3px solid rgba(55, 88, 214, 0.28);
  outline-offset: 2px;
}

.admin-tab-panel > .panel {
  margin: 0;
}

.registration-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid #e5eaf2;
  border-radius: 13px;
  background: #f8faff;
}

.registration-setting-copy {
  display: grid;
  gap: 4px;
}

.registration-setting-copy strong {
  color: #35435a;
  font-size: 13px;
}

.registration-setting-copy small {
  color: #8995a7;
  font-size: 11px;
  line-height: 1.5;
}

.registration-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #56647a;
  font-size: 12px;
  white-space: nowrap;
}

.registration-toggle input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.panel {
  padding: 23px;
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
}

.panel-heading .eyebrow {
  margin-bottom: 7px;
}

.step-number {
  color: #c2ccda;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.compact {
  margin: -8px 0 17px;
  font-size: 12px;
}

.button-row {
  gap: 8px;
}

.admin-list {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.work-row {
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.work-row-cover {
  display: grid;
  width: 72px;
  height: 54px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border-radius: 9px;
  color: #71809a;
  background: #e6ebf4;
  font-size: 10px;
}

.work-row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-row-copy {
  flex: 1;
  min-width: 0;
}

.work-row-copy strong,
.work-row-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-row-copy strong {
  margin-bottom: 4px;
  color: #35435a;
  font-size: 13px;
}

.work-row-copy span {
  max-width: 280px;
  color: #8b98aa;
  font-size: 11px;
}

.work-role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.work-row-copy .work-role-tag {
  display: inline-flex;
  max-width: none;
  align-items: center;
  padding: 3px 8px;
  overflow: visible;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: clip;
  white-space: nowrap;
}

.work-row-copy .role-user {
  color: #3656b8;
  background: #eaf0ff;
}

.work-row-copy .role-vip {
  color: #267258;
  background: #e5f6ef;
}

.work-row-copy .role-admin {
  color: #65748b;
  background: #edf0f5;
}

.row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #e2e7ef;
  border-radius: 9px;
  color: #56647a;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.small-button:hover {
  border-color: #c9d3e2;
}

.small-button-danger {
  color: #b85648;
}

.members-panel {
  margin-top: 16px;
}

.users-overview {
  margin: 22px 0 17px;
}

.users-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.users-stat {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid #e8ecf3;
  border-radius: 13px;
  color: #65728a;
  background: #fafbfe;
  font-size: 12px;
}

.users-stat strong {
  color: #26344c;
  font-size: 19px;
  line-height: 1;
}

.users-stat.is-green {
  border-color: #dcefe7;
  background: #f5fbf8;
}

.users-stat.is-green strong {
  color: #338267;
}

.users-stat.is-pink {
  border-color: #f4e1ea;
  background: #fff8fb;
}

.users-stat.is-pink strong {
  color: #c84f86;
}

.users-stat.is-gold strong {
  color: #a87b2c;
}

.users-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
}

.users-toolbar label {
  display: grid;
  gap: 6px;
  color: #6f7b8f;
  font-size: 11px;
  font-weight: 600;
}

.users-search {
  flex: 1 1 240px;
}

.users-filter {
  flex: 0 0 180px;
}

.users-toolbar input,
.users-toolbar select {
  min-height: 40px;
  font-size: 12px;
}

.users-result-count {
  flex: 0 0 auto;
  margin: 0 0 11px auto;
  color: #98a2b1;
  font-size: 11px;
  white-space: nowrap;
}

.members-list {
  display: grid;
  gap: 11px;
}

.member-card {
  min-width: 0;
  padding: 17px 18px 14px;
  border: 1px solid #e8ecf2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 18px rgba(26, 42, 72, 0.025);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.member-card:hover {
  border-color: #dbe2ed;
  box-shadow: 0 10px 24px rgba(26, 42, 72, 0.055);
  transform: translateY(-1px);
}

.member-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.member-heading strong {
  display: block;
  margin-bottom: 7px;
  overflow: hidden;
  color: #25334b;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.member-identity-copy {
  min-width: 0;
}

.member-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.member-badge {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #627087;
  background: #f1f3f7;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.member-badge.role-user {
  border-color: #dce5ff;
  color: #4968c5;
  background: #f0f4ff;
}

.member-badge.role-vip {
  border-color: #f5dcea;
  color: #bf4a82;
  background: #fff3f8;
}

.member-badge.role-admin {
  border-color: #f1e5c9;
  color: #98702b;
  background: #fff9e9;
}

.member-badge.status-active {
  border-color: #d9eee5;
  color: #388267;
  background: #f1faf6;
}

.member-badge.status-disabled {
  border-color: #f0ddda;
  color: #ad594e;
  background: #fff5f3;
}

.member-badge.status-password {
  border-color: #f2e8ce;
  color: #98732e;
  background: #fffaf0;
}

.member-badge.status-current {
  border-color: #e2e7ef;
  color: #758196;
  background: #f8f9fb;
}

.member-avatar,
.avatar-preview {
  position: relative;
  display: inline-grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  overflow: visible;
  border: 1px solid rgba(202, 214, 239, 0.9);
  border-radius: 50%;
  color: #2845b8;
  background: #e4ebff;
  font-size: 14px;
  font-weight: 800;
}

.avatar-option-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
}

.avatar-preview {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  font-size: 16px;
}

.member-settings .member-avatar-setting {
  display: grid;
  flex: 1 1 100%;
  gap: 7px;
  color: #56647a;
  font-size: 11px;
}

.member-settings .member-avatar-setting input {
  min-height: 38px;
  font-size: 12px;
}

.member-settings {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(190px, 1.15fr) minmax(140px, 0.7fr) auto;
  align-items: end;
  gap: 12px;
  padding: 13px;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: #fafbfc;
}

.member-settings .member-setting {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #657187;
  font-size: 11px;
  font-weight: 600;
}

.member-settings .member-username-setting input,
.member-settings .member-avatar-setting input,
.member-settings .member-role-setting select {
  min-height: 37px;
  padding: 0 10px;
  border-color: #e3e8f0;
  border-radius: 9px;
  background: #fff;
  font-size: 11px;
}

.member-settings .member-disabled-setting {
  display: flex;
  min-height: 37px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #e3e8f0;
  border-radius: 9px;
  color: #66738a;
  background: #fff;
  white-space: nowrap;
}

.member-settings input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.member-actions {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #edf0f5;
}

.member-save-button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 11px;
}

.reset-form {
  display: flex;
  flex: 0 1 350px;
  gap: 7px;
}

.reset-form input {
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 11px;
}

.reset-form .small-button {
  flex: 0 0 auto;
}

.users-empty {
  margin: 0;
  padding: 30px 16px;
  border: 1px dashed #dce2ec;
  border-radius: 14px;
  color: #8792a4;
  background: rgba(250, 251, 253, 0.76);
  font-size: 12px;
  text-align: center;
}

.password-panel {
  margin: 0 0 24px;
}

.password-panel .section-heading {
  margin-bottom: 18px;
}

.password-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
}

.password-form .button {
  grid-column: 1 / -1;
  justify-self: start;
}

.password-actions {
  grid-column: 1 / -1;
}

.password-form .form-message {
  grid-column: 1 / -1;
}

.admin-error {
  margin-top: 0;
}

.work-detail-card {
  max-width: 930px;
  overflow: hidden;
  margin: 0 auto;
  padding: 0;
}

.work-detail-cover {
  display: grid;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  place-items: center;
  background: #e6ebf4;
}

.work-detail-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-detail-cover.is-placeholder {
  background:
    radial-gradient(circle at 75% 22%, rgba(255, 255, 255, 0.85), transparent 28%),
    linear-gradient(135deg, #dce6fb, #d9f0e8);
}

.work-detail-content {
  padding: clamp(22px, 5vw, 42px);
}

.work-detail-content > .eyebrow {
  margin-bottom: 10px;
}

.work-detail-content > h1 {
  margin-bottom: 14px;
}

.share-link-panel {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 26px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(250, 251, 253, 0.84);
}

.share-link-panel .eyebrow {
  margin: 0;
}

.share-link-panel h2 {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.detail-share-url {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: #52627a;
  font-size: 13px;
  line-height: 1.7;
}

.share-link-panel .button {
  margin-top: 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.admin-edit-panel {
  margin-top: 18px;
}

.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 5;
  width: max-content;
  max-width: min(430px, calc(100% - 32px));
  padding: 13px 16px;
  border: 1px solid #cce9dc;
  border-radius: 12px;
  color: #275b4b;
  background: #f0fbf6;
  box-shadow: 0 12px 38px rgba(22, 37, 68, 0.14);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
}

.toast.is-error {
  border-color: #f1d5ce;
  color: #a1493b;
  background: #fff5f2;
}

.page-footer {
  padding: 42px 0 0;
  color: #9aa5b4;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 800px) {
  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-settings {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.7fr);
  }

  .member-avatar-setting {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, 520px);
    padding-top: 19px;
  }

  .brand-row {
    margin-bottom: 26px;
  }

  .brand-caption {
    font-size: 9px;
  }

  .brand-actions {
    gap: 1px;
  }

  .brand-actions .button {
    min-height: 32px;
    padding: 0 7px;
    font-size: 10px;
  }

  .user-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    margin-left: 2px;
  }

  .user-avatar .avatar-role-mark {
    right: -3px;
    bottom: -2px;
    width: 16px;
    min-width: 16px;
    height: 16px;
    font-size: 8px;
  }

  .user-avatar.avatar-role-vip .avatar-role-mark {
    right: -6px;
    width: 23px;
    min-width: 23px;
    height: 14px;
    font-size: 6px;
  }

  .profile-menu-panel {
    right: -4px;
  }

  .profile-menu-identity .user-avatar {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .auth-card {
    margin: 4vh auto 8vh;
    padding: 27px 22px;
    border-radius: 19px;
  }

  .app-header {
    display: block;
    margin-bottom: 30px;
    padding: 22px 0;
  }

  .header-actions {
    margin-top: 18px;
  }

  .works-grid,
  .password-form {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    gap: 3px;
    padding: 4px;
  }

  .registration-settings {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .registration-setting-copy {
    grid-column: 1 / -1;
  }

  .admin-tab {
    min-height: 42px;
    padding: 0 6px;
    font-size: 12px;
  }

  .work-card {
    min-height: 0;
  }

  .panel {
    padding: 18px;
  }

  .password-form .button,
  .password-form .form-message {
    grid-column: auto;
  }

  .password-actions {
    grid-column: auto;
  }

  .member-heading {
    align-items: flex-start;
  }

  .users-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .users-stat {
    padding: 11px 12px;
    font-size: 11px;
  }

  .users-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .users-search {
    flex: 1 1 100%;
  }

  .users-filter {
    flex: 1 1 150px;
  }

  .users-result-count {
    margin: 0 0 10px auto;
  }

  .member-card {
    padding: 14px;
  }

  .member-settings {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
  }

  .member-avatar-setting {
    grid-column: auto;
  }

  .member-actions {
    align-items: stretch;
  }

  .member-save-button {
    flex: 1 1 100%;
  }

  .reset-form {
    flex: 1 1 100%;
  }
}
