:root {
  color-scheme: light;
  --bg: #fafafa;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #66717f;
  --line: #e6e9ee;
  --line-strong: #cdd5df;
  --field: #ffffff;
  --soft: #f6f8fa;
  --hover: #f8fafc;
  --active: #eef8f1;
  --media: #eef2f5;
  --accent-soft: #eef8f1;
  --danger-soft: #fff1f0;
  --overlay: rgba(15, 23, 42, 0.18);
  --toast-bg: #17212b;
  --scrollbar-thumb: rgba(102, 113, 127, 0.34);
  --scrollbar-thumb-hover: rgba(102, 113, 127, 0.52);
  --accent: #2ba246;
  --accent-dark: #2ba246;
  --blue: #2ba246;
  --danger: #b42318;
  --button-height: 32px;
  --button-radius: 9px;
  --button-padding-x: 11px;
  --button-font-size: 13px;
  --icon-button-size: 28px;
  --radius-lg: 18px;
  --icon-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  --icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  --icon-tag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.1 13.1 20.6a2 2 0 0 1-2.8 0L3 13.3V3h10.3l7.3 7.3a2 2 0 0 1 0 2.8Z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E");
  --icon-map: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 11-8 11S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  --icon-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  --icon-key: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='M12 12 21 3M16 7l2 2M19 4l2 2'/%3E%3C/svg%3E");
  --icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.4 19.4 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.3 1.7.6 2.5a2 2 0 0 1-.4 2.1L8 9.6a16 16 0 0 0 6.4 6.4l1.3-1.3a2 2 0 0 1 2.1-.4c.8.3 1.6.5 2.5.6a2 2 0 0 1 1.7 2Z'/%3E%3C/svg%3E");
  --icon-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-8 9-4.5-1.5-8-4-8-9V5l8-3 8 3v8Z'/%3E%3C/svg%3E");
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  --icon-app: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2' width='14' height='20' rx='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E");
  --icon-server: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='6' rx='2'/%3E%3Crect x='3' y='14' width='18' height='6' rx='2'/%3E%3Cpath d='M7 7h.01M7 17h.01'/%3E%3C/svg%3E");
  --icon-database: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='9' ry='3'/%3E%3Cpath d='M3 5v14c0 1.7 4 3 9 3s9-1.3 9-3V5M3 12c0 1.7 4 3 9 3s9-1.3 9-3'/%3E%3C/svg%3E");
  --icon-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 0 20M12 2a15.3 15.3 0 0 0 0 20'/%3E%3C/svg%3E");
  --icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E");
  --icon-captcha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M7 9h2M15 9h2M8 15h8M11 12h2'/%3E%3C/svg%3E");
  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  --icon-view: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  --icon-filter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.5V19l4 2v-8.5L22 3Z'/%3E%3C/svg%3E");
  --icon-refresh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 1-15.5 6.2L3 16'/%3E%3Cpath d='M3 21v-5h5'/%3E%3Cpath d='M3 12A9 9 0 0 1 18.5 5.8L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3C/svg%3E");
  --icon-theme-system: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E");
  --icon-theme-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
  --icon-theme-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z'/%3E%3C/svg%3E");
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0c;
  --panel: #141416;
  --text: #edf2f7;
  --muted: #9aa6b2;
  --line: #26262a;
  --line-strong: #343438;
  --field: #101012;
  --soft: #111113;
  --hover: #1b1b1e;
  --active: #1a1a1d;
  --media: #202023;
  --accent-soft: #1a1a1d;
  --danger-soft: #241414;
  --overlay: rgba(0, 0, 0, 0.48);
  --toast-bg: #0f0f10;
  --scrollbar-thumb: rgba(154, 166, 178, 0.32);
  --scrollbar-thumb-hover: rgba(154, 166, 178, 0.48);
  --accent: #2ba246;
  --accent-dark: #2ba246;
  --blue: #2ba246;
  --danger: #ff7b72;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #0b0b0c;
    --panel: #141416;
    --text: #edf2f7;
    --muted: #9aa6b2;
    --line: #26262a;
    --line-strong: #343438;
    --field: #101012;
    --soft: #111113;
    --hover: #1b1b1e;
    --active: #1a1a1d;
    --media: #202023;
    --accent-soft: #1a1a1d;
    --danger-soft: #241414;
    --overlay: rgba(0, 0, 0, 0.48);
    --toast-bg: #0f0f10;
    --scrollbar-thumb: rgba(154, 166, 178, 0.32);
    --scrollbar-thumb-hover: rgba(154, 166, 178, 0.48);
    --accent: #2ba246;
    --accent-dark: #2ba246;
    --blue: #2ba246;
    --danger: #ff7b72;
  }
}

* {
  box-sizing: border-box;
  scrollbar-color: var(--scrollbar-thumb) transparent;
  scrollbar-width: thin;
}

html {
  min-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--scrollbar-thumb);
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  background-clip: content-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  display: inline-flex;
  height: var(--button-height);
  min-height: var(--button-height);
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--button-radius);
  padding: 0 var(--button-padding-x);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: var(--button-font-size);
  line-height: 1;
  white-space: nowrap;
}

button:hover {
  background: var(--accent-dark);
}

button.ghost {
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
}

button.ghost:hover {
  border-color: var(--line-strong);
  background: var(--hover);
}

button.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button.primary {
  min-width: 88px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--text);
  outline: none;
}

input,
select {
  height: 38px;
  padding: 0 12px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
select {
  background-image: var(--field-icon, none);
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px 16px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
select {
  padding-left: 38px;
}

input[type="date"] {
  padding-right: 10px;
}

select.native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-button {
  position: relative;
  display: flex;
  width: 100%;
  height: 38px;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  justify-content: space-between;
  padding: 0 34px 0 38px;
  text-align: left;
}

.custom-select-button::before {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background-image: var(--custom-select-icon, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
}

.custom-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
  transform-origin: 50% 50%;
  transition: transform 0.16s ease;
}

.custom-select-button:hover,
.custom-select.open .custom-select-button {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
}

.custom-select.open .custom-select-arrow {
  transform: translateY(-35%) rotate(225deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 140;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.custom-select-option {
  width: 100%;
  justify-content: flex-start;
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  text-align: left;
}

.custom-select-option:hover,
.custom-select-option.active {
  background: var(--active);
  color: var(--accent);
}

.custom-select[data-name="access_mode"] {
  --custom-select-icon: var(--icon-key);
}

.custom-select[data-name="role"] {
  --custom-select-icon: var(--icon-shield);
}

.custom-select[data-name="status"] {
  --custom-select-icon: var(--icon-check);
}

.custom-select[data-name="member_role"] {
  --custom-select-icon: var(--icon-shield);
}

.custom-select[data-name="match_mode"] {
  --custom-select-icon: var(--icon-shield);
}

.custom-select[data-name="storage_provider"] {
  --custom-select-icon: var(--icon-image);
}

.custom-select[data-name="plan_ai_image_credit_reset_period"] {
  --custom-select-icon: var(--icon-refresh);
}

.custom-select[data-name="ai_image_feature_mode"],
.custom-select[data-name="album_story_feature_mode"] {
  --custom-select-icon: var(--icon-shield);
}

#securityTypeFilter + .custom-select {
  --custom-select-icon: var(--icon-shield);
}

#securityResultFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#auditMethodFilter + .custom-select {
  --custom-select-icon: var(--icon-server);
}

#auditResultFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#imageKindFilter + .custom-select {
  --custom-select-icon: var(--icon-tag);
}

#imageStatusFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#imageProviderFilter + .custom-select {
  --custom-select-icon: var(--icon-image);
}

#paidUsageTypeFilter + .custom-select {
  --custom-select-icon: var(--icon-tag);
}

#paidUsageProviderFilter + .custom-select {
  --custom-select-icon: var(--icon-database);
}

#paidUsageResultFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#cdnRefreshProviderFilter + .custom-select {
  --custom-select-icon: var(--icon-database);
}

#cdnRefreshStatusFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#systemJobTypeFilter + .custom-select {
  --custom-select-icon: var(--icon-server);
}

#systemJobStatusFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#appealStatusFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#reportStatusFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#wishlistStatusFilter + .custom-select,
#wishlistReviewStatus + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#wishlistVisibilityFilter + .custom-select {
  --custom-select-icon: var(--icon-view);
}

#orderStatusFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#orderProviderFilter + .custom-select {
  --custom-select-icon: var(--icon-key);
}

#safetyKeywordMatchFilter + .custom-select {
  --custom-select-icon: var(--icon-shield);
}

#safetyKeywordStatusFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

input[name="username"] {
  --field-icon: var(--icon-user);
}

input[type="search"] {
  --field-icon: var(--icon-search);
}

input[name="password"],
input[name="current_password"],
input[name="new_password"],
input[name="confirm_password"],
input[name="access_password"],
input[name="wechat_secret"],
input[name="redis_password"] {
  --field-icon: var(--icon-lock);
}

input[name="name"],
input[name="nickname"] {
  --field-icon: var(--icon-tag);
}

input[name="location"] {
  --field-icon: var(--icon-map);
}

input[name="event_at"] {
  --field-icon: var(--icon-calendar);
}

select[name="access_mode"] {
  --field-icon: var(--icon-key);
}

input[name="phone"] {
  --field-icon: var(--icon-phone);
}

input[name="member_identifier"] {
  --field-icon: var(--icon-user);
}

select[name="role"] {
  --field-icon: var(--icon-shield);
}

select[name="status"] {
  --field-icon: var(--icon-check);
}

select[name="storage_provider"] {
  --field-icon: var(--icon-image);
}

input[name="wechat_app_id"] {
  --field-icon: var(--icon-app);
}

input[name="wechat_pay_mch_id"],
input[name="wechat_pay_serial_no"],
input[name="wechat_pay_public_key_id"],
input[name="wechat_virtual_pay_offer_id"],
input[name="alipay_app_id"] {
  --field-icon: var(--icon-key);
}

input[name="wechat_pay_api_v3_key"],
input[name="wechat_virtual_pay_app_key"] {
  --field-icon: var(--icon-lock);
}

input[data-i18n-value="payEnv.productionOnly"] {
  --field-icon: var(--icon-check);
}

input[name="alipay_gateway"] {
  --field-icon: var(--icon-globe);
}

input[name="plan_name"] {
  --field-icon: var(--icon-tag);
}

input[name="plan_code"] {
  --field-icon: var(--icon-key);
}

input[name="plan_album_limit"],
input[name="plan_album_member_limit"] {
  --field-icon: var(--icon-image);
}

input[name="plan_photo_limit"],
input[name="plan_storage_limit_mb"] {
  --field-icon: var(--icon-database);
}

input[name="plan_recycle_days"],
input[name="plan_duration_days"] {
  --field-icon: var(--icon-calendar);
}

input[name="plan_export_limit"],
input[name="plan_sort_order"],
input[name="plan_ai_image_credits"],
input[name="ai_image_credit_cost"] {
  --field-icon: var(--icon-check);
}

input[name="plan_price_cents"] {
  --field-icon: var(--icon-captcha);
}

#refundAmountInput {
  --field-icon: var(--icon-captcha);
}

#refundReasonInput {
  background-image: var(--icon-tag);
  background-repeat: no-repeat;
  background-position: 12px 12px;
  background-size: 16px 16px;
  padding-left: 38px;
}

input[name="plan_description"] {
  --field-icon: var(--icon-tag);
}

select[name="plan_ai_image_credit_reset_period"] {
  --field-icon: var(--icon-refresh);
}

select[name="ai_image_feature_mode"],
select[name="album_story_feature_mode"] {
  --field-icon: var(--icon-shield);
}

input[name="redis_addr"] {
  --field-icon: var(--icon-server);
}

input[name="redis_db"] {
  --field-icon: var(--icon-database);
}

input[name="public_base_url"],
input[name="allowed_origins"],
input[name="wechat_scan_base_url"],
input[name="new_api_base_url"] {
  --field-icon: var(--icon-globe);
}

input[name="max_upload_mb"] {
  --field-icon: var(--icon-image);
}

input[name="qiniu_access_key"] {
  --field-icon: var(--icon-key);
}

input[name="qiniu_secret_key"] {
  --field-icon: var(--icon-lock);
}

input[name="qiniu_bucket"] {
  --field-icon: var(--icon-database);
}

input[name="qiniu_domain"],
input[name="qiniu_region"] {
  --field-icon: var(--icon-globe);
}

input[name="qiniu_prefix"] {
  --field-icon: var(--icon-tag);
}

input[name="qiniu_display_image_width"],
input[name="qiniu_display_image_quality"] {
  --field-icon: var(--icon-image);
}

input[name="qiniu_cdn_refresh_daily_limit"] {
  --field-icon: var(--icon-refresh);
}

input[name="qiniu_censor_daily_limit"] {
  --field-icon: var(--icon-check);
}

input[name="new_api_api_key"] {
  --field-icon: var(--icon-lock);
}

input[name="ai_image_model"] {
  --field-icon: var(--icon-image);
}

input[name="avatar_url"] {
  --field-icon: var(--icon-image);
}

input[name="captcha_code"] {
  --field-icon: var(--icon-captcha);
  text-transform: uppercase;
}

#auditKeyword,
#imageKeyword,
#orderKeyword,
#securityKeyword,
#safetyKeywordSearch,
#paidUsageKeyword,
#cdnRefreshKeyword,
#h5TemplateKeyword {
  --field-icon: var(--icon-search);
}

#safetyKeywordCategoryFilter,
#safetyKeywordForm input[name="keyword"],
#safetyKeywordForm input[name="category"] {
  --field-icon: var(--icon-tag);
}

#h5TemplateForm input[name="name"],
#h5TemplateForm input[name="code"],
#h5TemplateForm input[name="description"],
#albumH5Form input[name="title"],
#albumH5Form input[name="subtitle"] {
  --field-icon: var(--icon-tag);
}

#h5TemplateForm input[name="sort_order"] {
  --field-icon: var(--icon-check);
}

#h5TemplateStatusFilter + .custom-select {
  --custom-select-icon: var(--icon-check);
}

#safetyKeywordForm input[name="severity"] {
  --field-icon: var(--icon-shield);
}

#safetyKeywordForm select[name="match_mode"] {
  --field-icon: var(--icon-shield);
}

#paidUsageSourceFilter {
  --field-icon: var(--icon-globe);
}

#systemJobSourceFilter {
  --field-icon: var(--icon-server);
}

textarea {
  resize: vertical;
  padding: 10px 12px;
}

.settings-pane[data-settings-panel="payment"] textarea {
  background-image: var(--field-icon, none);
  background-repeat: no-repeat;
  background-position: 12px 12px;
  background-size: 16px 16px;
  padding-left: 38px;
}

textarea[name="wechat_pay_private_key"],
textarea[name="alipay_private_key"] {
  --field-icon: var(--icon-lock);
}

textarea[name="wechat_pay_public_key"],
textarea[name="alipay_public_key"] {
  --field-icon: var(--icon-key);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

.hidden {
  display: none !important;
}

.loading-state {
  display: flex;
  min-height: 148px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loadingSpin 0.8s linear infinite;
}

.skeleton-line,
.skeleton-block {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: var(--media);
}

.skeleton-line {
  width: var(--skeleton-width, 100%);
  height: var(--skeleton-height, 12px);
}

.skeleton-block {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.skeleton-line::after,
.skeleton-block::after {
  position: absolute;
  inset: 0;
  content: "";
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--panel) 62%, transparent), transparent);
  animation: skeletonShimmer 1.25s ease-in-out infinite;
}

.view {
  position: relative;
}

.view-loading::before {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  content: "";
}

.view-loading::after {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 24px;
  width: 36%;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  animation: viewLoadingBar 1.05s ease-in-out infinite;
}

@keyframes loadingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes skeletonShimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes viewLoadingBar {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(320%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner,
  .skeleton-line::after,
  .skeleton-block::after,
  .view-loading::after {
    animation: none;
  }
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-loading {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.auth-loading .loading-spinner {
  width: 24px;
  height: 24px;
}

.login-screen.auth-checking .auth-loading {
  display: flex;
}

.login-screen.auth-checking .login-panel {
  display: none;
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 30px;
}

.login-panel h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
}

.login-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
}

.password-login {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}

.password-login label {
  display: block;
}

.password-login input {
  font-size: 13px;
}

.password-login input::placeholder {
  color: var(--muted);
  font-size: 13px;
}

.password-login button {
  height: var(--button-height);
  margin-top: 4px;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.wechat-login {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 0;
  background: transparent;
}

.wechat-qr-button {
  position: relative;
  width: 176px;
  height: 176px;
  min-height: 176px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 12px;
  line-height: 1.4;
}

.wechat-qr-button::after {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  content: "↻";
  font-size: 28px;
  font-weight: 400;
}

.wechat-qr-button.expired::after {
  display: grid;
}

:root[data-theme="dark"] .wechat-qr-button::after {
  background: rgba(11, 11, 12, 0.82);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .wechat-qr-button::after {
    background: rgba(11, 11, 12, 0.82);
  }
}

.wechat-qr-button:hover {
  background: transparent;
}

.wechat-qr-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wechat-qr-button span {
  padding: 0 12px;
}

.wechat-login-copy {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.wechat-login-copy strong {
  color: var(--text);
  font-size: 14px;
}

.wechat-login-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.login-mode-toggle {
  width: 100%;
  height: auto;
  min-height: 24px;
  margin-top: 16px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 13px;
  font-weight: 400;
}

.login-mode-toggle:hover {
  background: transparent;
  color: var(--text);
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  align-items: center;
  gap: 8px;
}

.password-login .captcha-image-button {
  height: 38px;
  min-height: 38px;
  margin-top: 0;
  align-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 0;
}

.captcha-image-button:hover {
  border-color: var(--accent);
  background: var(--active);
}

.captcha-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 1280px;
  min-height: 48px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  outline: 0;
  user-select: none;
}

.brand:focus-visible {
  border-radius: 12px;
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.brand-logo {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 9px;
  object-fit: cover;
}

.topbar h1,
.panel h2,
.album-hero h2 {
  margin: 0;
}

.topbar h1 {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accountbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 8px;
}

.accountbar.open::after {
  position: absolute;
  top: 100%;
  right: 0;
  width: 250px;
  height: 18px;
  content: "";
}

.top-switches {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-icon-button {
  width: var(--icon-button-size);
  min-width: var(--icon-button-size);
  height: var(--icon-button-size);
  min-height: var(--icon-button-size);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.top-icon-button::before {
  display: block;
  width: 16px;
  height: 16px;
  background: currentColor;
  content: "";
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.top-icon-button:hover {
  background: transparent;
  color: var(--text);
}

.top-icon-button.active {
  background: transparent;
  color: var(--muted);
}

.top-icon-button.active:hover {
  color: var(--text);
}

.theme-toggle[data-mode="system"]::before {
  -webkit-mask-image: var(--icon-theme-system);
  mask-image: var(--icon-theme-system);
}

.theme-toggle[data-mode="light"]::before {
  -webkit-mask-image: var(--icon-theme-light);
  mask-image: var(--icon-theme-light);
}

.theme-toggle[data-mode="dark"]::before {
  -webkit-mask-image: var(--icon-theme-dark);
  mask-image: var(--icon-theme-dark);
}

.lang-toggle::before {
  width: auto;
  height: auto;
  background: transparent;
  content: "文";
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  -webkit-mask-image: none;
  mask-image: none;
}

.lang-toggle[data-mode="system"]::before {
  width: 16px;
  height: 16px;
  background: currentColor;
  content: "";
  -webkit-mask-image: var(--icon-globe);
  mask-image: var(--icon-globe);
}

.lang-toggle[data-mode="en"]::before {
  content: "A";
}

.avatar-button {
  display: grid;
  width: var(--icon-button-size);
  min-width: var(--icon-button-size);
  height: var(--icon-button-size);
  min-height: var(--icon-button-size);
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--active);
  color: var(--accent);
  padding: 0;
  font-size: 13px;
  font-weight: 700;
}

.avatar-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.avatar-button[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 30;
  width: 240px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.account-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.account-menu-avatar {
  position: relative;
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.account-menu-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-menu-avatar-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-summary-text {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.account-name {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-role {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-action {
  width: 100%;
  min-height: var(--button-height);
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  padding: 0 var(--button-padding-x);
  text-align: left;
}

.dropdown-action:hover {
  background: var(--hover);
  color: var(--danger);
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
  display: none;
}

.nav-button {
  min-height: var(--button-height);
  flex: 0 0 auto;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: var(--button-font-size);
}

.nav-beta-badge,
.feature-beta-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(43, 162, 70, 0.12);
  color: var(--accent);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.nav-beta-badge {
  top: -4px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  padding: 1px 4px;
}

.feature-beta-badge {
  top: -3px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  padding: 2px 4px;
}

.panel-title-inline {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.nav-menu {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.nav-menu.open::before,
.nav-menu:hover::before,
.nav-menu:focus-within::before {
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 12px;
  content: "";
}

.nav-menu-button {
  position: relative;
  min-height: var(--button-height);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 14px 0 0;
  font-size: var(--button-font-size);
}

.nav-menu-button::after {
  position: absolute;
  top: 50%;
  right: 0;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: translateY(-65%) rotate(45deg);
  transform-origin: 50% 50%;
}

.nav-menu.open .nav-menu-button::after,
.nav-menu:hover .nav-menu-button::after,
.nav-menu:focus-within .nav-menu-button::after {
  transform: translateY(-35%) rotate(225deg);
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 120;
  display: none;
  min-width: 112px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 6px;
}

.nav-menu.open .nav-menu-panel,
.nav-menu:hover .nav-menu-panel,
.nav-menu:focus-within .nav-menu-panel {
  display: grid;
  gap: 2px;
}

.nav-menu-panel .nav-button {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  border-radius: 8px;
  padding: 0 10px;
  text-align: left;
}

.nav-menu-panel .nav-button:hover,
.nav-menu-panel .nav-button.active {
  background: var(--hover);
}

.nav-button.active,
.nav-button:hover,
.nav-menu-button.active,
.nav-menu-button:hover,
.nav-menu.active .nav-menu-button,
.nav-menu:hover .nav-menu-button {
  background: transparent;
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 32px;
}

.layout.single {
  grid-template-columns: 1fr;
}

.albums-list-only {
  grid-template-columns: 1fr;
}

.albums-list-only .sidebar {
  position: static;
  max-height: none;
}

.albums-list-only .workspace {
  display: none;
}

.albums-list-only .album-list {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.albums-list-only #createAlbumButton {
  display: none;
}

.albums-list-only .album-item {
  min-height: 0;
}

.albums-detail-only {
  grid-template-columns: 1fr;
}

.albums-detail-only .sidebar {
  display: none;
}

.workspace {
  display: grid;
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.sidebar {
  position: sticky;
  top: 66px;
  align-self: start;
  max-height: calc(100vh - 84px);
  overflow: auto;
}

.panel-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-actions button {
  min-height: var(--button-height);
}

.panel-head h2,
.section-head h2 {
  font-size: 15px;
  font-weight: 700;
}

.profile-head {
  align-items: center;
  flex-direction: row;
}

.album-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.album-item {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: var(--field);
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.album-item:hover,
.album-item.active {
  border-color: var(--accent);
  background: var(--active);
}

.album-cover-grid {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: hidden;
  background: var(--soft);
  padding: 8px;
}

.album-cover-tile,
.album-cover-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  border-radius: 12px;
  background: var(--media);
}

.album-cover-tile {
  object-fit: cover;
}

.album-cover-placeholder {
  color: transparent;
}

.album-create-card .album-cover-grid {
  background: var(--soft);
}

.album-create-card .album-cover-placeholder {
  background: var(--media);
}

.create-cover-plus {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
}

.create-plus-line {
  position: absolute;
  border-radius: 999px;
  background: #ffffff;
}

.create-plus-horizontal {
  width: 20px;
  height: 2px;
}

.create-plus-vertical {
  width: 2px;
  height: 20px;
}

.create-card-body {
  min-height: 52px;
  align-content: center;
}

.album-card-body {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 10px 10px 12px;
}

.album-item strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-meta-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.album-meta-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-meta-row .album-access {
  flex: 0 0 auto;
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-album-card .album-cover-grid {
  background: var(--soft);
}

.skeleton-album-card .album-card-body {
  min-height: 76px;
  align-content: center;
}

.detail-panel {
  overflow: hidden;
}

.album-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.album-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.album-form .wide {
  grid-column: span 2;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  padding: 24px;
}

.modal-panel {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.modal-head h2 {
  margin: 0;
  font-size: 15px;
}

.modal-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: var(--icon-button-size);
  min-width: var(--icon-button-size);
  height: var(--icon-button-size);
  min-height: var(--icon-button-size);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--field);
  color: var(--muted);
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
}

.modal-head .icon-button {
  border: 0;
  background: transparent;
}

.modal-head .icon-button:hover {
  border: 0;
  background: var(--hover);
}

.modal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-form .switches,
.modal-form .modal-actions {
  grid-column: 1 / -1;
}

.confirm-modal-panel {
  width: min(420px, 100%);
}

.album-qrcode-modal-panel {
  width: min(360px, 100%);
}

.album-qrcode-modal-body {
  display: grid;
  place-items: center;
  padding: 24px 24px 12px;
}

.album-qrcode-frame {
  display: grid;
  width: min(260px, 72vw);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 12px;
}

.album-qrcode-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.album-qrcode-placeholder {
  color: var(--muted);
  font-size: 13px;
}

.payment-modal-panel {
  width: min(420px, 100%);
}

.refund-modal-panel {
  width: min(520px, 100%);
}

.admin-form.refund-modal-form {
  gap: 16px;
  grid-template-columns: 1fr;
}

.refund-order-summary {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  padding: 12px;
}

.refund-order-summary div {
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.refund-order-summary span {
  color: var(--muted);
  font-size: 12px;
}

.refund-order-summary strong {
  overflow: hidden;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refund-mode-field {
  display: grid;
  gap: 8px;
}

.refund-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.refund-mode-option {
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.25;
  padding: 10px 12px;
  user-select: none;
}

.refund-mode-option:hover {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
}

.refund-mode-option:has(input:checked) {
  border-color: rgba(43, 162, 70, 0.42);
  background: rgba(43, 162, 70, 0.08);
  color: var(--accent);
}

.refund-mode-option input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.refund-mode-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  overflow: visible;
  white-space: normal;
}

.refund-mode-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refund-mode-option:has(input:checked) .refund-mode-copy strong {
  color: var(--accent);
}

.refund-mode-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
}

.refund-preview {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(43, 162, 70, 0.24);
  border-radius: 12px;
  background: var(--accent-soft);
  padding: 12px;
}

.refund-preview span,
.refund-preview small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.refund-preview strong {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

.refund-preview.is-invalid {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.08);
}

.refund-preview.is-invalid strong {
  color: var(--danger);
}

.payment-modal-body {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.payment-order-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  padding: 12px;
}

.payment-order-summary div {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.payment-order-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-qr-box {
  display: grid;
  min-height: 260px;
  place-items: center;
}

.payment-qr-box svg {
  display: block;
  width: 260px;
  height: 260px;
  border-radius: 16px;
}

.payment-status-text {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.confirm-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.confirm-target {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  padding: 12px;
}

.confirm-target-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.confirm-target strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-confirm-user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.logout-confirm-user strong {
  min-width: 0;
}

.confirm-message {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.confirm-actions {
  margin-top: 2px;
}

.modal-actions {
  justify-content: flex-end;
}

.admin-form.user-modal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 0;
}

.admin-form.user-modal-form .modal-actions {
  grid-column: 1 / -1;
}

.admin-form.user-modal-form .user-form-checks {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form.profile-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 0;
  align-items: start;
}

.profile-avatar-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.profile-avatar-upload {
  display: inline-flex;
  width: fit-content;
  height: 44px;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  color: var(--text);
  padding: 0 12px 0 6px;
}

.profile-avatar-upload:hover,
.profile-avatar-upload:disabled {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
}

.profile-avatar-thumb {
  display: grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.profile-avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-upload-text {
  font-size: var(--button-font-size);
}

.admin-form.profile-form .form-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.admin-form.profile-form label {
  grid-template-rows: 18px 38px 16px;
  align-content: start;
  gap: 6px;
}

.admin-form.profile-form label > span {
  display: flex;
  min-height: 18px;
  align-items: center;
  line-height: 1.2;
}

.admin-form.profile-form input {
  height: 38px;
  min-height: 38px;
}

.admin-form.profile-form label:not(:has(.form-hint))::after {
  content: "";
  display: block;
  min-height: 16px;
}

.admin-form.password-modal-form {
  grid-template-columns: 1fr;
  border-bottom: 0;
}

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

.admin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.settings-tabs {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.settings-tab {
  position: relative;
  height: 36px;
  min-height: 36px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 14px;
}

.settings-tab:hover {
  background: transparent;
  color: var(--text);
}

.settings-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.settings-tab.active {
  background: transparent;
  color: var(--accent);
}

.settings-tab.active::after {
  background: var(--accent);
}

.settings-form {
  display: block;
}

.settings-pane {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-pane[data-settings-panel="plans"] {
  grid-template-columns: 1fr;
}

.settings-form .settings-wide {
  grid-column: auto;
}

.default-avatar-setting,
.mini-program-qrcode-setting {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.default-avatar-control,
.mini-program-qrcode-control {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.default-avatar-preview {
  position: relative;
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.default-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-program-qrcode-preview {
  position: relative;
  display: grid;
  width: 72px;
  min-width: 72px;
  height: 72px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.mini-program-qrcode-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.settings-form .form-actions {
  justify-content: flex-end;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.form-hint {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.form-hint.locked {
  color: var(--muted);
}

.form-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

input[readonly] {
  background: var(--soft);
  color: var(--muted);
}

.form-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-note {
  align-self: end;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.recycle-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.recycle-tab {
  position: relative;
  display: inline-flex;
  width: auto;
  height: 38px;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 14px;
}

.recycle-tab:hover {
  background: transparent;
  color: var(--text);
}

.recycle-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.recycle-tab.active {
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.recycle-tab.active::after {
  background: var(--accent);
}

.recycle-tab strong {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  padding: 0 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.recycle-tab.active strong {
  background: var(--accent-soft);
  color: var(--accent);
}

.recycle-sections {
  display: grid;
  gap: 22px;
  padding-top: 14px;
}

.recycle-section {
  display: grid;
  gap: 12px;
}

.recycle-size-cell {
  color: var(--muted);
  font-size: 13px;
}

.current-plan-box {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--soft);
  padding: 14px 16px;
}

.plans-content {
  display: grid;
  gap: 14px;
  padding: 12px;
}

.current-plan-title {
  color: var(--muted);
  font-size: 12px;
}

.current-plan-name {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.current-plan-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.plan-purchase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: 1fr;
  min-width: 0;
  align-items: stretch;
  gap: 12px;
}

.plan-purchase-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--field);
  padding: 14px;
}

.plan-purchase-card.active {
  border-color: rgba(43, 162, 70, 0.42);
  background:
    linear-gradient(180deg, rgba(43, 162, 70, 0.08), transparent 62%),
    var(--field);
}

.plan-purchase-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-purchase-title {
  min-width: 0;
  flex: 1 1 auto;
}

.plan-purchase-head h3 {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-purchase-quota {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.plan-purchase-head strong {
  display: inline-flex;
  min-height: 26px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 0 10px;
  white-space: nowrap;
}

.plan-purchase-quota {
  display: flex;
  min-width: 0;
  align-content: flex-start;
  flex-direction: column;
  gap: 6px;
}

.plan-purchase-quota span {
  display: block;
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-purchase-card > .badge {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  margin-top: 2px;
}

.plan-purchase-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.plan-pay-actions {
  display: flex;
  align-self: end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.plan-pay-actions button {
  flex: 1 1 0;
  min-width: 0;
}

.plan-editor {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--soft);
}

.plan-list-head {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}

.plan-modal-panel {
  width: min(760px, 100%);
}

.admin-form.plan-modal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 0;
}

.admin-form.plan-modal-form .plan-checks,
.admin-form.plan-modal-form .modal-actions {
  grid-column: 1 / -1;
}

.admin-form.safety-keyword-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-bottom: 0;
}

.safety-keyword-modal-panel {
  width: min(640px, 100%);
}

.admin-form.safety-keyword-form .settings-wide,
.admin-form.safety-keyword-form .plan-checks,
.admin-form.safety-keyword-form .modal-actions {
  grid-column: 1 / -1;
}

.safety-keyword-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--soft);
  padding: 4px;
}

.safety-keyword-mode-switch button {
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: calc(var(--radius-lg) - 4px);
  background: transparent;
  color: var(--muted);
}

.safety-keyword-mode-switch button:hover {
  background: var(--hover);
  color: var(--text);
}

.safety-keyword-mode-switch button.active {
  background: var(--panel);
  color: var(--accent);
  font-weight: 700;
}

.safety-keyword-form textarea[name="keywords_bulk"] {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
}

.safety-keyword-form .plan-checks {
  padding: 0;
}

.safety-keyword-form .modal-actions {
  padding-top: 2px;
}

.plan-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-form-grid label {
  min-width: 0;
}

.plan-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.plan-checks .check-row {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  background: var(--field);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  user-select: none;
}

.plan-checks .check-row:hover {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
}

.plan-checks .check-row:has(input:checked) {
  border-color: rgba(43, 162, 70, 0.42);
  background: rgba(43, 162, 70, 0.08);
  color: var(--accent);
}

.plan-checks .check-row input {
  display: grid;
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 0;
  place-items: center;
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
}

.plan-checks .check-row input::after {
  width: 8px;
  height: 8px;
  transform: scale(0);
  border-radius: 3px;
  background: #ffffff;
  content: "";
}

.plan-checks .check-row input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.plan-checks .check-row input:checked::after {
  transform: scale(1);
}

.plan-checks .check-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-title-stack {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.panel-title-stack h2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-h5-form {
  gap: 14px;
}

.h5-story-form {
  display: block;
  margin-top: 16px;
}

.h5-story-editor-layout {
  display: grid;
  grid-template-columns: minmax(364px, 392px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.h5-story-template-sidebar {
  min-width: 0;
}

.h5-story-template-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel);
}

.h5-story-main-fields {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.album-h5-form .wide,
.h5-template-form .wide {
  grid-column: 1 / -1;
}

.h5-story-section {
  display: grid;
  gap: 8px;
}

.h5-story-section-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.h5-story-section-head .form-label {
  min-width: 0;
}

.h5-story-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.h5-story-state {
  margin-top: 18px;
}

.h5-template-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.h5-template-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 188px;
  align-items: stretch;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--field);
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.h5-template-select {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  height: auto;
  min-height: 0;
  align-content: start;
  align-items: stretch;
  justify-content: flex-start;
  gap: 9px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  white-space: normal;
}

.h5-template-select:hover {
  background: transparent;
}

.h5-template-card:hover {
  border-color: var(--line-strong);
  background: var(--hover);
}

.h5-template-card.active,
.h5-template-card.previewing {
  border-color: rgba(43, 162, 70, 0.52);
  background: rgba(43, 162, 70, 0.06);
}

.h5-template-visual {
  position: relative;
  display: flex;
  width: 100%;
  height: 94px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: var(--panel);
}

.h5-template-visual::before {
  position: absolute;
  width: 54px;
  height: 66px;
  border: 0;
  border-radius: 7px;
  background: var(--field);
  content: "";
  opacity: 0.62;
  transform: translate(15px, 5px) rotate(7deg);
}

.h5-template-visual i {
  display: block;
  background: transparent;
}

.h5-template-visual-photo {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 70px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--field);
  transform: translate(-8px, 0) rotate(-6deg);
}

.h5-template-visual-photo::before {
  position: absolute;
  top: 7px;
  right: 7px;
  left: 7px;
  height: 42px;
  border-radius: 5px;
  background: var(--media);
  content: "";
}

.h5-template-visual-photo::after {
  position: absolute;
  right: 16px;
  bottom: 10px;
  left: 16px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  content: "";
  opacity: 0.52;
}

.h5-template-visual-copy {
  display: none !important;
}

.h5-template-visual-copy.short {
  width: 68%;
}

.h5-template-card-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.h5-template-card-main strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-template-card-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-template-card-main em {
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.h5-template-preview-action {
  width: 100%;
  height: 28px;
  min-height: 28px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 12px;
}

.h5-template-preview-panel {
  display: flex;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: var(--soft);
}

.story-preview-phone {
  width: min(280px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  background: var(--panel);
}

.story-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
}

.story-preview-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-preview-head span {
  flex: 0 0 auto;
}

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

.story-preview-grid span,
.story-preview-cover {
  display: block;
  overflow: hidden;
  background: var(--media);
}

.story-preview-grid span {
  aspect-ratio: 1;
  border-radius: 12px;
}

.story-preview-grid img,
.story-preview-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-preview-carousel {
  display: grid;
  gap: 10px;
}

.story-preview-cover {
  aspect-ratio: 4 / 5;
  border-radius: 18px;
}

.story-preview-thumb-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.story-preview-thumb-row i {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--media);
}

.story-preview-thumb-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-preview-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.story-preview-dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--line-strong);
}

.story-preview-dots i.active {
  width: 16px;
  background: var(--accent);
}

.album-h5-preview-modal-panel {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.album-h5-preview-modal-body {
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--soft);
}

.album-h5-preview-frame {
  width: min(360px, 100%);
}

.album-h5-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
}

.album-h5-preview-counter {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.story-h5-preview {
  position: relative;
  display: grid;
  aspect-ratio: 9 / 16;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(43, 162, 70, 0.08), transparent 30%),
    var(--panel);
  color: var(--text);
}

.story-h5-preview.template-nine_grid {
  background:
    linear-gradient(180deg, rgba(43, 162, 70, 0.08), transparent 26%),
    linear-gradient(135deg, var(--panel) 0%, var(--panel) 54%, rgba(43, 162, 70, 0.08) 54%, rgba(43, 162, 70, 0.08) 100%);
}

.story-h5-preview.template-minimal_story,
.story-h5-preview.template-twelve_carousel {
  background:
    linear-gradient(180deg, rgba(23, 32, 42, 0.62), transparent 32%),
    #111614;
}

.story-h5-topbar {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.story-h5-topbar span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 800;
}

.story-h5-topbar img {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.story-h5-topbar b {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-h5-preview.template-minimal_story .story-h5-topbar,
.story-h5-preview.template-minimal_story .story-h5-topbar span,
.story-h5-preview.template-twelve_carousel .story-h5-topbar,
.story-h5-preview.template-twelve_carousel .story-h5-topbar span {
  color: rgba(255, 255, 255, 0.88);
}

.story-h5-preview.template-minimal_story .story-h5-topbar {
  display: none;
}

.story-h5-slide-wrap {
  position: absolute;
  inset: 0;
}

.story-h5-slide {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 58px 16px 54px;
  animation: storyH5PreviewIn 260ms ease both;
}

.story-h5-copy {
  display: grid;
  gap: 9px;
  text-align: center;
}

.story-h5-copy.compact {
  gap: 7px;
}

.story-h5-copy p {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-h5-copy h1,
.story-h5-copy h2,
.story-h5-empty h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(25px, 7vw, 40px);
  line-height: 1.08;
}

.story-h5-copy h2,
.story-h5-empty h2 {
  font-size: clamp(22px, 6vw, 34px);
}

.story-h5-copy span,
.story-h5-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.story-h5-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.story-h5-meta b {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(43, 162, 70, 0.24);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--text);
  font-size: 11px;
}

.story-h5-mosaic,
.story-h5-grid {
  display: grid;
  gap: 7px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 7px;
  background: var(--panel);
}

.story-h5-preview.template-nine_grid .story-h5-mosaic,
.story-h5-preview.template-nine_grid .story-h5-grid {
  transform: rotate(-1deg);
}

.story-h5-preview.template-minimal_story .story-h5-mosaic,
.story-h5-preview.template-twelve_carousel .story-h5-mosaic,
.story-h5-preview.template-twelve_carousel .story-h5-grid {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.story-h5-mosaic {
  max-width: 292px;
}

.story-h5-mosaic.grid-four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-h5-mosaic.grid-three {
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.story-h5-mosaic.grid-minimal {
  grid-template-columns: 1fr;
}

.story-h5-mosaic.grid-minimal figure {
  aspect-ratio: 4 / 5;
}

.story-h5-mosaic.grid-minimal figure + figure {
  display: none;
}

.story-h5-mosaic figure,
.story-h5-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 15px;
  background: var(--media);
}

.story-h5-mosaic figure {
  aspect-ratio: 1;
}

.story-h5-mosaic.grid-three figure:first-child {
  grid-row: 1 / 3;
  aspect-ratio: auto;
}

.story-h5-mosaic img,
.story-h5-grid img,
.story-h5-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-h5-grid-slide {
  justify-content: center;
}

.story-h5-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 40px;
  max-width: 316px;
}

.story-h5-grid figure {
  position: relative;
}

.story-h5-grid figure:nth-child(1) {
  grid-column: span 3;
  grid-row: span 2;
}

.story-h5-grid figure:nth-child(2),
.story-h5-grid figure:nth-child(3) {
  grid-column: span 3;
}

.story-h5-grid figure:nth-child(4),
.story-h5-grid figure:nth-child(5),
.story-h5-grid figure:nth-child(6) {
  grid-column: span 2;
  grid-row: span 2;
}

.story-h5-grid figure:nth-child(7),
.story-h5-grid figure:nth-child(8),
.story-h5-grid figure:nth-child(9) {
  grid-column: span 2;
}

.story-h5-photo-slide {
  justify-content: flex-end;
}

.story-h5-photo {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px 24px 44px 24px;
  background: var(--media);
}

.story-h5-preview.template-minimal_story .story-h5-photo-slide,
.story-h5-preview.template-minimal_story .story-h5-photo-set-slide,
.story-h5-preview.template-twelve_carousel .story-h5-photo-slide {
  justify-content: center;
  gap: 0;
  padding: 0;
}

.story-h5-preview.template-twelve_carousel .story-h5-photo-slide {
  justify-content: flex-end;
}

.story-h5-preview.template-minimal_story .story-h5-photo,
.story-h5-preview.template-twelve_carousel .story-h5-photo {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
}

.story-h5-preview.template-twelve_carousel .story-h5-photo::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 35%),
    linear-gradient(0deg, rgba(8, 12, 10, 0.84), transparent 55%);
  content: "";
}

.story-h5-preview.template-minimal_story .story-h5-photo-slide .story-h5-copy,
.story-h5-preview.template-minimal_story .story-h5-photo-set-slide .story-h5-copy {
  display: none;
}

.story-h5-preview.template-twelve_carousel .story-h5-photo-slide .story-h5-copy {
  position: relative;
  z-index: 2;
  margin: 0 16px 52px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  padding: 14px;
  background: rgba(17, 22, 20, 0.42);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
}

.story-h5-preview.template-minimal_story .story-h5-copy h1,
.story-h5-preview.template-minimal_story .story-h5-copy h2,
.story-h5-preview.template-minimal_story .story-h5-copy span,
.story-h5-preview.template-minimal_story .story-h5-empty h2,
.story-h5-preview.template-minimal_story .story-h5-empty span,
.story-h5-preview.template-twelve_carousel .story-h5-copy h1,
.story-h5-preview.template-twelve_carousel .story-h5-copy h2,
.story-h5-preview.template-twelve_carousel .story-h5-copy span,
.story-h5-preview.template-twelve_carousel .story-h5-empty h2,
.story-h5-preview.template-twelve_carousel .story-h5-empty span {
  color: #fff;
}

.story-h5-preview.template-minimal_story .story-h5-copy p,
.story-h5-preview.template-twelve_carousel .story-h5-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.story-h5-preview.template-minimal_story .story-h5-meta b,
.story-h5-preview.template-twelve_carousel .story-h5-meta b {
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.story-h5-photo-set {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 26% 18%, rgba(43, 162, 70, 0.18), transparent 30%),
    linear-gradient(180deg, #151a18 0%, #0d1110 100%);
}

.story-h5-photo-set figure {
  margin: 0;
  overflow: visible;
  background: #f8f5ed;
  box-shadow: none;
}

.story-h5-photo-set.single figure {
  position: relative;
  z-index: 1;
  width: min(78%, 282px);
  aspect-ratio: 1;
  border-radius: 20px 20px 28px 28px;
  padding: 10px 10px 30px;
  transform: rotate(-2deg);
}

.story-h5-photo-set.single figure::before {
  position: absolute;
  z-index: -1;
  inset: 10px -10px -8px 10px;
  border-radius: 20px 20px 28px 28px;
  background: rgba(248, 245, 237, 0.48);
  content: "";
  transform: rotate(7deg);
}

.story-h5-photo-set.pair {
  display: grid;
  place-items: center;
  grid-template-areas: "stack";
  padding: 56px 16px 54px;
  --memory-back-transform: translate(-18px, -30px) rotate(-8deg);
  --memory-front-transform: translate(22px, 32px) rotate(7deg);
  cursor: pointer;
}

.story-h5-photo-set.pair figure {
  position: relative;
  z-index: 1;
  grid-area: stack;
  width: min(70%, 254px);
  aspect-ratio: 1;
  border-radius: 20px 20px 28px 28px;
  padding: 9px 9px 28px;
  cursor: pointer;
  transition:
    transform 460ms cubic-bezier(0.18, 0.88, 0.22, 1),
    filter 320ms ease,
    opacity 260ms ease;
  will-change: transform;
}

.story-h5-photo-set.pair figure:first-child {
  transform: var(--memory-back-transform);
}

.story-h5-photo-set.pair figure:nth-child(2) {
  z-index: 2;
  transform: var(--memory-front-transform);
}

.story-h5-photo-set.pair figure.is-back {
  z-index: 1;
  transform: var(--memory-back-transform);
}

.story-h5-photo-set.pair figure.is-front {
  z-index: 3;
  cursor: default;
  transform: var(--memory-front-transform);
}

.story-h5-photo-set.pair figure.is-promoting {
  z-index: 4;
  animation: storyH5MemoryPromote 540ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.story-h5-photo-set.pair figure.is-retiring {
  z-index: 2;
  animation: storyH5MemoryRetire 540ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.story-h5-photo-set img {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  object-fit: cover;
}

.story-h5-photo.shape-a {
  border-radius: 44px 24px 24px 24px;
}

.story-h5-outro,
.story-h5-empty {
  align-items: center;
  text-align: center;
}

.story-h5-logo-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.story-h5-empty .story-h5-logo-placeholder {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
}

.story-h5-logo-placeholder img {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.story-h5-dots {
  position: absolute;
  z-index: 5;
  right: 12px;
  top: 50%;
  display: grid;
  gap: 7px;
  transform: translateY(-50%);
}

.story-h5-dots button {
  width: 7px;
  height: 7px;
  min-height: 7px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(102, 113, 127, 0.35);
}

.story-h5-dots button.active {
  height: 20px;
  background: var(--accent);
}

@keyframes storyH5PreviewIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes storyH5MemoryPromote {
  0% {
    filter: saturate(0.94);
    transform: var(--memory-back-transform) scale(0.98);
  }
  46% {
    filter: saturate(1.05);
    transform: translate(3px, -15px) rotate(-1deg) scale(1.06);
  }
  100% {
    filter: saturate(1);
    transform: var(--memory-front-transform);
  }
}

@keyframes storyH5MemoryRetire {
  0% {
    filter: saturate(1);
    transform: var(--memory-front-transform);
  }
  42% {
    filter: saturate(0.94);
    transform: translate(-3px, 15px) rotate(1deg) scale(0.96);
  }
  100% {
    filter: saturate(0.96);
    transform: var(--memory-back-transform);
  }
}

.h5-photo-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 8px;
  max-height: 336px;
  overflow: auto;
  padding: 2px;
}

.h5-photo-picker-summary {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.h5-photo-picker-summary strong {
  color: var(--accent);
  font-size: 16px;
}

.h5-photo-option {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  height: auto;
  min-height: 62px;
  align-items: center;
  justify-content: stretch;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 9px 7px 7px;
  background: var(--field);
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.h5-photo-option:hover {
  border-color: var(--line-strong);
  background: var(--hover);
}

.h5-photo-option.active {
  border-color: rgba(43, 162, 70, 0.58);
  background: rgba(43, 162, 70, 0.06);
}

.h5-photo-thumb {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--media);
}

.h5-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.h5-photo-meta {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.h5-photo-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-photo-meta small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.h5-photo-check {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
}

.h5-photo-option.active .h5-photo-check {
  border-color: var(--accent);
  background: var(--accent);
}

.h5-photo-option.active .h5-photo-check::before {
  width: 8px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: rotate(-45deg);
}

.h5-photo-option.active .h5-photo-meta small {
  color: var(--accent);
  font-weight: 700;
}

.h5-publish-check,
.h5-template-checks {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.h5-publish-check {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.h5-publish-check .check-row {
  width: auto;
  min-width: max-content;
  min-height: 36px;
  border-radius: 10px;
  padding: 0 10px;
}

.h5-duration-row {
  display: inline-flex;
  gap: 12px;
  cursor: default;
}

.h5-duration-row input[name="slide_duration"] {
  display: none;
}

.h5-duration-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.h5-duration-stepper b {
  min-width: 30px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.h5-duration-button {
  display: inline-flex;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--panel);
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.h5-duration-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
}

.h5-duration-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.h5-link-box {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-template-name-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.h5-template-name-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-default-badge {
  flex: 0 0 auto;
}

.members-modal-panel {
  width: min(1180px, calc(100vw - 28px));
}

.member-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.member-form > label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.member-form > label > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.member-form > label:first-child {
  flex: 1 1 260px;
  min-width: 220px;
}

.member-form > label:nth-child(2) {
  flex: 0 0 150px;
}

.member-form > label:first-child input {
  min-width: 0;
}

.member-permission-section {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  gap: 8px;
}

.member-permission-title {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.member-permission-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.check-card {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.member-permission-card {
  display: inline-flex;
  min-width: 62px;
  align-items: center;
  flex-direction: row;
  justify-content: flex-start;
}

.member-form .member-permission-card {
  display: inline-flex;
  flex-direction: row;
}

.member-permission-card span:last-child {
  min-width: 0;
  line-height: 1;
  white-space: nowrap;
}

.member-form .modal-actions {
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: nowrap;
}

.check-card:has(input:checked) {
  border-color: rgba(43, 162, 70, 0.42);
  background: rgba(43, 162, 70, 0.08);
  color: var(--accent);
}

.check-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.member-permission-indicator,
.member-permission-dot {
  position: relative;
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
}

.check-card:has(input:checked) .member-permission-indicator,
.member-permission-compact:has(input:checked) .member-permission-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.member-permission-indicator::after,
.member-permission-dot::after {
  width: 4px;
  height: 7px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  content: "";
  opacity: 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.check-card:has(input:checked) .member-permission-indicator::after,
.member-permission-compact:has(input:checked) .member-permission-dot::after {
  opacity: 1;
}

.members-table-wrap {
  max-height: min(46vh, 460px);
  margin-top: 14px;
}

.member-role-select {
  width: 118px;
  height: 34px;
  padding-left: 12px;
  background-image: none;
}

.member-role-select + .custom-select {
  --custom-select-icon: var(--icon-shield);
  width: 118px;
}

.member-role-select + .custom-select .custom-select-button {
  height: 34px;
  min-height: 34px;
  border-radius: 11px;
  padding-left: 32px;
}

.member-role-select + .custom-select .custom-select-button::before {
  left: 10px;
  width: 14px;
  height: 14px;
}

.member-permission-cell {
  text-align: center;
}

.member-permission-compact {
  display: inline-flex;
  min-width: 34px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--field);
  cursor: pointer;
}

.member-permission-compact:has(input:checked) {
  border-color: rgba(43, 162, 70, 0.42);
  background: rgba(43, 162, 70, 0.08);
}

.member-permission-check {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.member-row-user {
  display: inline-flex;
  min-width: 0;
  max-width: 230px;
  align-items: center;
  gap: 8px;
}

.member-row-user img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.qiniu-censor-setting {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qiniu-censor-checks {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
}

.plan-table-wrap {
  width: 100%;
  margin-top: 0;
}

.plan-quota {
  max-width: 420px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

.table-loading-row td {
  height: 54px;
}

.table-loading-row .skeleton-line {
  max-width: 180px;
}

th.is-ellipsis,
td.is-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-cell {
  display: inline-flex;
  max-width: 280px;
  min-width: 0;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}

.user-avatar {
  position: relative;
  display: inline-grid;
  width: 28px;
  min-width: 28px;
  height: 28px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.user-avatar-fallback {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-name .badge {
  flex: 0 0 auto;
}

.user-info {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-account {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.audit-head-actions,
.order-head-actions,
.image-head-actions,
.appeal-head-actions,
.report-head-actions,
.wishlist-head-actions,
.security-head-actions,
.paid-usage-head-actions,
.safety-keyword-head-actions,
.cdn-refresh-head-actions,
.system-jobs-head-actions,
.h5-template-head-actions {
  flex-wrap: nowrap;
}

.compact-filter-input {
  width: clamp(160px, 18vw, 220px);
  flex: 0 1 clamp(160px, 18vw, 220px);
  font-size: var(--button-font-size);
  line-height: 1;
  padding-left: 12px;
}

.compact-filter-input-short {
  width: clamp(96px, 10vw, 128px);
  flex-basis: clamp(96px, 10vw, 128px);
}

.filter-head-actions .custom-select {
  width: clamp(112px, 10vw, 136px);
  flex: 0 0 clamp(112px, 10vw, 136px);
}

.filter-head-actions {
  position: relative;
}

.layout,
.panel {
  min-width: 0;
}

:is(
  #recycleView,
  #myOrdersView,
  #usersView,
  #ordersView,
  #imagesView,
  #appealsView,
  #reportsView,
  #wishlistView,
  #auditView,
  #securityView,
  #paidUsageView,
  #safetyKeywordsView,
  #cdnRefreshView,
  #systemJobsView,
  #h5TemplatesView,
  #settingsView
) > .panel {
  min-width: 0;
}

:is(
  #recycleView,
  #myOrdersView,
  #usersView,
  #ordersView,
  #imagesView,
  #appealsView,
  #reportsView,
  #wishlistView,
  #auditView,
  #securityView,
  #paidUsageView,
  #safetyKeywordsView,
  #cdnRefreshView,
  #systemJobsView,
  #h5TemplatesView,
  #settingsView
) .table-wrap {
  max-width: 100%;
}

:is(
  #recycleView,
  #myOrdersView,
  #usersView,
  #ordersView,
  #imagesView,
  #appealsView,
  #reportsView,
  #wishlistView,
  #auditView,
  #securityView,
  #paidUsageView,
  #safetyKeywordsView,
  #cdnRefreshView,
  #systemJobsView,
  #h5TemplatesView
) .table-wrap > table,
#settingsView .plan-table-wrap > table,
.members-table-wrap > table,
.export-jobs-table-wrap > table {
  table-layout: fixed;
}

:is(
  #recycleView,
  #myOrdersView,
  #usersView,
  #ordersView,
  #imagesView,
  #appealsView,
  #reportsView,
  #wishlistView,
  #auditView,
  #securityView,
  #paidUsageView,
  #safetyKeywordsView,
  #cdnRefreshView,
  #systemJobsView,
  #h5TemplatesView
) .table-wrap td,
#settingsView .plan-table-wrap td,
.members-table-wrap td,
.export-jobs-table-wrap td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

:is(
  #recycleView,
  #myOrdersView,
  #usersView,
  #ordersView,
  #imagesView,
  #appealsView,
  #reportsView,
  #wishlistView,
  #auditView,
  #securityView,
  #paidUsageView,
  #safetyKeywordsView,
  #cdnRefreshView,
  #systemJobsView,
  #h5TemplatesView
) .table-wrap td > :is(div, span, strong, small):not(.badge):not(.method-pill):not(.status-code):not(.table-actions):not(.admin-image-preview),
#settingsView .plan-table-wrap td > :is(div, span, strong, small):not(.badge):not(.method-pill):not(.status-code):not(.table-actions),
.members-table-wrap td > :is(div, span, strong, small):not(.badge):not(.method-pill):not(.status-code):not(.table-actions),
.export-jobs-table-wrap td > :is(div, span, strong, small):not(.badge):not(.method-pill):not(.status-code):not(.table-actions) {
  max-width: 100%;
  min-width: 0;
}

:is(
  #recycleView,
  #myOrdersView,
  #usersView,
  #ordersView,
  #imagesView,
  #appealsView,
  #reportsView,
  #wishlistView,
  #auditView,
  #securityView,
  #paidUsageView,
  #safetyKeywordsView,
  #cdnRefreshView,
  #systemJobsView,
  #h5TemplatesView
) :is(.audit-user, .user-cell, .user-info, .admin-image-cell, .admin-image-info, .audit-path, .audit-client, .audit-sub, .security-target, .security-content, .security-error, .wishlist-content, .plan-quota),
#settingsView :is(.plan-quota, .audit-sub),
.members-table-wrap :is(.member-row-user, .audit-sub),
.export-jobs-table-wrap :is(.audit-sub, .security-error) {
  max-width: 100%;
  min-width: 0;
}

:is(
  #recycleView,
  #myOrdersView,
  #usersView,
  #ordersView,
  #imagesView,
  #appealsView,
  #reportsView,
  #wishlistView,
  #safetyKeywordsView,
  #systemJobsView,
  #h5TemplatesView,
  #settingsView
) .table-actions {
  flex-wrap: wrap;
}

#recycleView table {
  min-width: 900px;
}

#recycleView th:nth-child(1),
#recycleView td:nth-child(1) {
  width: 260px;
}

#recycleView th:nth-child(2),
#recycleView td:nth-child(2) {
  width: 96px;
}

#recycleView th:nth-child(3),
#recycleView td:nth-child(3),
#recycleView th:nth-child(4),
#recycleView td:nth-child(4) {
  width: 160px;
}

#recycleView th:nth-child(5),
#recycleView td:nth-child(5),
#recycleView th:nth-child(6),
#recycleView td:nth-child(6) {
  width: 150px;
}

#myOrdersView table {
  min-width: 760px;
}

#myOrdersView th:nth-child(1),
#myOrdersView td:nth-child(1) {
  width: 148px;
}

#myOrdersView th:nth-child(2),
#myOrdersView td:nth-child(2) {
  width: 260px;
}

#myOrdersView th:nth-child(3),
#myOrdersView td:nth-child(3),
#myOrdersView th:nth-child(4),
#myOrdersView td:nth-child(4),
#myOrdersView th:nth-child(5),
#myOrdersView td:nth-child(5) {
  width: 112px;
}

#usersView table {
  min-width: 760px;
}

#usersView th:nth-child(1),
#usersView td:nth-child(1) {
  width: 300px;
}

#usersView th:nth-child(2),
#usersView td:nth-child(2),
#usersView th:nth-child(3),
#usersView td:nth-child(3) {
  width: 96px;
}

#usersView th:nth-child(4),
#usersView td:nth-child(4) {
  width: 140px;
}

#usersView th:nth-child(5),
#usersView td:nth-child(5) {
  width: 128px;
}

#ordersView table {
  min-width: 1180px;
}

#ordersView th:nth-child(1),
#ordersView td:nth-child(1) {
  width: 148px;
}

#ordersView th:nth-child(2),
#ordersView td:nth-child(2) {
  width: 180px;
}

#ordersView th:nth-child(3),
#ordersView td:nth-child(3),
#ordersView th:nth-child(4),
#ordersView td:nth-child(4) {
  width: 160px;
}

#ordersView th:nth-child(5),
#ordersView td:nth-child(5),
#ordersView th:nth-child(7),
#ordersView td:nth-child(7) {
  width: 90px;
}

#ordersView th:nth-child(6),
#ordersView td:nth-child(6) {
  width: 108px;
}

#ordersView th:nth-child(8),
#ordersView td:nth-child(8) {
  width: 140px;
}

#ordersView th:nth-child(9),
#ordersView td:nth-child(9) {
  width: 134px;
}

#imagesView table {
  min-width: 1180px;
}

#imagesView th:nth-child(1),
#imagesView td:nth-child(1) {
  width: 260px;
}

#imagesView th:nth-child(2),
#imagesView td:nth-child(2),
#imagesView th:nth-child(5),
#imagesView td:nth-child(5) {
  width: 108px;
}

#imagesView th:nth-child(3),
#imagesView td:nth-child(3) {
  width: 150px;
}

#imagesView th:nth-child(4),
#imagesView td:nth-child(4) {
  width: 170px;
}

#imagesView th:nth-child(6),
#imagesView td:nth-child(6) {
  width: 148px;
}

#imagesView th:nth-child(7),
#imagesView td:nth-child(7) {
  width: 236px;
}

:is(#appealsView, #reportsView) table {
  min-width: 980px;
}

:is(#appealsView, #reportsView) th:nth-child(1),
:is(#appealsView, #reportsView) td:nth-child(1) {
  width: 148px;
}

:is(#appealsView, #reportsView) th:nth-child(2),
:is(#appealsView, #reportsView) td:nth-child(2) {
  width: 240px;
}

:is(#appealsView, #reportsView) th:nth-child(3),
:is(#appealsView, #reportsView) td:nth-child(3) {
  width: 170px;
}

:is(#appealsView, #reportsView) th:nth-child(5),
:is(#appealsView, #reportsView) td:nth-child(5) {
  width: 100px;
}

:is(#appealsView, #reportsView) th:nth-child(6),
:is(#appealsView, #reportsView) td:nth-child(6) {
  width: 92px;
}

#wishlistView table {
  min-width: 1080px;
}

#wishlistView th:nth-child(1),
#wishlistView td:nth-child(1) {
  width: 148px;
}

#wishlistView th:nth-child(2),
#wishlistView td:nth-child(2) {
  width: 170px;
}

#wishlistView th:nth-child(4),
#wishlistView td:nth-child(4) {
  width: 100px;
}

#wishlistView th:nth-child(6),
#wishlistView td:nth-child(6) {
  width: 150px;
}

#auditView table {
  min-width: 1050px;
}

#auditView th:nth-child(1),
#auditView td:nth-child(1) {
  width: 148px;
}

#auditView th:nth-child(2),
#auditView td:nth-child(2) {
  width: 180px;
}

#auditView th:nth-child(3),
#auditView td:nth-child(3),
#auditView th:nth-child(7),
#auditView td:nth-child(7),
#auditView th:nth-child(8),
#auditView td:nth-child(8) {
  width: 82px;
}

#auditView th:nth-child(5),
#auditView td:nth-child(5) {
  width: 100px;
}

#auditView th:nth-child(6),
#auditView td:nth-child(6) {
  width: 140px;
}

#securityView table {
  min-width: 1220px;
}

#securityView th:nth-child(1),
#securityView td:nth-child(1) {
  width: 148px;
}

#securityView th:nth-child(2),
#securityView td:nth-child(2) {
  width: 180px;
}

#securityView th:nth-child(3),
#securityView td:nth-child(3),
#securityView th:nth-child(6),
#securityView td:nth-child(6),
#securityView th:nth-child(9),
#securityView td:nth-child(9) {
  width: 90px;
}

#securityView th:nth-child(4),
#securityView td:nth-child(4) {
  width: 168px;
}

#securityView th:nth-child(7),
#securityView td:nth-child(7),
#securityView th:nth-child(8),
#securityView td:nth-child(8) {
  width: 132px;
}

#paidUsageView table {
  min-width: 1120px;
}

#paidUsageView th:nth-child(1),
#paidUsageView td:nth-child(1) {
  width: 148px;
}

#paidUsageView th:nth-child(2),
#paidUsageView td:nth-child(2) {
  width: 180px;
}

#paidUsageView th:nth-child(3),
#paidUsageView td:nth-child(3),
#paidUsageView th:nth-child(5),
#paidUsageView td:nth-child(5),
#paidUsageView th:nth-child(6),
#paidUsageView td:nth-child(6),
#paidUsageView th:nth-child(8),
#paidUsageView td:nth-child(8) {
  width: 130px;
}

#paidUsageView th:nth-child(4),
#paidUsageView td:nth-child(4) {
  width: 128px;
  max-width: 128px;
}

#paidUsageView th:nth-child(7),
#paidUsageView td:nth-child(7) {
  width: 116px;
}

#paidUsageView th:nth-child(9),
#paidUsageView td:nth-child(9) {
  width: 88px;
}

#safetyKeywordsView table {
  min-width: 1040px;
}

#safetyKeywordsView th:nth-child(1),
#safetyKeywordsView td:nth-child(1) {
  width: 260px;
}

#safetyKeywordsView th:nth-child(2),
#safetyKeywordsView td:nth-child(2),
#safetyKeywordsView th:nth-child(3),
#safetyKeywordsView td:nth-child(3),
#safetyKeywordsView th:nth-child(4),
#safetyKeywordsView td:nth-child(4),
#safetyKeywordsView th:nth-child(5),
#safetyKeywordsView td:nth-child(5) {
  width: 104px;
}

#safetyKeywordsView th:nth-child(6),
#safetyKeywordsView td:nth-child(6) {
  width: 160px;
}

#safetyKeywordsView th:nth-child(7),
#safetyKeywordsView td:nth-child(7) {
  width: 200px;
}

#cdnRefreshView table {
  min-width: 1120px;
}

#cdnRefreshView th:nth-child(1),
#cdnRefreshView td:nth-child(1),
#cdnRefreshView th:nth-child(6),
#cdnRefreshView td:nth-child(6) {
  width: 148px;
}

#cdnRefreshView th:nth-child(2),
#cdnRefreshView td:nth-child(2) {
  width: 340px;
}

#cdnRefreshView th:nth-child(3),
#cdnRefreshView td:nth-child(3) {
  width: 160px;
}

#cdnRefreshView th:nth-child(4),
#cdnRefreshView td:nth-child(4),
#cdnRefreshView th:nth-child(5),
#cdnRefreshView td:nth-child(5) {
  width: 112px;
}

#cdnRefreshView th:nth-child(7),
#cdnRefreshView td:nth-child(7) {
  width: 140px;
}

#h5TemplatesView table {
  min-width: 960px;
}

#h5TemplatesView th:nth-child(1),
#h5TemplatesView td:nth-child(1) {
  width: 180px;
}

#h5TemplatesView th:nth-child(2),
#h5TemplatesView td:nth-child(2),
#h5TemplatesView th:nth-child(5),
#h5TemplatesView td:nth-child(5) {
  width: 110px;
}

#h5TemplatesView th:nth-child(4),
#h5TemplatesView td:nth-child(4) {
  width: 72px;
}

#h5TemplatesView th:nth-child(6),
#h5TemplatesView td:nth-child(6) {
  width: 200px;
}

#settingsView .plan-table-wrap table {
  min-width: 1000px;
}

#settingsView .plan-table-wrap th:nth-child(1),
#settingsView .plan-table-wrap td:nth-child(1) {
  width: 180px;
}

#settingsView .plan-table-wrap th:nth-child(2),
#settingsView .plan-table-wrap td:nth-child(2) {
  width: 320px;
}

#settingsView .plan-table-wrap th:nth-child(3),
#settingsView .plan-table-wrap td:nth-child(3),
#settingsView .plan-table-wrap th:nth-child(4),
#settingsView .plan-table-wrap td:nth-child(4),
#settingsView .plan-table-wrap th:nth-child(5),
#settingsView .plan-table-wrap td:nth-child(5) {
  width: 116px;
}

#settingsView .plan-table-wrap th:nth-child(6),
#settingsView .plan-table-wrap td:nth-child(6) {
  width: 152px;
}

.members-table-wrap table {
  min-width: 900px;
}

.members-table-wrap th:nth-child(1),
.members-table-wrap td:nth-child(1) {
  width: 240px;
}

.members-table-wrap th:nth-child(2),
.members-table-wrap td:nth-child(2) {
  width: 150px;
}

.members-table-wrap th:nth-child(3),
.members-table-wrap td:nth-child(3),
.members-table-wrap th:nth-child(4),
.members-table-wrap td:nth-child(4),
.members-table-wrap th:nth-child(5),
.members-table-wrap td:nth-child(5),
.members-table-wrap th:nth-child(6),
.members-table-wrap td:nth-child(6),
.members-table-wrap th:nth-child(7),
.members-table-wrap td:nth-child(7) {
  width: 72px;
}

.members-table-wrap th:nth-child(8),
.members-table-wrap td:nth-child(8) {
  width: 150px;
}

.export-jobs-table-wrap table {
  min-width: 660px;
}

.export-jobs-table-wrap th:nth-child(1),
.export-jobs-table-wrap td:nth-child(1),
.export-jobs-table-wrap th:nth-child(4),
.export-jobs-table-wrap td:nth-child(4) {
  width: 148px;
}

.export-jobs-table-wrap th:nth-child(2),
.export-jobs-table-wrap td:nth-child(2) {
  width: 150px;
}

.export-jobs-table-wrap th:nth-child(3),
.export-jobs-table-wrap td:nth-child(3),
.export-jobs-table-wrap th:nth-child(5),
.export-jobs-table-wrap td:nth-child(5) {
  width: 100px;
}

#systemJobsView,
#systemJobsView > .panel {
  min-width: 0;
}

.system-jobs-head-actions {
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.system-jobs-head-actions .mobile-filter-popover {
  display: flex;
  min-width: 0;
  flex: 1 1 620px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.system-jobs-head-actions .compact-filter-input {
  flex: 1 1 150px;
}

.system-jobs-head-actions .compact-filter-input-short {
  flex: 0 1 112px;
}

.system-jobs-table-wrap {
  max-width: 100%;
}

.system-jobs-table {
  min-width: 1040px;
  table-layout: fixed;
}

.system-jobs-table th:nth-child(1),
.system-jobs-table td:nth-child(1),
.system-jobs-table th:nth-child(6),
.system-jobs-table td:nth-child(6) {
  width: 148px;
}

.system-jobs-table th:nth-child(2),
.system-jobs-table td:nth-child(2) {
  width: 146px;
}

.system-jobs-table th:nth-child(4),
.system-jobs-table td:nth-child(4) {
  width: 150px;
}

.system-jobs-table th:nth-child(5),
.system-jobs-table td:nth-child(5) {
  width: 76px;
}

.system-jobs-table th:nth-child(7),
.system-jobs-table td:nth-child(7) {
  width: 176px;
}

.system-jobs-table th:nth-child(8),
.system-jobs-table td:nth-child(8) {
  width: 150px;
}

.system-jobs-table td {
  vertical-align: top;
  white-space: normal;
}

.system-jobs-table .audit-path,
.system-jobs-table .security-error {
  max-width: 100%;
}

.system-jobs-table .table-actions {
  flex-wrap: wrap;
}

.system-job-log-panel {
  margin: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.system-job-log-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text);
}

.system-job-log-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-job-log-list {
  display: grid;
  gap: 10px;
}

.system-job-log-item {
  min-width: 0;
  border-left: 3px solid #8aa390;
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.system-job-log-item.log-level-warn {
  border-left-color: #d97706;
}

.system-job-log-item.log-level-error {
  border-left-color: #dc2626;
}

.system-job-log-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.system-job-log-meta strong {
  color: var(--text);
  font-weight: 600;
}

.system-job-log-message {
  margin-top: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.system-job-log-item pre {
  overflow: auto;
  max-height: 260px;
  margin: 8px 0 0;
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.system-job-log-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 10px 0;
}

.paid-usage-table {
  table-layout: fixed;
}

.paid-usage-table th:nth-child(4),
.paid-usage-table td:nth-child(4) {
  width: 128px;
  max-width: 128px;
}

.paid-usage-table td:nth-child(4) > div {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-filter-toggle,
.mobile-filter-actions {
  display: none;
}

.mobile-filter-popover {
  display: contents;
}

.mobile-filter-count {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 0 5px;
}

.audit-filter-menu {
  position: relative;
  width: 136px;
  min-width: 0;
}

.audit-filter-button {
  display: flex;
  width: 100%;
  height: var(--button-height);
  min-height: var(--button-height);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  text-align: left;
}

.audit-filter-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.audit-filter-button strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-filter-button::after {
  width: 7px;
  min-width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.16s ease;
}

.audit-filter-menu.open .audit-filter-button {
  border-color: var(--line-strong);
  background: var(--hover);
}

.audit-filter-menu.open .audit-filter-button::after {
  transform: translateY(2px) rotate(225deg);
}

.audit-filter-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 150;
  display: grid;
  width: clamp(224px, 24vw, 248px);
  max-width: calc(100vw - 48px);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel);
}

.audit-popover-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.audit-filter-popover input {
  width: min(100%, 280px);
  justify-self: start;
  padding-left: 12px;
}

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

.audit-popover-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.audit-filter-option {
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.audit-filter-option:hover,
.audit-filter-option.active {
  background: var(--active);
  color: var(--accent);
}

.audit-user {
  display: grid;
  gap: 2px;
  max-width: 190px;
}

.audit-user span,
.audit-path,
.audit-client {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-user small,
.audit-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-image-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.admin-image-preview {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--media);
  color: var(--muted);
  font-size: 12px;
}

.admin-image-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-image-preview-empty {
  padding: 0 6px;
  text-align: center;
}

.recycle-image-violation-preview {
  border-color: rgba(180, 35, 24, 0.16);
  background: var(--danger-soft);
  color: var(--danger);
}

.recycle-image-violation-mark {
  font-size: 12px;
  font-weight: 700;
}

.recycle-violation-line {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.recycle-violation-line .badge {
  width: fit-content;
  flex: 0 0 auto;
}

.recycle-violation-reason {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--danger);
}

.admin-image-info {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.admin-image-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-violation-modal-panel {
  max-width: 460px;
}

.image-violation-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.image-violation-target {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--soft);
}

.image-violation-preview {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  border-radius: 12px;
}

.image-violation-info {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.image-violation-info strong,
.image-violation-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-violation-info strong {
  color: var(--text);
  font-size: 14px;
}

.image-violation-info span {
  color: var(--muted);
  font-size: 12px;
}

.image-violation-reason {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.image-violation-reason textarea {
  min-height: 104px;
  font-size: var(--button-font-size);
  line-height: 1.5;
}

.appeal-review-summary {
  display: grid;
  gap: 12px;
}

.appeal-review-detail {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel);
}

.appeal-status-detail {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel);
}

.appeal-review-detail div,
.appeal-status-detail div {
  display: grid;
  gap: 4px;
}

.appeal-review-detail span,
.appeal-status-detail span {
  color: var(--muted);
  font-size: 12px;
}

.appeal-review-detail strong,
.appeal-status-detail strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  word-break: break-word;
}

.wishlist-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.wishlist-title-line strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wishlist-content {
  margin-top: 5px;
}

.wishlist-review-modal-panel {
  max-width: 520px;
}

.wishlist-hidden-check {
  width: max-content;
}

.audit-path {
  max-width: 260px;
}

.audit-client {
  max-width: 130px;
}

.audit-quota-note {
  margin: -4px 0 12px;
}

.cdn-refresh-url {
  max-width: min(48vw, 520px);
}

.security-target {
  max-width: 160px;
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-content {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-error {
  max-width: 260px;
}

.audit-action-button {
  min-width: 56px;
}

.audit-detail-modal-panel {
  display: flex;
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  flex-direction: column;
  overflow: hidden;
}

.audit-detail-modal-panel .modal-head,
.audit-detail-actions {
  flex: 0 0 auto;
}

.audit-detail-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.audit-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  table-layout: fixed;
}

.audit-detail-table th,
.audit-detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.audit-detail-table tr:last-child th,
.audit-detail-table tr:last-child td {
  border-bottom: 0;
}

.audit-detail-table th {
  width: 150px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.audit-detail-table td {
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.audit-detail-table pre {
  max-height: 240px;
  margin: 0;
  overflow: auto;
  border-radius: 10px;
  background: var(--soft);
  color: var(--text);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.security-preview-box {
  display: flex;
  max-height: 420px;
  align-items: center;
  justify-content: center;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  padding: 12px;
}

.security-preview-image {
  display: block;
  max-width: 100%;
  max-height: 380px;
  border-radius: 10px;
  object-fit: contain;
}

.security-preview-text {
  max-height: 360px !important;
}

.security-preview-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}

.image-detail-modal-panel {
  width: min(880px, 100%);
}

.image-detail-preview-box {
  display: grid;
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.image-detail-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-detail-link {
  color: var(--primary);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.image-detail-link:hover {
  text-decoration: underline;
}

.audit-detail-actions {
  border-top: 1px solid var(--line);
  padding: 12px 16px 16px;
}

.method-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.status-code {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

.audit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 16px;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}

.badge.warn {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.neutral {
  background: var(--soft);
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}

.status-badge.warn {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-badge.neutral {
  background: var(--soft);
  color: var(--muted);
}

.switches {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.switches label,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switches input,
.inline-check input {
  width: 16px;
  height: 16px;
}

.album-form .switches {
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.album-form .switches label {
  position: relative;
  display: inline-flex;
  width: auto;
  min-width: max-content;
  min-height: 36px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  padding: 0 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  user-select: none;
}

.album-form .switches label:hover {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
}

.album-form .switches label:has(input:checked) {
  border-color: rgba(43, 162, 70, 0.42);
  background: rgba(43, 162, 70, 0.08);
  color: var(--accent);
}

.album-form .switches input {
  display: grid;
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 0;
  place-items: center;
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
}

.album-form .switches input::after {
  width: 8px;
  height: 8px;
  transform: scale(0);
  border-radius: 3px;
  background: #ffffff;
  content: "";
}

.album-form .switches input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.album-form .switches input:checked::after {
  transform: scale(1);
}

.album-form .switches span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-filter-card {
  position: relative;
  gap: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}

.featured-filter-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.featured-filter-card span {
  position: relative;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  line-height: 1;
  padding: 0 11px;
}

.featured-filter-card span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 5px;
  opacity: 0.58;
}

.featured-filter-card input:checked + span {
  border-color: rgba(43, 162, 70, 0.52);
  background: var(--accent-soft);
  color: var(--accent);
}

.featured-filter-card input:checked + span::before {
  border-color: var(--accent);
  background: var(--accent);
  opacity: 1;
}

.featured-filter-card input:checked + span::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-58%) rotate(45deg);
}

.featured-filter-card input:focus-visible + span {
  outline: 2px solid rgba(43, 162, 70, 0.3);
  outline-offset: 2px;
}

.album-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.album-hero-title {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
}

.back-albums-button {
  flex: 0 0 auto;
}

.album-hero h2 {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-hero-right {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.album-hero .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.album-permission-badges {
  display: flex;
  min-width: 0;
  max-width: 360px;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.album-permission-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(43, 162, 70, 0.3);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  padding: 0 8px;
  white-space: nowrap;
}

.album-permission-badge.neutral {
  border-color: var(--line);
  background: var(--soft);
  color: var(--muted);
}

.album-permission-badge.web {
  border-color: var(--line-strong);
  background: var(--field);
  color: var(--text);
}

.muted {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  display: grid;
  min-height: 76px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 12px 8px;
  background: var(--panel);
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.skeleton-stat .skeleton-line {
  justify-self: center;
}

.sub-panel {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 16px;
}

.sub-panel-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sub-panel-head h3 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-table-wrap th,
.compact-table-wrap td {
  padding: 8px 10px;
  font-size: 12px;
}

.export-jobs-modal-panel {
  width: min(760px, 100%);
}

.export-jobs-modal-body {
  padding: 14px;
}

.export-jobs-modal-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.export-jobs-table-wrap {
  overflow: auto;
}

.upload-zone {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 104px;
  margin: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--soft);
  color: var(--muted);
  cursor: pointer;
}

.upload-zone strong {
  color: var(--text);
}

.upload-zone.dragging {
  border-color: var(--accent);
  background: var(--active);
}

.upload-zone input {
  display: none;
}

.upload-queue {
  display: grid;
  gap: 8px;
  margin: -4px 16px 16px;
}

.upload-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--soft);
  padding: 10px 12px;
}

.upload-queue-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.upload-queue-head strong {
  color: var(--text);
  font-size: 13px;
}

.upload-queue-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-queue-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.upload-queue-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.upload-queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 10px 12px;
}

.upload-queue-title {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.upload-queue-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-queue-title span,
.upload-queue-status {
  color: var(--muted);
  font-size: 12px;
}

.upload-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
  margin-top: 8px;
}

.upload-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.16s ease;
}

.upload-error {
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
}

.upload-queue-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.ai-image-panel {
  overflow: visible;
}

.ai-image-workspace {
  display: block;
  padding: 16px;
}

.ai-image-form {
  display: grid;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  padding: 12px;
}

.ai-image-prompt-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.ai-image-prompt-field > label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.ai-image-prompt-box {
  position: relative;
  display: block;
  width: 100%;
}

.ai-image-credit-note {
  margin-top: 2px;
}

.ai-image-progress {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 12px;
}

.ai-image-progress-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ai-image-progress-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-image-progress-head strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.ai-image-progress-track,
.ai-image-table-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.ai-image-progress-track span,
.ai-image-table-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .25s ease;
}

.ai-image-progress-track span.danger {
  background: var(--danger);
}

.ai-image-prompt-field textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 220px;
  resize: vertical;
  background: var(--panel);
  padding: 14px 14px 70px;
  line-height: 1.55;
}

.ai-image-input-toolbar {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.ai-image-input-left {
  display: flex;
  min-width: 0;
  max-width: calc(100% - 132px);
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.ai-image-upload-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 9px;
  padding: 0;
  color: var(--muted);
}

.ai-image-upload-button:hover {
  color: var(--text);
}

.ai-image-size-field {
  display: block;
  width: 132px;
  min-width: 118px;
  pointer-events: auto;
}

.ai-image-size-field .custom-select {
  width: 100%;
}

.ai-image-size-field .custom-select-button {
  height: 34px;
  min-height: 34px;
  border-radius: 9px;
  background: var(--field);
  padding: 0 28px 0 12px;
  font-size: 12px;
}

.ai-image-size-field .custom-select-menu {
  top: auto;
  bottom: calc(100% + 6px);
  max-height: 184px;
}

.ai-image-size-field .custom-select-button::before {
  display: none;
}

.ai-image-size-field .custom-select-arrow {
  right: 12px;
}

.ai-image-upload-button > span {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M17 8 12 3 7 8'/%3E%3Cpath d='M12 3v12'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M17 8 12 3 7 8'/%3E%3Cpath d='M12 3v12'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.ai-image-clear-button {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  border-radius: 50%;
  padding: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.ai-image-generate-button {
  min-width: 102px;
  height: 34px;
  min-height: 34px;
  pointer-events: auto;
}

.ai-image-file-name {
  min-width: 0;
  max-width: min(360px, 46vw);
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-image-preview {
  display: block;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--media);
  object-fit: cover;
}

#aiImageRecordsView {
  max-width: 1280px;
}

.ai-image-records-page-panel {
  min-height: calc(100vh - 150px);
}

.ai-image-records-page-body {
  display: grid;
  min-height: calc(100vh - 230px);
  grid-template-rows: minmax(0, 1fr) auto;
}

.ai-image-records {
  min-height: 420px;
  overflow: auto;
  padding: 0;
}

.ai-image-records-table-wrap {
  min-height: 420px;
}

.ai-image-records-table {
  min-width: 1080px;
  table-layout: fixed;
}

.ai-image-records-table th:nth-child(1),
.ai-image-records-table td:nth-child(1) {
  width: 150px;
}

.ai-image-records-table th:nth-child(2),
.ai-image-records-table td:nth-child(2) {
  width: 96px;
}

.ai-image-records-table th:nth-child(3),
.ai-image-records-table td:nth-child(3) {
  width: 132px;
}

.ai-image-records-table th:nth-child(5),
.ai-image-records-table td:nth-child(5) {
  width: 260px;
}

.ai-image-records-table th:nth-child(6),
.ai-image-records-table td:nth-child(6) {
  width: 132px;
}

.ai-image-records-table td {
  vertical-align: top;
  white-space: normal;
}

.ai-image-table-time,
.ai-image-table-prompt,
.ai-image-table-sub {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-image-table-time,
.ai-image-table-sub {
  white-space: nowrap;
}

.ai-image-table-prompt {
  display: -webkit-box;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-image-table-results {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-image-table-results .ai-image-result {
  width: 44px;
  min-width: 44px;
  aspect-ratio: 1;
  border-radius: 8px;
}

.ai-image-table-error {
  display: grid;
  overflow: hidden;
  max-width: 100%;
  line-height: 1.4;
}

.ai-image-table-error .ai-image-error-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ai-image-table-progress {
  display: grid;
  min-width: 140px;
  max-width: 240px;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.ai-image-table-progress > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-image-table-progress-track {
  height: 6px;
}

.ai-image-records-footer {
  border-top: 1px solid var(--line);
}

.ai-image-record {
  display: grid;
  min-width: 0;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  padding: 10px;
}

.ai-image-record-head,
.ai-image-record-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-image-record-head time,
.ai-image-record-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ai-image-record p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-image-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.ai-image-result {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: var(--media);
  aspect-ratio: 1;
}

.ai-image-result img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-image-error {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.ai-image-error-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-image-error-copy {
  width: fit-content;
  min-height: 28px;
  border-color: color-mix(in srgb, var(--danger) 24%, transparent);
  color: var(--danger);
  padding: 0 8px;
  font-size: 12px;
}

.ai-image-record-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  padding: 16px;
}

.photo-card {
  position: relative;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px 12px 0 0;
  object-fit: cover;
  background: var(--media);
}

.skeleton-photo-card {
  overflow: hidden;
}

.skeleton-photo-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 12px 12px 0 0;
}

.photo-meta {
  display: grid;
  gap: 5px;
  padding: 8px 10px 9px;
}

.photo-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-name-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.photo-name-row .photo-name {
  flex: 1 1 auto;
}

.photo-name-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.photo-name-input {
  min-height: 30px;
  border-radius: 10px;
  font-size: 13px;
  padding: 0 9px;
}

.photo-name-edit button {
  min-height: 30px;
  border-radius: 10px;
  padding: 0 9px;
  font-size: 12px;
}

.photo-detail-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.photo-detail-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-flags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.flag {
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  line-height: 1.4;
}

.flag.warn {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.photo-violation-box {
  display: grid;
  min-height: 128px;
  place-content: center;
  gap: 8px;
  padding: 20px;
  background: var(--media);
  color: var(--muted);
  text-align: center;
}

.photo-violation-box strong {
  color: var(--text);
  font-size: 14px;
}

.photo-violation-box span {
  font-size: 12px;
  line-height: 1.5;
}

.photo-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}

.photo-action-button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0;
}

.photo-action-button.active {
  border-color: rgba(43, 162, 70, 0.42);
  background: var(--accent-soft);
  color: var(--accent);
}

.photo-action-button.danger {
  color: var(--danger);
}

.photo-action-text {
  width: auto;
  min-width: 0;
  gap: 6px;
  padding: 0 10px;
}

.photo-action-glyph {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--photo-icon) center / contain no-repeat;
  mask: var(--photo-icon) center / contain no-repeat;
}

.photo-icon-like {
  --photo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1-1.1a5.5 5.5 0 0 0-7.8 7.8l1 1L12 21l7.8-7.6 1-1a5.5 5.5 0 0 0 0-7.8Z'/%3E%3C/svg%3E");
}

.photo-icon-feature {
  --photo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21 7 14.2 2 9.3l6.9-1L12 2Z'/%3E%3C/svg%3E");
}

.photo-icon-download {
  --photo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
}

.photo-icon-more {
  --photo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E");
}

.photo-icon-edit {
  --photo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5Z'/%3E%3C/svg%3E");
}

.photo-icon-cover,
.photo-icon-appeal {
  --photo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E");
}

.photo-icon-report {
  --photo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1v18'/%3E%3C/svg%3E");
}

.photo-icon-delete {
  --photo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3C/svg%3E");
}

.photo-more {
  position: relative;
  margin-left: auto;
}

.photo-more::before {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 100%;
  display: block;
  width: 160px;
  height: 14px;
}

.photo-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 1px);
  z-index: 20;
  display: none;
  min-width: 136px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  padding: 5px;
}

.photo-more:hover .photo-more-menu,
.photo-more:focus-within .photo-more-menu {
  display: grid;
}

.photo-more-item {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1;
  padding: 0 9px;
  text-align: left;
}

.photo-more-item:hover {
  background: var(--hover);
}

.photo-more-item.danger {
  color: var(--danger);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.photo-action-note {
  display: flex;
  min-height: var(--button-height);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--button-radius);
  color: var(--muted);
  font-size: var(--button-font-size);
  line-height: 1;
}

.empty {
  display: grid;
  min-height: 168px;
  grid-column: 1 / -1;
  place-items: center;
  gap: 10px;
  padding: 34px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
}

.empty-icon::before {
  display: block;
  width: 24px;
  height: 24px;
  background: currentColor;
  content: "";
  -webkit-mask-image: var(--icon-image);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: var(--icon-image);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.empty-action {
  min-width: 112px;
}

.empty-users .empty-icon::before {
  -webkit-mask-image: var(--icon-user);
  mask-image: var(--icon-user);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  max-width: min(420px, calc(100vw - 48px));
  transform: translateY(16px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--toast-bg);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1040px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .album-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-form,
  .settings-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-form.refund-modal-form {
    grid-template-columns: 1fr;
  }

  .settings-pane {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-pane[data-settings-panel="plans"] {
    grid-template-columns: 1fr;
  }

  .plan-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .h5-story-editor-layout {
    grid-template-columns: 1fr;
  }

  .h5-story-template-sidebar {
    width: min(392px, 100%);
  }

  .h5-template-card-grid {
    grid-template-columns: 1fr;
  }

  .h5-story-template-card .h5-template-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-image-workspace {
    grid-template-columns: 1fr;
  }

  .member-form {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .member-form > label:first-child {
    flex: 1 1 360px;
  }

  .member-permission-section {
    flex: 1 1 100%;
  }

  .member-permission-grid {
    flex-wrap: wrap;
  }

  .member-form .modal-actions {
    margin-left: auto;
  }
}

@media (max-width: 680px) {
  .refund-order-summary div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .refund-order-summary strong {
    text-align: left;
  }

  .refund-mode-grid {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 12px;
  }

  .topbar h1 {
    max-width: 112px;
    font-size: 13px;
  }

  .topnav {
    justify-content: flex-start;
    gap: 16px;
    overflow: visible;
  }

  .accountbar {
    align-items: center;
    align-self: center;
    flex-direction: row;
  }

  .layout {
    padding: 12px;
  }

  .wechat-login {
    grid-template-columns: 1fr;
  }

  .wechat-qr-button {
    justify-self: center;
  }

  .album-form {
    grid-template-columns: 1fr;
  }

  .admin-form,
  .settings-form {
    grid-template-columns: 1fr;
  }

  .member-form {
    flex-direction: column;
    align-items: stretch;
  }

  .member-form > label,
  .member-form > label:first-child,
  .member-form > label:nth-child(2),
  .member-permission-section,
  .member-form .modal-actions {
    width: 100%;
    flex: 1 1 auto;
  }

  .member-form > label {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-permission-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-form .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-left: 0;
  }

  .member-form .modal-actions button {
    width: 100%;
  }

  .member-role-select + .custom-select {
    width: 100%;
  }

  .ai-image-workspace {
    padding: 12px;
  }

  .ai-image-form {
    max-width: none;
  }

  .ai-image-prompt-field textarea {
    min-height: 200px;
    padding-right: 12px;
    padding-bottom: 74px;
    padding-left: 12px;
  }

  .ai-image-input-toolbar {
    right: 8px;
    bottom: 8px;
    left: 8px;
    gap: 8px;
  }

  .ai-image-input-left {
    max-width: calc(100% - 110px);
    gap: 6px;
  }

  .ai-image-file-name {
    max-width: 28vw;
  }

  .ai-image-generate-button {
    min-width: 94px;
  }

  .ai-image-records {
    padding: 0;
  }

  .ai-image-records-table {
    min-width: 0;
  }

  .ai-image-table-prompt,
  .ai-image-table-error,
  .ai-image-table-error .ai-image-error-text {
    -webkit-line-clamp: initial;
  }

  #aiImageRecordsView {
    max-width: 100%;
  }

  .ai-image-records-page-panel,
  .ai-image-records-page-body {
    min-height: 0;
  }

  .settings-tabs {
    gap: 16px;
    padding: 0 12px;
  }

  .settings-pane,
  .settings-footer {
    grid-template-columns: 1fr;
  }

  .plan-form-grid {
    grid-template-columns: 1fr;
  }

  .plan-checks {
    grid-template-columns: 1fr;
  }

  .settings-form .form-actions {
    justify-content: stretch;
  }

  .settings-form .form-actions button {
    width: 100%;
  }

  .audit-head-actions,
  .order-head-actions,
  .image-head-actions,
  .appeal-head-actions,
  .report-head-actions,
  .wishlist-head-actions,
  .security-head-actions,
  .paid-usage-head-actions,
  .safety-keyword-head-actions,
  .cdn-refresh-head-actions,
  .system-jobs-head-actions,
  .h5-template-head-actions {
    display: flex;
    width: auto;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
  }

  .compact-filter-input {
    width: 100%;
  }

  .mobile-filter-toggle {
    display: inline-flex;
    min-width: 76px;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .mobile-filter-toggle::before {
    width: 15px;
    height: 15px;
    background: var(--icon-filter) center / contain no-repeat;
    content: "";
  }

  .mobile-filter-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 220;
    display: none;
    width: min(330px, calc(100vw - 24px));
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    padding: 12px;
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
  }

  .system-jobs-head-actions .mobile-filter-popover {
    display: none;
    flex: none;
  }

  .filter-head-actions.filter-open .mobile-filter-popover {
    display: grid;
  }

  .filter-head-actions.filter-open .mobile-filter-toggle {
    border-color: var(--line-strong);
    background: var(--hover);
  }

  .mobile-filter-popover .compact-filter-input,
  .mobile-filter-popover .custom-select {
    width: 100%;
  }

  .system-jobs-table {
    min-width: 0;
  }

  :is(
    #recycleView,
    #myOrdersView,
    #usersView,
    #ordersView,
    #imagesView,
    #appealsView,
    #reportsView,
    #wishlistView,
    #auditView,
    #securityView,
    #paidUsageView,
    #safetyKeywordsView,
    #cdnRefreshView,
    #systemJobsView,
    #h5TemplatesView
  ) .table-wrap > table,
  #settingsView .plan-table-wrap > table,
  .members-table-wrap > table,
  .export-jobs-table-wrap > table {
    min-width: 0;
  }

  :is(
    #recycleView,
    #myOrdersView,
    #usersView,
    #ordersView,
    #imagesView,
    #appealsView,
    #reportsView,
    #wishlistView,
    #auditView,
    #securityView,
    #paidUsageView,
    #safetyKeywordsView,
    #cdnRefreshView,
    #systemJobsView,
    #h5TemplatesView
  ) .table-wrap :is(th, td),
  #settingsView .plan-table-wrap :is(th, td),
  .members-table-wrap :is(th, td),
  .export-jobs-table-wrap :is(th, td) {
    width: 100%;
    max-width: none;
  }

  .paid-usage-table th:nth-child(4),
  .paid-usage-table td:nth-child(4) {
    width: 100%;
    max-width: none;
  }

  .mobile-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 2px;
  }

  .mobile-filter-actions button {
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 10px;
  }

  .table-wrap tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    padding: 8px 10px;
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(72px, 30%) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    border-bottom: 0;
    padding: 7px 0;
    white-space: normal;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .table-loading-row td {
    grid-template-columns: 1fr;
  }

  .table-loading-row td::before {
    content: none;
  }

  .table-wrap td[colspan] {
    display: block;
    padding: 12px 0;
  }

  .table-wrap td[colspan]::before {
    content: "";
  }

  .table-wrap .table-actions {
    justify-content: flex-start;
  }

  .audit-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-footer .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .audit-detail-table th {
    width: 110px;
  }

  .admin-form.user-modal-form {
    grid-template-columns: 1fr;
  }

  .admin-form.profile-form {
    grid-template-columns: 1fr;
  }

  .admin-form.plan-modal-form {
    grid-template-columns: 1fr;
  }

  .admin-form.safety-keyword-form {
    grid-template-columns: 1fr;
  }

  .h5-photo-picker {
    grid-template-columns: 1fr;
    max-height: 360px;
  }

  .h5-publish-check {
    grid-template-columns: 1fr;
  }

  .album-form .wide {
    grid-column: auto;
  }

  .album-hero,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .album-hero-right {
    align-items: stretch;
    flex-direction: column;
  }

  .album-permission-badges {
    max-width: none;
    justify-content: flex-start;
  }

  .panel-head {
    align-items: center;
    flex-direction: row;
  }

  .panel-head h2 {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel-head .panel-actions {
    min-width: 0;
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .panel-head:has(.audit-head-actions),
  .panel-head:has(.order-head-actions),
  .panel-head:has(.image-head-actions),
  .panel-head:has(.appeal-head-actions),
  .panel-head:has(.report-head-actions),
  .panel-head:has(.wishlist-head-actions),
  .panel-head:has(.security-head-actions),
  .panel-head:has(.paid-usage-head-actions),
  .panel-head:has(.safety-keyword-head-actions),
  .panel-head:has(.cdn-refresh-head-actions),
  .panel-head:has(.system-jobs-head-actions),
  .panel-head:has(.h5-template-head-actions) {
    align-items: center;
    flex-direction: row;
  }

  .profile-head {
    align-items: center;
    flex-direction: row;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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

  .albums-list-only .album-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .plan-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .albums-list-only .album-cover-grid {
    gap: 6px;
    padding: 6px;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .h5-template-card-grid {
    grid-template-columns: 1fr;
  }

  .h5-story-template-sidebar {
    width: 100%;
  }

  .h5-story-main-fields {
    grid-template-columns: 1fr;
  }

  .h5-story-template-card .h5-template-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .album-h5-preview-modal-panel {
    width: min(390px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .album-h5-preview-modal-body {
    padding: 10px;
  }

  .story-h5-preview {
    min-height: min(560px, calc(100vh - 156px));
  }

  .album-h5-preview-actions {
    grid-template-columns: 1fr 1fr;
  }

  .album-h5-preview-actions #cancelAlbumH5PreviewModal {
    grid-column: 1 / -1;
  }

  .upload-queue-item {
    grid-template-columns: 1fr;
  }

  .upload-queue-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-queue-head span {
    white-space: normal;
  }

  .upload-queue-actions {
    justify-content: flex-start;
  }

  .upload-queue-status {
    justify-content: flex-start;
    white-space: normal;
  }
}
