:root{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1f2937;background:#f6f7fb}*{box-sizing:border-box}body{margin:0}.wrap{max-width:1040px;margin:0 auto;padding:28px}.wrap.narrow{max-width:520px}.wrap.wide{max-width:1180px}.nav{display:flex;align-items:center;gap:10px;margin-bottom:22px;flex-wrap:wrap}.spacer{flex:1}.hero{background:linear-gradient(135deg,#fff,#eef2ff);border:1px solid #e5e7eb;border-radius:24px;padding:26px;margin-bottom:24px;box-shadow:0 10px 30px rgba(31,41,55,.06)}.hero.compact{padding:18px 22px}h1{font-size:34px;margin:0 0 8px}h2{margin-top:26px}h3{margin:0 0 8px}a{color:#2563eb;text-decoration:none}a:hover{text-decoration:underline}.card{background:white;border:1px solid #e5e7eb;border-radius:18px;padding:18px;margin:14px 0;box-shadow:0 8px 24px rgba(31,41,55,.05)}.article-row{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:start}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.form{display:flex;flex-direction:column;gap:14px}label{font-weight:650;display:flex;flex-direction:column;gap:7px}input,textarea,select{font:inherit;border:1px solid #d1d5db;border-radius:12px;padding:11px 12px;background:#fff}textarea{min-height:360px;resize:vertical;line-height:1.6;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.actions.vertical{flex-direction:column;align-items:stretch;min-width:130px}.btn,button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:12px;background:#2563eb;color:white;padding:10px 14px;font-weight:700;cursor:pointer;text-decoration:none;font:inherit}button.small,.btn.small{padding:7px 10px;border-radius:10px;font-size:14px}.secondary{background:#4f46e5}.ghost{background:#eef2ff;color:#3730a3}.danger{background:#dc2626}.btn:hover,button:hover{text-decoration:none;filter:brightness(.97)}.meta{color:#6b7280;font-size:14px}.badge{display:inline-flex;border-radius:999px;padding:3px 9px;font-size:13px;font-weight:750}.badge.draft{background:#f3f4f6;color:#374151}.badge.pending{background:#fef3c7;color:#92400e}.badge.published{background:#dcfce7;color:#166534}.badge.rejected{background:#fee2e2;color:#991b1b}.flash{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0;border-radius:14px;padding:12px 14px;margin:12px 0}.error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca;border-radius:14px;padding:12px 14px;margin:12px 0}.warn{background:#fff7ed;color:#9a3412;border-left:4px solid #fb923c;padding:8px 10px;border-radius:8px}.preview-layout{display:grid;grid-template-columns:1fr 280px;gap:18px;align-items:start}.preview{min-height:160px;line-height:1.75}.preview pre{background:#111827;color:#f9fafb;border-radius:12px;padding:14px;overflow:auto}.preview code{background:#f3f4f6;border-radius:6px;padding:2px 5px}.preview pre code{background:transparent;padding:0}.help{position:sticky;top:18px}.empty{text-align:center;color:#6b7280}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}td,th{padding:10px;border-bottom:1px solid #e5e7eb;text-align:left}.reject-box summary{cursor:pointer;color:#dc2626;font-weight:700}small{color:#6b7280;font-weight:400}@media(max-width:760px){.article-row,.grid.two,.preview-layout{grid-template-columns:1fr}.actions.vertical{flex-direction:row}.wrap{padding:18px}h1{font-size:28px}}

.version{font-size:12px;background:#111827;color:white;border-radius:999px;padding:2px 7px;margin-left:4px}.badge.deleted{background:#e5e7eb;color:#111827}.danger-zone{border-color:#fecaca;background:#fffafa}.mini-form{display:flex;gap:8px;align-items:center;margin-top:8px}.mini-form input{padding:7px 9px;border-radius:9px}details summary{cursor:pointer;font-weight:700;color:#4f46e5}pre{white-space:pre-wrap;background:#111827;color:#f9fafb;padding:14px;border-radius:12px;overflow:auto}
.badge.pending{background:#fef3c7;color:#92400e}.badge.approved{background:#dcfce7;color:#166534}.badge.rejected{background:#fee2e2;color:#991b1b}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
label{display:block;margin:12px 0;font-weight:650;color:#0f172a}
label input,label textarea,fieldset input,fieldset textarea{width:100%;margin-top:7px;border:1px solid #dbe3ef;border-radius:12px;padding:11px 12px;font:inherit;background:#fff;color:#0f172a}
textarea{resize:vertical}
.check{display:inline-flex;gap:8px;align-items:center;margin-right:18px}.check input{width:auto;margin:0}
.mini-card{border:1px solid #e5e7eb;border-radius:14px;margin:16px 0;padding:14px}
.mini-card legend{color:#64748b;padding:0 8px}
.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px}
.media-item{border:1px solid #e5e7eb;border-radius:14px;padding:10px;background:#fff}
.media-item img{width:100%;height:110px;object-fit:contain;border-radius:10px;background:#f8fafc}
.media-item code{display:block;margin-top:8px;white-space:normal;word-break:break-all;font-size:12px}
@media(max-width:760px){.grid2{grid-template-columns:1fr}}

.theme-presets{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.preset-card{border:1px solid #e5e7eb;border-radius:16px;padding:16px;background:#fff;display:grid;gap:8px;cursor:pointer}
.preset-card input{width:auto;margin:0}
.preset-card b{font-size:16px}.preset-card small{color:#64748b}
.swatch{height:54px;border-radius:14px;border:1px solid #e5e7eb}
.swatch.blue{background:linear-gradient(135deg,#fbfaf7,#eaf6ff,#0ea5e9)}
.swatch.warm{background:linear-gradient(135deg,#fff8ee,#ffe7bd,#d97706)}
.swatch.gray{background:linear-gradient(135deg,#ffffff,#e2e8f0,#64748b)}
.swatch.winter{background:linear-gradient(135deg,#f3f9ff,#dbeafe,#38bdf8)}
select{width:100%;margin-top:7px;border:1px solid #dbe3ef;border-radius:12px;padding:11px 12px;font:inherit;background:#fff;color:#0f172a}


/* v6.2 后台深浅色 */
body.admin-dark{
  background:#0f172a;
  color:#e5edf8;
}
body.admin-dark .hero{
  background:linear-gradient(135deg,#172033,#111827);
  border-color:#263449;
  box-shadow:0 14px 40px rgba(0,0,0,.28);
}
body.admin-dark .card,
body.admin-dark .media-item,
body.admin-dark .preset-card{
  background:#111827;
  border-color:#273449;
  color:#e5edf8;
  box-shadow:0 10px 30px rgba(0,0,0,.22);
}
body.admin-dark input,
body.admin-dark textarea,
body.admin-dark select{
  background:#0b1220;
  border-color:#334155;
  color:#e5edf8;
}
body.admin-dark input::placeholder,
body.admin-dark textarea::placeholder{
  color:#64748b;
}
body.admin-dark a{color:#93c5fd}
body.admin-dark .meta,
body.admin-dark small{
  color:#9fb1c8;
}
body.admin-dark .ghost{
  background:#1e293b;
  color:#bfdbfe;
}
body.admin-dark .secondary{
  background:#4338ca;
}
body.admin-dark .btn,
body.admin-dark button{
  box-shadow:none;
}
body.admin-dark table{
  color:#e5edf8;
}
body.admin-dark th{
  background:#172033;
  color:#dbeafe;
}
body.admin-dark td{
  border-color:#273449;
}
body.admin-dark code{
  background:#0b1220;
  color:#bfdbfe;
}
body.admin-dark .preview{
  background:#0b1220;
}
body.admin-dark .preview code{
  background:#172033;
}
body.admin-dark .flash{
  background:#052e2b;
  color:#99f6e4;
  border-color:#115e59;
}
body.admin-dark .error{
  background:#450a0a;
  color:#fecaca;
  border-color:#7f1d1d;
}
body.admin-dark .warn{
  background:#431407;
  color:#fed7aa;
  border-left-color:#f97316;
}
.floating-theme-toggle{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:50;
  box-shadow:0 10px 28px rgba(15,23,42,.18);
}


/* v6.3 后台深浅色修复：图标按钮 + 更稳的选择器 */
.theme-toggle{
  width:36px;
  height:36px;
  min-width:36px;
  padding:0 !important;
  border-radius:999px !important;
  font-size:17px !important;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.theme-toggle:hover{
  transform:translateY(-1px);
}
html[data-admin-theme="dark"] body{
  background:#0f172a;
  color:#e5edf8;
}
html[data-admin-theme="dark"] .hero{
  background:linear-gradient(135deg,#172033,#111827);
  border-color:#263449;
  box-shadow:0 14px 40px rgba(0,0,0,.28);
}
html[data-admin-theme="dark"] .card,
html[data-admin-theme="dark"] .media-item,
html[data-admin-theme="dark"] .preset-card{
  background:#111827;
  border-color:#273449;
  color:#e5edf8;
  box-shadow:0 10px 30px rgba(0,0,0,.22);
}
html[data-admin-theme="dark"] input,
html[data-admin-theme="dark"] textarea,
html[data-admin-theme="dark"] select{
  background:#0b1220;
  border-color:#334155;
  color:#e5edf8;
}
html[data-admin-theme="dark"] input::placeholder,
html[data-admin-theme="dark"] textarea::placeholder{
  color:#64748b;
}
html[data-admin-theme="dark"] a{color:#93c5fd}
html[data-admin-theme="dark"] .meta,
html[data-admin-theme="dark"] small{
  color:#9fb1c8;
}
html[data-admin-theme="dark"] .ghost{
  background:#1e293b;
  color:#bfdbfe;
}
html[data-admin-theme="dark"] .secondary{
  background:#4338ca;
}
html[data-admin-theme="dark"] th{
  background:#172033;
  color:#dbeafe;
}
html[data-admin-theme="dark"] td{
  border-color:#273449;
}
html[data-admin-theme="dark"] code{
  background:#0b1220;
  color:#bfdbfe;
}
html[data-admin-theme="dark"] .preview{
  background:#0b1220;
}
html[data-admin-theme="dark"] .preview code{
  background:#172033;
}
html[data-admin-theme="dark"] .flash{
  background:#052e2b;
  color:#99f6e4;
  border-color:#115e59;
}
html[data-admin-theme="dark"] .error{
  background:#450a0a;
  color:#fecaca;
  border-color:#7f1d1d;
}
html[data-admin-theme="dark"] .warn{
  background:#431407;
  color:#fed7aa;
  border-left-color:#f97316;
}


/* v6.4 后台主题按钮与用户端同步 */
.icon-btn.admin-theme-toggle{
  width:42px;
  height:42px;
  min-width:42px;
  padding:0 !important;
  border-radius:999px !important;
  border:1px solid #dbe3ef;
  background:#fff;
  color:#2563eb;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(31,41,55,.06);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.icon-btn.admin-theme-toggle:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(31,41,55,.10);
  filter:none;
  text-decoration:none;
}
html[data-admin-theme="dark"] .icon-btn.admin-theme-toggle{
  background:#1e293b;
  border-color:#334155;
  color:#bfdbfe;
  box-shadow:0 8px 22px rgba(0,0,0,.24);
}


/* v6.5 后台小月亮图标按钮：登录页和所有工作台页面统一 */
.admin-theme-icon-button{
  width:38px;
  height:38px;
  min-width:38px;
  padding:0 !important;
  border-radius:999px !important;
  border:1px solid #dbe3ef;
  background:#fff;
  color:#2563eb;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(31,41,55,.07);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  font-size:0 !important;
  line-height:0 !important;
}
.admin-theme-icon-button svg{
  width:21px;
  height:21px;
  display:block;
  flex:0 0 auto;
}
.admin-theme-icon-button:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(31,41,55,.12);
  filter:none;
}
body > .admin-theme-icon-button,
.floating-admin-theme-button{
  position:fixed;
  top:18px;
  right:18px;
  z-index:100;
}
.nav .admin-theme-icon-button{
  position:static;
}
html[data-admin-theme="dark"] .admin-theme-icon-button{
  background:#1e293b;
  border-color:#334155;
  color:#bfdbfe;
  box-shadow:0 8px 22px rgba(0,0,0,.26);
}
html[data-admin-theme="dark"] body{
  background:#0f172a;
  color:#e5edf8;
}
html[data-admin-theme="dark"] .hero{
  background:linear-gradient(135deg,#172033,#111827);
  border-color:#263449;
  box-shadow:0 14px 40px rgba(0,0,0,.28);
}
html[data-admin-theme="dark"] .card,
html[data-admin-theme="dark"] .media-item,
html[data-admin-theme="dark"] .preset-card{
  background:#111827;
  border-color:#273449;
  color:#e5edf8;
  box-shadow:0 10px 30px rgba(0,0,0,.22);
}
html[data-admin-theme="dark"] input,
html[data-admin-theme="dark"] textarea,
html[data-admin-theme="dark"] select{
  background:#0b1220;
  border-color:#334155;
  color:#e5edf8;
}
html[data-admin-theme="dark"] input::placeholder,
html[data-admin-theme="dark"] textarea::placeholder{
  color:#64748b;
}
html[data-admin-theme="dark"] a{color:#93c5fd}
html[data-admin-theme="dark"] .meta,
html[data-admin-theme="dark"] small{color:#9fb1c8}
html[data-admin-theme="dark"] .ghost{background:#1e293b;color:#bfdbfe}
html[data-admin-theme="dark"] .secondary{background:#4338ca}
html[data-admin-theme="dark"] th{background:#172033;color:#dbeafe}
html[data-admin-theme="dark"] td{border-color:#273449}
html[data-admin-theme="dark"] code{background:#0b1220;color:#bfdbfe}
html[data-admin-theme="dark"] .preview{background:#0b1220}
html[data-admin-theme="dark"] .preview code{background:#172033}
html[data-admin-theme="dark"] .flash{background:#052e2b;color:#99f6e4;border-color:#115e59}
html[data-admin-theme="dark"] .error{background:#450a0a;color:#fecaca;border-color:#7f1d1d}
html[data-admin-theme="dark"] .warn{background:#431407;color:#fed7aa;border-left-color:#f97316}


/* v6.6 后台深色模式可读性优化 */
html[data-admin-theme="dark"] body,
body.admin-dark{
  color:#f1f7ff;
  background:#0f172a;
}
html[data-admin-theme="dark"] .wrap,
html[data-admin-theme="dark"] main{
  color:#f1f7ff;
}
html[data-admin-theme="dark"] h1,
html[data-admin-theme="dark"] h2,
html[data-admin-theme="dark"] h3,
html[data-admin-theme="dark"] h4,
body.admin-dark h1,
body.admin-dark h2,
body.admin-dark h3,
body.admin-dark h4{
  color:#f8fbff;
}
html[data-admin-theme="dark"] p,
html[data-admin-theme="dark"] li,
html[data-admin-theme="dark"] label,
html[data-admin-theme="dark"] summary,
body.admin-dark p,
body.admin-dark li,
body.admin-dark label,
body.admin-dark summary{
  color:#e2edf9;
}
html[data-admin-theme="dark"] .card,
html[data-admin-theme="dark"] .hero,
html[data-admin-theme="dark"] .media-item,
html[data-admin-theme="dark"] .preset-card{
  background:#111f34;
  border-color:#36506e;
  color:#f1f7ff;
}
html[data-admin-theme="dark"] .meta,
html[data-admin-theme="dark"] small,
body.admin-dark .meta,
body.admin-dark small{
  color:#c3d3e8 !important;
}
html[data-admin-theme="dark"] a,
body.admin-dark a{
  color:#a7d8ff;
}
html[data-admin-theme="dark"] input,
html[data-admin-theme="dark"] textarea,
html[data-admin-theme="dark"] select,
body.admin-dark input,
body.admin-dark textarea,
body.admin-dark select{
  background:#0c1a2d;
  border-color:#3a5878;
  color:#f2f7ff;
}
html[data-admin-theme="dark"] input::placeholder,
html[data-admin-theme="dark"] textarea::placeholder,
body.admin-dark input::placeholder,
body.admin-dark textarea::placeholder{
  color:#aebfd4;
}
html[data-admin-theme="dark"] table,
body.admin-dark table{
  color:#f1f7ff;
}
html[data-admin-theme="dark"] th,
body.admin-dark th{
  background:#162942;
  color:#f2f7ff;
  border-color:#36506e;
}
html[data-admin-theme="dark"] td,
body.admin-dark td{
  color:#e2edf9;
  border-color:#36506e;
}
html[data-admin-theme="dark"] code,
body.admin-dark code{
  background:#0c1a2d;
  color:#dbeafe;
  border:1px solid #324b68;
}
html[data-admin-theme="dark"] .ghost,
body.admin-dark .ghost{
  background:#203753;
  color:#e7f1ff;
}
html[data-admin-theme="dark"] .secondary,
body.admin-dark .secondary{
  background:#4f46e5;
  color:#ffffff;
}
html[data-admin-theme="dark"] .preview,
body.admin-dark .preview{
  background:#0c1a2d;
  color:#e2edf9;
  border-color:#36506e;
}
html[data-admin-theme="dark"] .preview blockquote,
body.admin-dark .preview blockquote{
  color:#e6f2ff;
}
html[data-admin-theme="dark"] .badge.draft{background:#263449;color:#e5edf8}
html[data-admin-theme="dark"] .badge.pending{background:#4a3512;color:#fde68a}
html[data-admin-theme="dark"] .badge.published{background:#123d2b;color:#bbf7d0}
html[data-admin-theme="dark"] .badge.rejected{background:#4a1d24;color:#fecaca}


/* v6.7 后台深色模式全覆盖修复：整页背景不再只变一行 */
html,
body{
  min-height:100%;
}
html[data-admin-theme="dark"]{
  background:#0f172a;
}
html[data-admin-theme="dark"] body,
body.admin-dark{
  min-height:100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(56,189,248,.10), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(96,165,250,.08), transparent 34%),
    linear-gradient(180deg,#0d1728 0%,#111827 100%) !important;
  color:#f1f7ff;
}
html[data-admin-theme="dark"] .wrap,
html[data-admin-theme="dark"] main,
html[data-admin-theme="dark"] section,
html[data-admin-theme="dark"] .toolbar,
html[data-admin-theme="dark"] .actions,
html[data-admin-theme="dark"] .table-wrap{
  background:transparent;
  color:#f1f7ff;
}
html[data-admin-theme="dark"] .nav{
  color:#e7f1ff;
}
html[data-admin-theme="dark"] .card,
html[data-admin-theme="dark"] .hero,
html[data-admin-theme="dark"] .media-item,
html[data-admin-theme="dark"] .preset-card,
html[data-admin-theme="dark"] .empty{
  background:rgba(17,31,52,.94) !important;
  border-color:#36506e !important;
  color:#f1f7ff !important;
}
html[data-admin-theme="dark"] .danger-zone{
  background:rgba(50,24,34,.78) !important;
}
html[data-admin-theme="dark"] .article-row{
  background:rgba(17,31,52,.94) !important;
}
html[data-admin-theme="dark"] .mini-form{
  background:transparent;
}


/* v6.7 后台按钮图标化：保留文字，但用图标建立视觉锚点 */
.btn .btn-ico,
button .btn-ico,
summary .btn-ico{
  display:inline-flex;
  width:1.15em;
  height:1.15em;
  align-items:center;
  justify-content:center;
  margin-right:.35em;
  line-height:1;
  opacity:.92;
}
.nav .btn{
  gap:0;
}
.actions .small .btn-ico{
  margin-right:.25em;
}
@media (max-width:700px){
  .nav .btn .btn-text.optional{
    display:none;
  }
  .nav .btn .btn-ico{
    margin-right:0;
  }
}


/* v6.8 后台交互与 hover 优化 */
.card,
.hero,
.media-item,
.preset-card,
.article-row,
.btn,
button,
summary,
input,
textarea,
select,
.admin-theme-icon-button{
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease,
    filter .18s ease;
}
.card:hover,
.media-item:hover,
.preset-card:hover,
.article-row:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 45px rgba(31,41,55,.10);
  border-color:rgba(37,99,235,.28);
}
html[data-admin-theme="dark"] .card:hover,
html[data-admin-theme="dark"] .media-item:hover,
html[data-admin-theme="dark"] .preset-card:hover,
html[data-admin-theme="dark"] .article-row:hover{
  box-shadow:0 22px 58px rgba(0,0,0,.34);
  border-color:rgba(125,211,252,.42) !important;
  background:rgba(24,43,69,.96) !important;
}
.btn:hover,
button:hover,
summary:hover{
  transform:translateY(-1px);
  filter:brightness(1.03);
}
html[data-admin-theme="dark"] .btn:hover,
html[data-admin-theme="dark"] button:hover,
html[data-admin-theme="dark"] summary:hover{
  filter:brightness(1.10);
}
input:focus,
textarea:focus,
select:focus{
  outline:none;
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.14);
}
html[data-admin-theme="dark"] input:focus,
html[data-admin-theme="dark"] textarea:focus,
html[data-admin-theme="dark"] select:focus{
  border-color:#7dd3fc;
  box-shadow:0 0 0 4px rgba(125,211,252,.16);
}
html[data-admin-theme="dark"] .badge,
body.admin-dark .badge{
  border:1px solid rgba(255,255,255,.08);
}
html[data-admin-theme="dark"] .admin-theme-icon-button:hover{
  background:#294866;
  border-color:#7dd3fc;
  color:#ffffff;
}
.table-wrap table tr{
  transition:background .16s ease;
}
.table-wrap table tbody tr:hover{
  background:rgba(37,99,235,.045);
}
html[data-admin-theme="dark"] .table-wrap table tbody tr:hover{
  background:rgba(125,211,252,.08);
}


/* v6.9 后台细节优化：柔和切换 + 登录密码图标清晰 */
html,
body,
.wrap,
.nav,
.hero,
.card,
.media-item,
.preset-card,
.article-row,
.table-wrap,
.btn,
button,
summary,
input,
textarea,
select,
.admin-theme-icon-button,
.password-toggle,
.password-field{
  transition:
    background-color .38s ease,
    background .38s ease,
    color .38s ease,
    border-color .38s ease,
    box-shadow .38s ease,
    opacity .28s ease,
    transform .18s ease,
    filter .18s ease;
}
.password-field{
  position:relative;
  display:flex;
  align-items:center;
}
.password-field input{
  width:100%;
  padding-right:48px;
}
.password-toggle{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  min-width:34px;
  border:0;
  border-radius:999px;
  background:rgba(37,99,235,.08);
  color:#2563eb;
  padding:0 !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.password-toggle:hover{
  background:rgba(37,99,235,.14);
  transform:translateY(-50%) scale(1.03);
}
.password-toggle svg{
  width:20px;
  height:20px;
  display:block;
}
html[data-admin-theme="dark"] .password-toggle{
  background:#203753;
  color:#eaf6ff;
  border:1px solid #4b6f93;
}
html[data-admin-theme="dark"] .password-toggle:hover{
  background:#2c4c70;
  color:#ffffff;
  border-color:#7dd3fc;
}


/* v7.0 手机端适配：后台 */
@media (max-width: 900px){
  .wrap{
    max-width:none;
    padding:18px;
  }
  .wrap.narrow,
  .wrap.wide{
    max-width:none;
  }
  .nav{
    gap:8px;
    align-items:center;
    position:sticky;
    top:0;
    z-index:30;
    margin:-18px -18px 18px;
    padding:12px 14px;
    background:rgba(246,247,251,.88);
    backdrop-filter:blur(12px);
    border-bottom:1px solid #e5e7eb;
  }
  html[data-admin-theme="dark"] .nav{
    background:rgba(15,23,42,.88);
    border-bottom-color:#36506e;
  }
  .nav .spacer{
    flex-basis:100%;
    height:0;
  }
  .nav .btn.small{
    padding:9px 10px;
  }
  .nav .btn .btn-text.optional{
    display:none;
  }
  .nav .btn .btn-ico{
    margin-right:0;
  }
  .hero{
    border-radius:20px;
    padding:20px;
  }
  h1{
    font-size:30px;
  }
  h2{
    font-size:23px;
  }
  .grid.two,
  .grid2,
  .preview-layout{
    grid-template-columns:1fr !important;
  }
  .article-row{
    grid-template-columns:1fr;
  }
  .actions.vertical{
    flex-direction:row;
    min-width:0;
  }
  .table-wrap{
    overflow-x:auto;
  }
  table{
    min-width:760px;
  }
  .theme-presets{
    grid-template-columns:1fr 1fr;
  }
  .media-grid{
    grid-template-columns:1fr 1fr;
  }
  textarea{
    min-height:300px;
  }
}

@media (max-width: 560px){
  .wrap{
    padding:14px;
  }
  .nav{
    margin:-14px -14px 16px;
    padding:10px 12px;
    overflow-x:auto;
    flex-wrap:nowrap;
    scrollbar-width:none;
  }
  .nav::-webkit-scrollbar{display:none}
  .nav .spacer{
    display:none;
  }
  .nav .btn.small,
  .nav .admin-theme-icon-button{
    flex:0 0 auto;
  }
  .hero{
    padding:18px;
    border-radius:18px;
  }
  h1{
    font-size:28px;
  }
  .card{
    padding:16px;
    border-radius:16px;
  }
  .form{
    gap:12px;
  }
  input,
  textarea,
  select{
    font-size:16px;
  }
  .actions{
    align-items:stretch;
  }
  .actions .btn,
  .actions button{
    flex:1 1 auto;
  }
  .theme-presets,
  .media-grid{
    grid-template-columns:1fr;
  }
  .preview{
    max-height:420px;
    overflow:auto;
  }
  body > .admin-theme-icon-button,
  .floating-admin-theme-button{
    top:12px;
    right:12px;
  }
  .wrap.narrow{
    padding-top:64px;
  }
}


/* v7.1 账号类型显示 */
.badge.account-type{
  border:1px solid transparent;
}
.badge.account-type.system{
  background:#e0f2fe;
  color:#075985;
  border-color:#bae6fd;
}
.badge.account-type.owner{
  background:#fef3c7;
  color:#92400e;
  border-color:#fde68a;
}
.badge.account-type.friend{
  background:#dcfce7;
  color:#166534;
  border-color:#bbf7d0;
}
html[data-admin-theme="dark"] .badge.account-type.system{
  background:#12364d;
  color:#bae6fd;
  border-color:#2b6b8f;
}
html[data-admin-theme="dark"] .badge.account-type.owner{
  background:#4a3512;
  color:#fde68a;
  border-color:#8a641f;
}
html[data-admin-theme="dark"] .badge.account-type.friend{
  background:#123d2b;
  color:#bbf7d0;
  border-color:#28734e;
}
