﻿:root {
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: #101827;
  background: #faf0e6;
  --blue: #1677ff;
  --line: #d9e2ef;
  --muted: #64748b;
  --panel: #ffffff;
  --dark: #202124;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.site-beian {
  position: fixed;
  left: 50%;
  bottom: 4px;
  z-index: 9;
  transform: translateX(-50%);
}

.site-beian a {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #475569;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);  opacity: .72;
}

.site-beian img {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

body.viewer-page .site-beian {
  bottom: 84px;
  z-index: 7;
  pointer-events: none;
}

body.viewer-page .site-beian a {
  min-height: 14px;
  padding: 1px 4px;
  color: rgba(255, 255, 255, .72);
  background: transparent;
  box-shadow: none;
  font-size: 8px;
  opacity: .48;
}

body.viewer-page .site-beian img {
  width: 10px;
  height: 10px;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.home,
.console-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 440px 1fr;
}

.panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #0f172a;
  color: #fff;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

.muted {
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="datetime-local"],
.field input[type="number"] {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #101827;
}

.field input:-webkit-autofill {
  -webkit-text-fill-color: #101827;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 9999s ease-in-out 0s;
}

.dropzone {
  position: relative;
  min-height: 168px;
  border: 1px dashed #9fb2ca;
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #f8fafc;
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.dropzone strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.primary {
  height: 44px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.result,
.project-list,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.notice {
  background: #f8fafc;
}

.share-row {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 8px;
  margin-top: 10px;
}

.share-row input {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
}

.share-row button {
  border-radius: 6px;
  color: #fff;
  background: var(--dark);
  font-weight: 700;
}

.qr {
  width: 150px;
  height: 150px;
  border: 1px solid var(--line);
  margin-top: 12px;
}

.project-list {
  display: grid;
  gap: 10px;
}

.project-list > strong {
  display: none;
}

.project-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  color: inherit;
  border-top: 1px solid #eef2f7;
}

.project-link {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.project-item:first-child {
  border-top: 0;
}

.project-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ghost {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-weight: 700;
}

.ghost.danger {
  color: #b42318;
  border-color: #fecaca;
}

.link-button {
  display: inline-grid;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  text-decoration: none;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 480px);
  background: #faf0e6;
  color: #1f2937;
}

.login-visual {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background:
    linear-gradient(90deg, rgba(20, 184, 166, .12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 184, 166, .08) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(20, 184, 166, .15), transparent 28%),
    #faf0e6;
  background-size: 64px 64px, 64px 64px, auto, auto;
}

.login-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(148, 163, 184, .12) 42% 43%, transparent 43% 100%),
    linear-gradient(25deg, transparent 0 58%, rgba(20, 184, 166, .16) 58% 59%, transparent 59% 100%);
}

.login-hero {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 96px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 18px;
}

.eyebrow {
  color: #2dd4bf;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-hero h1 {
  font-size: 54px;
  line-height: 1.05;
}

.login-hero p {
  max-width: 560px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.7;
}

.login-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.login-stats span {
  border: 1px solid rgba(45, 212, 191, .28);
  border-radius: 8px;
  padding: 14px;
  background: rgba(12, 17, 22, .68);
  color: #afc4c5;
}

.login-stats strong {
  display: block;
  color: #f8fafc;
  font-size: 20px;
}

.login-card {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 46px;
  background: #f8fafc;
  color: #101827;
  border-left: 1px solid rgba(255, 255, 255, .12);
}

.login-card .brand-mark,
.console-panel .brand-mark,
.admin-sidebar .brand-mark {
  background: #10201f;
  color: #5eead4;
}

.login-card h1,
.login-card h2 {
  font-size: 28px;
}

.login-card .field {
  gap: 12px;
}

.login-error {
  color: #b42318;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  padding: 10px 12px;
}

.console-panel {
  background: #f8fafc;
}

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.auth-user {
  min-width: 0;
  color: #334155;
  font-weight: 700;
}

.auth-actions,
.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.stage {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, .78), rgba(15, 23, 42, .2)),
    linear-gradient(90deg, rgba(20, 184, 166, .12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 184, 166, .10) 1px, transparent 1px),
    #151a1f;
  background-size: auto, 60px 60px, 60px 60px, auto;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: #edf2f7;
}

.admin-sidebar {
  padding: 28px;
  background: #0c1116;
  color: #e8f4f2;
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.admin-sidebar .brand {
  align-items: flex-start;
}

.admin-sidebar h1 {
  font-size: 22px;
}

.admin-sidebar .muted {
  color: #8aa2a0;
}

.admin-nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.admin-nav a {
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, .16);
  border-radius: 8px;
  text-decoration: none;
  color: #d7fffa;
  background: rgba(20, 184, 166, .08);
}

.admin-main {
  min-width: 0;
  padding: 26px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.admin-topbar,
.admin-section,
.admin-metrics article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-metrics article {
  padding: 16px;
  display: grid;
  gap: 6px;
}

.admin-metrics span {
  color: var(--muted);
  font-weight: 700;
}

.admin-metrics strong {
  font-size: 24px;
  color: #0f172a;
}

.admin-section {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.admin-create-form {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.admin-list {
  display: grid;
  gap: 6px;
}

.admin-user-main {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.admin-user-validity {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-user-validity input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
}

.admin-share-line {
  color: #047857;
  font-size: 12px;
  word-break: break-all;
}

.stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, .78), rgba(15, 23, 42, .2)),
    linear-gradient(90deg, rgba(20, 184, 166, .12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 184, 166, .10) 1px, transparent 1px),
    #151a1f;
  background-size: auto, 60px 60px, 60px 60px, auto;
}

.preview-text {
  position: absolute;
  left: 36px;
  bottom: 36px;
  max-width: 560px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

/* 2026 UI refresh: login, upload workspace, and owner operations dashboard. */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .72fr);
  background: #071016;
  color: #e8f7f4;
}

.login-product-visual {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: clamp(34px, 5vw, 72px);
  display: grid;
  align-content: center;
  gap: 34px;
  background:
    radial-gradient(circle at 18% 18%, rgba(45, 212, 191, .16), transparent 30%),
    radial-gradient(circle at 82% 56%, rgba(14, 165, 233, .12), transparent 32%),
    linear-gradient(135deg, rgba(8, 18, 26, .94), rgba(5, 12, 18, .82));
}

.login-product-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, .07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(45, 212, 191, .05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .8), transparent 78%);
}

.login-product-copy,
.login-visual-card {
  position: relative;
  z-index: 1;
}

.login-product-copy {
  max-width: 700px;
  display: grid;
  gap: 18px;
}

.login-product-copy h1 {
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.06;
  color: #f8fafc;
}

.login-product-copy h1 span {
  display: block;
}

.login-product-copy p {
  max-width: 590px;
  color: #a6c8c4;
  font-size: 18px;
  line-height: 1.75;
}

.login-proof-grid {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.login-proof-grid span {
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(94, 234, 212, .24);
  border-radius: 8px;
  background: rgba(9, 22, 30, .74);
  color: #96b8b5;
}

.login-proof-grid strong {
  display: block;
  color: #fff;
  font-size: 22px;
  margin-bottom: 4px;
}

.login-visual-card {
  width: min(560px, 92%);
  min-height: 260px;
  padding: 18px;
  border: 1px solid rgba(94, 234, 212, .18);
  border-radius: 8px;
  background: rgba(5, 12, 18, .72);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .38);
}

.visual-toolbar {
  display: flex;
  gap: 8px;
  padding-bottom: 16px;
}

.visual-toolbar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2dd4bf;
  opacity: .78;
}

.visual-model {
  min-height: 170px;
  position: relative;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, .12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, .08) 1px, transparent 1px),
    rgba(15, 23, 42, .48);
  background-size: 34px 34px;
}

.visual-model span {
  position: absolute;
  display: block;
  border: 1px solid rgba(94, 234, 212, .58);
  background: rgba(20, 184, 166, .10);
  box-shadow: 0 0 34px rgba(45, 212, 191, .12) inset;
}

.visual-model span:nth-child(1) {
  left: 14%;
  top: 42%;
  width: 48%;
  height: 34%;
  transform: skewY(-9deg);
}

.visual-model span:nth-child(2) {
  right: 18%;
  top: 22%;
  width: 30%;
  height: 54%;
  transform: skewY(12deg);
}

.visual-model span:nth-child(3) {
  left: 23%;
  top: 18%;
  width: 42%;
  height: 20%;
  transform: skewX(-24deg);
}

.visual-model span:nth-child(4) {
  right: 11%;
  bottom: 13%;
  width: 16%;
  height: 24%;
  background: rgba(59, 130, 246, .13);
  border-color: rgba(147, 197, 253, .6);
}

.visual-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  color: #a6c8c4;
}

.visual-meta strong {
  color: #7dd3fc;
}

.login-auth-panel {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(28px, 5vw, 58px);
  background: #f8fafc;
  color: #0f172a;
  box-shadow: -18px 0 70px rgba(0, 0, 0, .18);
}

.login-auth-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-auth-head h2 {
  font-size: 32px;
  line-height: 1.1;
}

.login-auth-panel .brand-mark,
.workspace-title .brand-mark,
.ops-brand .brand-mark {
  background: #052e2b;
  color: #67e8f9;
}

.login-form-card {
  padding: 18px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.login-submit {
  height: 48px;
}

.login-public-note {
  padding: 14px 16px;
  border: 1px solid #c7f9ed;
  border-radius: 8px;
  background: #ecfdf5;
  color: #075144;
}

.login-register-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  color: #64748b;
}

.link-button {
  background: none;
  border: none;
  color: #0284c7;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  text-decoration: underline;
}

.link-button:hover {
  color: #0369a1;
}

.register-tip {
  margin: 8px 0 16px;
  font-size: 14px;
  color: #059669;
  text-align: center;
}

.status-pill.status-trial {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.admin-user-expiring {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.admin-expiry-warning {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  font-weight: 500;
}

/* 联系方式卡片 */
.contact-card {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
}

.contact-card-title {
  margin-bottom: 14px;
  text-align: center;
}

.contact-card-title .card-kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}

.contact-card-title h3 {
  margin: 0;
  font-size: 15px;
  color: #1e293b;
  font-weight: 600;
}

.contact-qr-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.contact-qr-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.contact-qr-label {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

.contact-phone-grid {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.contact-phone-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-phone-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0f766e;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.contact-phone-number {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
}

.contact-phone-number:hover {
  color: #0f766e;
  text-decoration: underline;
}

/* 顶部紧凑联系方式 */
.header-contact {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.header-contact-qrs {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-contact-qr {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #fff;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-contact-qr:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.header-contact-phones {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-contact-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  white-space: nowrap;
}

.header-contact-phone:hover {
  color: #0f766e;
}

.header-contact-phone-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0f766e;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

/* 登录页中的联系方式卡片适配 */
.login-auth-card .contact-card {
  margin-top: 16px;
  padding: 14px;
}

.login-auth-card .contact-qr-img {
  width: 140px;
  height: 140px;
}

.login-auth-card .contact-card-title h3 {
  font-size: 14px;
}

.login-public-note p {
  margin-top: 4px;
  color: #35736a;
}

.workspace-shell.console-shell {
  min-height: 100vh;
  display: block;
  background: #eef4f7;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(16px, 3vw, 36px);
  color: #e6fffb;
  background:
    linear-gradient(110deg, rgba(4, 16, 24, .97), rgba(10, 35, 42, .9)),
    linear-gradient(90deg, rgba(94, 234, 212, .1) 1px, transparent 1px);
  background-size: auto, 56px 56px;
  flex-wrap: wrap;
}

.workspace-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 1;
}

.workspace-title h1 {
  font-size: 24px;
  margin: 0;
}

.workspace-title p {
  margin-top: 2px;
  color: #a6c8c4;
  font-size: 13px;
  line-height: 1.4;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-actions .ghost,
.ops-topbar .ghost,
.admin-user-actions .ghost {
  min-height: 36px;
  padding: 0 12px;
}

.workspace-grid {
  width: min(1320px, calc(100% - 40px));
  margin: 24px auto 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
  gap: 18px;
}

.upload-command-card,
.account-expiry-card,
.workspace-notice,
.workspace-result,
.project-operations-card {
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .07);
}

.upload-command-card {
  grid-row: span 2;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.upload-command-card h2 {
  font-size: 30px;
}

.card-kicker {
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.account-expiry-card {
  padding: 22px;
  display: grid;
  gap: 10px;
  align-content: start;
  color: #0f172a;
  background:
    linear-gradient(180deg, #ffffff, #f7fbfc);
}

.account-expiry-card h2 {
  font-size: 24px;
}

.account-expiry-card strong {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
}

.account-expiry-card span {
  color: #64748b;
  line-height: 1.65;
}

.workspace-notice {
  padding: 18px;
}

.workspace-result {
  grid-column: 1 / -1;
  padding: 18px;
}

.project-operations-card {
  grid-column: 1 / -1;
  padding: 18px;
}

.project-operations-card .project-list-head {
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f7;
}

.project-operations-card .project-item {
  padding: 14px 0;
}

.ops-dashboard.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  background: #eef3f7;
}

.ops-sidebar {
  padding: 26px;
  color: #dffaf6;
  background:
    linear-gradient(180deg, #071016, #0c1b22 58%, #081217);
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.ops-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ops-brand h1 {
  font-size: 22px;
}

.ops-brand p,
.ops-sidebar-note span {
  color: #8fb8b3;
  line-height: 1.55;
}

.ops-nav {
  display: grid;
  gap: 8px;
  margin: 34px 0;
}

.ops-nav a {
  padding: 12px 14px;
  border: 1px solid rgba(94, 234, 212, .18);
  border-radius: 8px;
  text-decoration: none;
  color: #dcfffb;
  background: rgba(20, 184, 166, .07);
}

.ops-sidebar-note {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 8px;
  background: rgba(14, 165, 233, .08);
}

.ops-main {
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.ops-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #fff;
}

.ops-topbar h2 {
  font-size: 22px;
}

.ops-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 18px;
  padding: 24px;
  border-radius: 8px;
  color: #e6fffb;
  background:
    linear-gradient(120deg, rgba(8, 27, 36, .96), rgba(14, 51, 59, .9)),
    linear-gradient(90deg, rgba(94, 234, 212, .12) 1px, transparent 1px);
  background-size: auto, 46px 46px;
}

.ops-hero h1 {
  font-size: 30px;
}

.ops-hero p {
  margin-top: 8px;
  max-width: 820px;
  color: #abd1ce;
  line-height: 1.7;
}

.ops-hero-status {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(94, 234, 212, .2);
  border-radius: 8px;
  background: rgba(6, 78, 59, .22);
}

.ops-hero-status span {
  color: #9bd8d3;
}

.ops-hero-status strong {
  font-size: 22px;
}

.ops-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ops-metrics article {
  padding: 16px;
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}

.ops-section {
  padding: 18px;
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 14px;
}

.ops-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.ops-section-head strong {
  display: block;
  font-size: 22px;
}

.admin-project-filter {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.admin-project-filter label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.admin-project-filter select {
  min-width: 190px;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 34px 0 11px;
  background: #fff;
  color: #0f172a;
}

.admin-project-filter select:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.admin-project-filter small {
  min-width: 180px;
  padding-bottom: 10px;
  text-align: right;
}

.admin-create-form {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.admin-table-head,
.admin-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(280px, 1fr) minmax(210px, auto);
  gap: 14px;
  align-items: center;
}

.admin-project-table,
.admin-project-item {
  grid-template-columns: minmax(220px, 1fr) minmax(230px, .75fr) minmax(240px, 1fr) auto;
}

.admin-table-head {
  padding: 10px 14px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.admin-table-row {
  padding: 14px;
  border: 1px solid #e7edf4;
  border-radius: 8px;
  background: #fff;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-user-main,
.admin-project-meta {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.admin-project-meta span {
  color: #64748b;
  line-height: 1.45;
}

.admin-user-validity {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-user-validity input {
  width: 190px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
}

.admin-user-validity input[type="number"] {
  width: 86px;
}

.project-retention-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.project-retention-control input {
  width: 76px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
}

.admin-share-line {
  min-width: 0;
  color: #047857;
  font-size: 12px;
  word-break: break-all;
}

.admin-user-actions {
  justify-content: flex-end;
}

.admin-user-actions-empty {
  color: #64748b;
}

@media (max-width: 1100px) {
  .login-shell,
  .ops-dashboard.admin-shell {
    grid-template-columns: 1fr;
  }

  .login-product-visual {
    min-height: 48vh;
  }

  .workspace-grid,
  .ops-hero,
  .ops-metrics,
  .admin-form-grid,
  .admin-table-head,
  .admin-table-row,
  .admin-project-table,
  .admin-project-item {
    grid-template-columns: 1fr;
  }

  .ops-sidebar {
    display: none;
  }
}

@media (max-width: 720px) {
  .login-proof-grid {
    grid-template-columns: 1fr;
  }

  .login-product-copy h1 {
    font-size: 38px;
  }

  .workspace-header,
  .ops-topbar,
  .ops-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-grid {
    width: calc(100% - 24px);
  }

  .upload-command-card,
  .account-expiry-card,
  .workspace-notice,
  .workspace-result,
  .project-operations-card,
  .ops-section,
  .ops-hero {
    padding: 16px;
  }
}

/* Layout optimization pass: tighter hierarchy for product-grade daily use. */
.login-shell {
  grid-template-columns: minmax(0, 1fr) minmax(410px, 520px);
  background: #071116;
}

.login-product-visual {
  min-height: 100vh;
  padding: clamp(40px, 6vw, 86px);
  align-content: center;
  gap: 28px;
}

.login-product-visual::before {
  opacity: .65;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .7), transparent 82%);
}

.login-masthead {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  max-width: 840px;
}

.login-masthead h1 {
  color: #f8fafc;
  font-size: clamp(42px, 4.8vw, 62px);
  line-height: 1.04;
}

.login-masthead p {
  max-width: 620px;
  color: #afd5d0;
  font-size: 18px;
  line-height: 1.7;
}

.login-capability-strip {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(94, 234, 212, .22);
  border-radius: 8px;
  background: rgba(94, 234, 212, .22);
}

.login-capability-strip span {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 15px 16px;
  background: rgba(6, 18, 25, .82);
  color: #9ec6c2;
}

.login-capability-strip strong {
  color: #fff;
  font-size: 18px;
}

.login-auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(26px, 4vw, 54px);
  background:
    linear-gradient(180deg, #f8fafc, #eef4f7);
}

.login-auth-card {
  width: min(438px, 100%);
  display: grid;
  gap: 18px;
}

.login-auth-head {
  align-items: flex-start;
}

.login-auth-head h2 {
  font-size: 30px;
}

.login-form-card {
  padding: 20px;
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.login-public-note {
  border-radius: 8px;
  background: #ecfdf5;
}

.visual-model,
.login-visual-card {
  display: none;
}

.workspace-shell.console-shell {
  background: #eef4f7;
}

.workspace-header {
  padding: 18px clamp(22px, 4vw, 48px);
  background:
    linear-gradient(105deg, #071116, #102f36),
    linear-gradient(90deg, rgba(94, 234, 212, .08) 1px, transparent 1px);
  background-size: auto, 48px 48px;
}

.workspace-title h1 {
  font-size: 24px;
}

.workspace-title p {
  font-size: 14px;
}

.workspace-status-strip {
  width: min(1320px, calc(100% - 40px));
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #d7e2ec;
}

.workspace-status-strip span {
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 12px 14px;
  background: #fff;
  color: #64748b;
}

.workspace-status-strip strong {
  color: #0f172a;
  font-size: 15px;
}

.workspace-main-grid {
  width: min(1320px, calc(100% - 40px));
  margin: 16px auto 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.upload-primary-panel,
.workspace-rail > section,
.project-operations-card,
.workspace-result {
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, .06);
}

.upload-primary-panel {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.section-heading {
  display: grid;
  gap: 7px;
}

.section-heading h2 {
  font-size: 28px;
  line-height: 1.2;
}

.upload-form-layout {
  gap: 12px;
}

.workspace-rail {
  display: grid;
  gap: 12px;
}

.workspace-rail > section {
  padding: 16px;
}

.account-expiry-card h2 {
  font-size: 22px;
}

.account-expiry-card p {
  color: #475569;
}

.workspace-note-card {
  display: grid;
  gap: 8px;
}

.password-change-card summary {
  cursor: pointer;
  font-weight: 800;
  color: #0f172a;
}

.password-change-form {
  margin-top: 12px;
}

.password-change-form .ghost {
  min-height: 38px;
}

.workspace-note-card span {
  color: #475569;
  padding-left: 12px;
  border-left: 2px solid #99f6e4;
}

.workspace-result,
.project-operations-card {
  grid-column: 1 / -1;
  padding: 16px;
}

.project-table-head,
.project-list-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.project-search-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.project-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.project-sort-buttons {
  display: flex;
  gap: 4px;
}

.sort-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.sort-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.sort-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.project-upload-time {
  font-size: 12px;
  color: #3b82f6;
  font-weight: 600;
}

.project-table-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(260px, .72fr) auto;
  gap: 14px;
  align-items: center;
}

.project-table-head {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(260px, .72fr) auto;
  gap: 14px;
  align-items: center;
}

.project-check-cell,
.project-check-head {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-item-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.project-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  margin-bottom: 8px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.project-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.project-select-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
  cursor: pointer;
}

#projectBulkDeleteBtn:disabled,
#projectDeleteAllBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 项目封面缩略图 */
.project-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.project-link-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.project-link-text strong {
  font-size: 15px;
  font-weight: 700;
  color: #000 !important;
}

.project-link-text .muted {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-cover {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  overflow: hidden;
}

.project-cover-count {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.project-cover-label {
  font-size: 10px;
  opacity: 0.85;
  margin-top: 2px;
}

.project-cover-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cover-spin 0.8s linear infinite;
}

@keyframes cover-spin {
  to { transform: rotate(360deg); }
}

.project-cover-icon {
  font-size: 24px;
  font-weight: 900;
}

/* 账号到期提醒条 */
.account-expiry-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #92400e;
  font-size: 14px;
  font-weight: 500;
}

.account-expiry-banner.urgent {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #ef4444;
  color: #991b1b;
}

.account-expiry-banner.expired {
  background: linear-gradient(135deg, #fecaca, #fca5a5);
  border-color: #dc2626;
  color: #7f1d1d;
}

.expiry-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.project-table-row {
  padding: 14px;
  border-top: 1px solid #edf2f7;
}

.project-table-row:first-child {
  border-top: 0;
}

.project-row-meta {
  display: grid;
  gap: 5px;
  color: #64748b;
}

.project-row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.project-empty-state {
  margin-top: 12px;
  padding: 20px;
  border: 1px dashed #b7c7d8;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
}

.project-empty-state strong {
  display: block;
  color: #0f172a;
  margin-bottom: 6px;
}

.ops-main {
  padding: 20px 24px 34px;
  gap: 14px;
}

.ops-topbar {
  min-height: 64px;
}

.ops-hero {
  padding: 20px 22px;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.ops-hero h1 {
  font-size: 28px;
}

.ops-metrics {
  gap: 10px;
}

.ops-metrics article {
  padding: 14px;
}

.storage-metrics article {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.storage-metrics small {
  color: #64748b;
  line-height: 1.4;
}

.storage-metric[data-storage-state="low"] {
  border-color: #f87171;
  background: #fff1f2;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .1);
}

.storage-metric[data-storage-state="low"] span,
.storage-metric[data-storage-state="low"] strong,
.storage-metric[data-storage-state="low"] small {
  color: #b42318;
}

.storage-metric[data-storage-state="error"] {
  border-color: #fbbf24;
  background: #fffbeb;
}

.ops-alert-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ops-alert-strip span {
  padding: 12px 14px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  color: #475569;
}

.ops-alert-strip strong {
  color: #0369a1;
  margin-right: 8px;
}

.storage-health-notice {
  grid-column: 1 / -1;
}

.storage-health-notice em {
  font-style: normal;
}

.storage-maintenance-control {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.storage-maintenance-control em {
  min-width: 0;
  flex: 1;
  font-style: normal;
}

.storage-maintenance-control button {
  flex: 0 0 auto;
}

.storage-maintenance-control em[data-maintenance-state="success"] {
  color: #166534;
}

.storage-maintenance-control em[data-maintenance-state="warning"],
.storage-maintenance-control em[data-maintenance-state="error"] {
  color: #b42318;
}

.ops-alert-strip .storage-health-notice[data-storage-state="ok"] {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.ops-alert-strip .storage-health-notice[data-storage-state="ok"] strong {
  color: #047857;
}

.ops-alert-strip .storage-health-notice[data-storage-state="low"] {
  border-color: #f87171;
  background: #fff1f2;
  color: #b42318;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .1);
}

.ops-alert-strip .storage-health-notice[data-storage-state="low"] strong {
  color: #b42318;
}

.ops-alert-strip .storage-health-notice[data-storage-state="error"] {
  border-color: #fbbf24;
  background: #fffbeb;
  color: #92400e;
}

.admin-storage-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.admin-storage-breakdown > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid #dbe6f0;
  border-radius: 6px;
  background: #f8fafc;
}

.admin-storage-breakdown strong {
  color: #334155;
  font-size: 12px;
}

.admin-storage-breakdown b {
  color: #0f172a;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-storage-breakdown small {
  color: #64748b;
  line-height: 1.35;
}

.admin-create-drawer {
  border: 1px solid #dbe6f0;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-create-drawer summary {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}

.admin-create-drawer[open] summary {
  border-bottom: 1px solid #dbe6f0;
}

.admin-create-drawer .admin-create-form {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-table-shell {
  border: 1px solid #dbe6f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.admin-table-shell .admin-table-head {
  border-radius: 0;
  border: 0;
}

.admin-table-shell .admin-table-row {
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-success {
  color: #047857;
  background: #d1fae5;
}

.status-warning {
  color: #92400e;
  background: #fef3c7;
}

.status-danger {
  color: #b42318;
  background: #fee2e2;
}

.status-neutral {
  color: #475569;
  background: #e2e8f0;
}

@media (max-width: 1100px) {
  .workspace-status-strip,
  .workspace-main-grid,
  .ops-alert-strip {
    grid-template-columns: 1fr;
  }

  .project-table-head,
  .project-table-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-product-visual {
    min-height: auto;
  }

  .login-capability-strip,
  .workspace-status-strip,
  .admin-storage-breakdown {
    grid-template-columns: 1fr;
  }

  .workspace-main-grid,
  .workspace-status-strip {
    width: calc(100% - 24px);
  }

  .storage-maintenance-control {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-project-filter {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }

  .admin-project-filter select {
    width: 100%;
  }

  .admin-project-filter small {
    min-width: 0;
    padding-bottom: 0;
    text-align: left;
  }

  .storage-maintenance-control button {
    width: 100%;
  }
}

.cad-viewer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #F5F0E1;
}

.cad-viewer.dark-theme {
  background: #000;
}

#cadCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  /* 与 renderer.setClearColor 一致的浅米色，避免 WebGL 初始化时闪黑 */
  background: #F5E9E1;
}

.cad-viewer.dark-theme #cadCanvas {
  background: #000;
}

#cadCanvas.camera-pan-ready {
  cursor: grab;
}

#cadCanvas.camera-panning {
  cursor: grabbing;
}

.camera-joystick {
  display: none;
}

.viewer-badge {
  position: absolute;
  left: 16px;
  top: 62px;
  z-index: 3;
  display: none;
  gap: 4px;
  max-width: min(480px, calc(100vw - 96px));
  padding: 8px 10px;
  border-radius: 4px;
  color: rgba(255, 255, 255, .9);
  background: rgba(32, 33, 36, .4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);}

.viewer-badge strong {
  font-size: 14px;
}

.viewer-badge span {
  font-size: 12px;
}

.viewer-quality-badge {
  justify-self: start;
  height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 4px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.viewer-quality-pass {
  border-color: rgba(134, 239, 172, .7);
  background: rgba(22, 101, 52, .7);
}

.viewer-quality-risk {
  border-color: rgba(251, 191, 36, .85);
  background: rgba(146, 64, 14, .82);
}

.viewer-quality-pending {
  border-color: rgba(203, 213, 225, .65);
  background: rgba(51, 65, 85, .7);
}

.ref-top-toolbar {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ref-top-toolbar button {
  min-width: 60px;
  height: 40px;
  padding: 0 14px;
  border-radius: 4px;
  background: #F5F0E1;
  color: #333;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12) inset;
}

.ref-top-toolbar button:hover,
.ref-bottom-toolbar button:hover,
.ref-top-toolbar button.active,
.ref-bottom-toolbar button.active {
  background: #E8DCC8;
}

.ref-top-toolbar button.active,
.ref-bottom-toolbar button.active {
  background: #1684ff;
  color: #fff;
}

.ref-side-toolbar {
  position: absolute;
  top: 8px;
  right: 16px;
  z-index: 8;
  display: grid;
  gap: 8px;
  transform: scale(1);
  transform-origin: right top;
}

.ref-side-toolbar button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #F5F0E1;
  color: #333;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}

.tool-icon,
.tool-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.tool-icon svg {
  fill: currentColor;
}

.ref-side-toolbar button:hover {
  transform: translateY(-1px);
}

.ref-bottom-toolbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  height: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  background: #F5F0E1;
}

.ref-bottom-toolbar button {
  color: #333;
  background: transparent;
  font-weight: 700;
}

/* 底部柜名切换栏（view-fly 风格）：横向滚动，一次只看一个柜体 */
.cabinet-strip {
  position: absolute;
  left: 0;
  right: 0;
  max-width: 100vw;
  bottom: 44px;
  z-index: 8;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(245, 240, 225, .9);
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  white-space: nowrap;
}

.cabinet-strip button {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 7px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .18);
  background: rgba(255, 255, 255, .5);
  color: #333;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.cabinet-strip button.active {
  background: #2994ff;
  border-color: #2994ff;
  color: #fff;
}

.floating-menu {
  position: absolute;
  z-index: 11;
  min-width: 140px;
  max-width: 160px;
  padding: 6px;
  border-radius: 4px;
  background: rgba(245, 240, 225, .95);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .2);
}

.floating-menu button {
  width: 100%;
  height: 34px;
  border-radius: 3px;
  color: #fff;
  background: transparent;
  text-align: left;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-menu button:hover,
.floating-menu button.active {
  background: rgba(255, 255, 255, .12);
}

.floating-menu button.active {
  color: #7cc2ff;
}

.floating-menu-label {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 700;
}

.floating-menu-label.with-line {
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.ref-bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 44px;
  z-index: 9;
  max-height: 333px;
  min-height: 220px;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(245, 247, 249, .96);
  border-top: 1px solid rgba(0, 0, 0, .12);
  box-shadow: 0 -18px 50px rgba(15, 23, 42, .18);
}

.ref-bottom-sheet header {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid #dde5ee;
}

#sheetTitle {
  font-size: 16px;
  font-weight: 800;
}

.ref-bottom-sheet header button,
.sheet-actions button,
.note-form button {
  min-height: 28px;
  border-radius: 4px;
  padding: 0 12px;
  color: #fff;
  background: #2d2d2d;
  font-weight: 700;
}

#sheetBody {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.room-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.room-tabs button {
  height: 30px;
  border-radius: 4px;
  padding: 0 14px;
  color: #fff;
  background: #2994ff;
  font-weight: 700;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.cabinet-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d4dde9;
  border-radius: 4px;
  background: #fff;
}

.cabinet-card span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.cabinet-card strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cabinet-card small {
  color: #52647a;
}

.cabinet-card button {
  height: 30px;
  border-radius: 4px;
  background: #111827;
  color: #fff;
  padding: 0 10px;
  font-weight: 700;
}

.material-table-wrap {
  overflow: auto;
  border: 1px solid #d4dde9;
  background: #fff;
}

.material-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.material-table th,
.material-table td {
  height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid #e8eef5;
  text-align: left;
  white-space: nowrap;
}

.material-table th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  z-index: 1;
}

.material-table tbody tr[data-panel-key] {
  cursor: pointer;
}

.material-table tbody tr[data-panel-key]:hover,
.material-table tbody tr.active {
  background: #e9f4ff;
}

.material-table button {
  height: 24px;
  border-radius: 4px;
  padding: 0 8px;
  color: #fff;
  background: #111827;
  font-size: 12px;
}

.material-section-title {
  margin: 8px 0 10px;
  font-size: 14px;
}

.small-table {
  margin-bottom: 12px;
}

.small-table .material-table {
  font-size: 12px;
}

.sheet-hint {
  color: #64748b;
  padding: 10px 0;
}

.diagnostics-quality {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d4dde9;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
}

.diagnostics-quality-ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.diagnostics-quality-warn {
  border-color: #fbbf24;
  background: #fffbeb;
  color: #92400e;
}

.diagnostics-quality-danger {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.diagnostics-quality-high {
  background: #fef2f2;
  color: #991b1b;
}

.diagnostics-quality-medium {
  background: #fffbeb;
  color: #92400e;
}

.diagnostics-quality-pass {
  background: #f0fdf4;
  color: #166534;
}

.diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.diagnostics-table {
  max-height: 150px;
}

.diagnostic-json {
  max-height: 150px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid #d4dde9;
  border-radius: 4px;
  background: #0f172a;
  color: #dbeafe;
  font: 12px/1.5 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
}

.note-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  gap: 8px;
  margin-bottom: 12px;
}

.note-form.note-editor {
  grid-template-columns: 1fr;
}

.note-editor label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.note-editor textarea {
  min-height: 74px;
  resize: vertical;
  border: 1px solid #d4dde9;
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
}

.note-form input {
  height: 36px;
  border: 1px solid #d4dde9;
  border-radius: 4px;
  padding: 0 10px;
}

.note-list {
  display: grid;
  gap: 8px;
}

.note-list article {
  padding: 10px;
  border: 1px solid #d4dde9;
  border-radius: 4px;
  background: #fff;
}

.note-list article strong {
  color: #475569;
  font-size: 12px;
}

.note-list article small,
.note-list article a {
  display: block;
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
}

.qr-panel {
  position: absolute;
  right: 70px;
  top: 54px;
  z-index: 10;
  width: 360px;
  padding: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .2);
}

.board-lookup-panel {
  position: absolute;
  right: 70px;
  top: 102px;
  z-index: 10;
  width: 360px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding: 14px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
}

.qr-panel header,
.board-lookup-panel header,
.detail-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.qr-panel header button,
.board-lookup-panel header button,
.detail-dialog header button {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: #fff;
  background: #111827;
}

.board-lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  margin-bottom: 10px;
}

.board-lookup-form input {
  min-width: 0;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0 10px;
  font: inherit;
}

.board-lookup-form button,
.board-lookup-actions button {
  min-height: 36px;
  border-radius: 4px;
  padding: 0 12px;
  color: #fff;
  background: #111827;
  font-weight: 800;
}

.board-lookup-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.board-lookup-actions [data-start-board-scan],
.board-lookup-actions [data-stop-board-scan] {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.board-lookup-actions [data-scan-board-image] {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.board-scan-preview {
  overflow: hidden;
  margin-bottom: 10px;
  border-radius: 4px;
  background: #0f172a;
}

.board-scan-preview video {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

.board-lookup-panel [data-board-lookup-status] {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 4px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  line-height: 1.4;
}

.board-lookup-panel .board-lookup-ok {
  color: #166534;
  background: #dcfce7;
}

.board-lookup-panel .board-lookup-warn {
  color: #92400e;
  background: #fffbeb;
}

.board-lookup-results {
  display: grid;
  gap: 8px;
}

.board-lookup-results button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid #d4dde9;
  border-radius: 4px;
  color: #111827;
  background: #fff;
  text-align: left;
}

.board-lookup-results button.active,
.board-lookup-results button:hover {
  border-color: #1684ff;
  background: #e9f4ff;
}

.board-lookup-results strong,
.board-lookup-results span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-lookup-results span {
  color: #52647a;
  font-size: 12px;
}

.qr-panel img {
  display: block;
  width: 132px;
  height: 132px;
  margin: 6px auto;
  border: 1px solid #e2e8f0;
}

.qr-panel p {
  word-break: break-all;
  color: #475569;
  font-size: 12px;
}

.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}

.qr-grid figure {
  margin: 0;
  text-align: center;
  color: #475569;
  font-size: 12px;
}

.qr-single {
  display: grid;
  place-items: center;
  margin: 8px 0;
}

.qr-single figure {
  margin: 0;
  text-align: center;
  color: #475569;
  font-size: 12px;
}

.qr-fallback {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  color: #475569;
  background: #f8fafc;
  text-align: center;
}

.qr-fallback strong {
  color: #0f172a;
}

.share-link {
  max-height: 48px;
  overflow: auto;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.share-actions button {
  min-height: 30px;
  border-radius: 4px;
  color: #fff;
  background: #2d2d2d;
  font-weight: 700;
  font-size: 12px;
}

.board-info-panel {
  position: absolute;
  left: 0;
  top: 60px;
  z-index: 9;
  width: 232px;
  max-height: none;
  overflow: visible;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
  padding: 8px;
  font-size: 11px;
  transform: scale(1);
  transform-origin: left top;
}

.board-info-panel.collapsed {
  width: 220px;
  max-height: none;
  overflow: visible;
  padding: 7px 8px;
}

.board-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
}

.board-info-header strong {
  min-width: 0;
  overflow: hidden;
  color: #111111;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-info-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.board-info-header button {
  flex: 0 0 auto;
  min-height: 22px;
  border-radius: 4px;
  padding: 0 6px;
  color: #fff;
  background: #1f2937;
  font-size: 10px;
  font-weight: 800;
}

.board-info-summary {
  margin: 0;
  color: #555555;
  font-size: 10px;
  line-height: 1.25;
  word-break: break-word;
}

.board-info-panel dl,
.detail-dialog dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 6px;
  margin: 0;
  font-size: 13px;
}

.board-info-panel dl {
  font-size: 11px;
  line-height: 1.25;
  grid-template-columns: auto auto;
}

.board-info-panel dt,
.detail-dialog dt {
  color: #666666;
  white-space: nowrap;
}

.board-info-panel dd,
.detail-dialog dd {
  min-width: 0;
  margin: 0;
  color: #111111;
  word-break: break-word;
}

/* 门板铰链信息样式（简洁格式） */
.door-hinge-simple {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #e53935;
}

.door-hinge-simple .hinge-label {
  font-weight: 600;
  color: #e53935;
  margin-right: 6px;
}

.door-hinge-simple .hinge-distances {
  font-family: Consolas, monospace;
  font-weight: 600;
  color: #e53935;
  letter-spacing: 1px;
}

.detail-dialog {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .34);
}

.detail-dialog article {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
  padding: 16px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 66px;
  z-index: 20;
  transform: translateX(-50%);
  min-width: 120px;
  padding: 10px 16px;
  border-radius: 4px;
  text-align: center;
  color: #fff;
  background: rgba(17, 24, 39, .88);
}

.empty-3d {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
}

.empty-card {
  max-width: 680px;
  padding: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 20px 60px rgba(15, 23, 42, .18);
}

@media (max-width: 900px) {
  .home {
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: 420px;
  }

  .viewer-badge {
    display: none;
  }

  .ref-top-toolbar {
    left: 6px;
    top: 6px;
    gap: 3px;
  }

  .ref-top-toolbar button {
    min-width: 26px;
    height: 22px;
    padding: 0 5px;
    font-size: 10px;
  }

  .ref-side-toolbar {
    right: 8px;
  }

  .ref-bottom-toolbar {
    grid-template-columns: repeat(10, 1fr);
    height: 24px;
  }

  .ref-bottom-toolbar button {
    padding: 0 2px;
    font-size: 10px;
  }

  .ref-bottom-sheet {
    bottom: 24px;
  }

  .cabinet-strip {
    bottom: 24px;
    gap: 4px;
    padding: 4px 6px;
  }

  .cabinet-strip button {
    padding: 4px 8px;
    font-size: 10px;
  }

  body.viewer-page .site-beian {
    bottom: 58px;
  }

  body.viewer-page .site-beian a {
    min-height: 12px;
    padding: 1px 3px;
    font-size: 7px;
  }

  body.viewer-page .site-beian img {
    width: 9px;
    height: 9px;
  }

  .qr-panel {
    right: 44px;
    top: 44px;
    width: min(220px, calc(100vw - 58px));
    padding: 8px;
    font-size: 11px;
  }

  .qr-panel img {
    width: 96px;
    height: 96px;
  }

  .qr-panel header,
  .board-lookup-panel header {
    gap: 6px;
    margin-bottom: 6px;
  }

  .qr-panel header button,
  .board-lookup-panel header button {
    width: 22px;
    height: 22px;
  }

  .board-lookup-panel {
    right: 44px;
    top: 44px;
    width: min(220px, calc(100vw - 58px));
    max-height: calc(100vh - 96px);
    padding: 8px;
    font-size: 11px;
  }

  .board-lookup-form {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 4px;
    margin-bottom: 6px;
  }

  .board-lookup-form input {
    height: 34px;
    padding: 0 6px;
    font-size: 16px;
  }

  .board-lookup-form button,
  .board-lookup-actions button {
    min-height: 24px;
    padding: 0 6px;
    font-size: 10px;
  }

  .board-lookup-actions {
    gap: 4px;
    margin-bottom: 6px;
  }

  .board-scan-preview video {
    max-height: 120px;
  }

  .board-lookup-panel [data-board-lookup-status] {
    margin-bottom: 6px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .board-lookup-results {
    gap: 4px;
  }

  .board-lookup-results button {
    min-height: 34px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .board-info-panel {
    top: 56px;
    left: 0;
    width: min(232px, calc(100vw - 68px));
    max-height: none;
    overflow: visible;
    padding: 7px;
    font-size: 10px;
  }

  .board-info-panel.collapsed {
    width: min(210px, calc(100vw - 92px));
  }
}

@media (max-width: 900px) and (pointer: coarse) {
  .camera-joystick {
    position: absolute;
    right: 18px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 7;
    display: block;
    width: 88px;
    height: 88px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    background: rgba(15, 23, 42, .36);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: background-color 120ms ease, box-shadow 120ms ease;
  }

  .camera-joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 50%;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .3);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: background-color 120ms ease, box-shadow 120ms ease;
  }

  .camera-joystick.active {
    background: rgba(22, 132, 255, .32);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .34), inset 0 0 0 2px rgba(41, 148, 255, .28);
  }

  .camera-joystick.active .camera-joystick-knob {
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 5px 16px rgba(15, 23, 42, .38);
  }
}

@media (max-width: 900px) and (pointer: coarse) and (orientation: landscape) {
  .camera-joystick {
    right: 60px;
    bottom: calc(38px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .camera-joystick,
  .camera-joystick-knob {
    transition: none;
  }
}

/* ===== 登录与账号管理 ===== */
@media (max-width: 1100px) {
  .admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .login-shell,
  .console-shell,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 320px;
  }

  .login-hero {
    min-height: 320px;
    width: min(100% - 36px, 640px);
  }

  .login-hero h1 {
    font-size: 34px;
  }

  .login-card,
  .panel,
  .admin-main,
  .admin-sidebar {
    padding: 20px;
  }

  .login-stats,
  .admin-form-grid,
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .auth-bar,
  .project-item {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

body .material-library-shell .material-library-grid.workspace-main-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr) !important;
  gap: 20px !important;
  align-items: stretch;
}

.material-library-shell .material-dropzone {
  min-height: 50mm;
}

.material-library-shell .material-library-left-col,
.material-library-shell .material-library-right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.material-library-shell .material-board-colors-card {
  flex: 1;
}

.material-library-shell .material-library-list-full {
  grid-column: 1 / -1;
  margin-top: 0;
  margin-left: 5mm;
  margin-right: -125mm;
  box-sizing: border-box;
  justify-self: stretch;
}

#result.workspace-result {
  display: none !important;
}

.material-library-shell .material-library-list-card {
  grid-column: auto;
}

.material-library-shell .material-library-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.material-library-shell .material-upload-queue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 12px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.material-library-shell .material-upload-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
  margin-top: 20px;
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}

.material-library-shell .material-upload-grid .material-upload-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
}

.material-library-shell .material-upload-grid .material-upload-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
}

.material-library-shell .material-upload-grid .material-upload-preview {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.material-library-shell .material-upload-grid .material-upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.material-library-shell .material-upload-grid .material-upload-remove:hover {
  background: rgba(180,35,24,0.9);
}

.material-library-shell .material-upload-grid .material-upload-color-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-library-shell .material-upload-grid .material-upload-state {
  font-size: 10px;
  color: #64748b;
  text-align: center;
}

.material-library-shell .material-upload-grid .material-card-error {
  font-size: 10px;
  text-align: center;
  margin: 0;
}

.material-library-shell .material-library-list-heading {
  margin-bottom: 14px;
}

.material-library-shell .material-bulk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fafc;
}

.material-library-shell .material-bulk-actions button {
  min-height: 36px;
  margin-left: auto;
  padding: 0 14px;
}

.material-library-shell .material-select-all,
.material-library-shell .material-card-select,
.material-library-shell .material-default-roles label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.material-library-shell .material-select-all input,
.material-library-shell .material-card-select input,
.material-library-shell .material-default-roles input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2563eb;
}

.material-library-shell .material-card-select {
  justify-self: start;
}

.material-library-shell .material-default-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}

.material-library-shell .material-bulk-error {
  margin: -4px 0 14px;
  color: #b42318;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.material-library-shell .material-library-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.material-library-shell .material-upload-item {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  gap: 6px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.material-library-shell .material-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  object-fit: cover;
}

.material-library-shell .material-upload-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  object-fit: cover;
}

.material-library-shell .material-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.material-library-shell .material-library-meta strong {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.material-library-shell .material-library-meta,
.material-library-shell .material-rename-form,
.material-library-shell .material-upload-item .field {
  min-width: 0;
}

.material-library-shell .material-library-meta small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-library-shell .material-upload-source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-library-shell .material-rename-form input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.material-library-shell .material-upload-item input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.material-library-shell .material-card-actions {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.material-library-shell .material-card-actions button {
  flex: 1 1 64px;
  max-width: 100%;
  min-height: 38px;
}

.material-library-shell .material-upload-item > button {
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  font-size: 11px;
  padding: 2px 6px;
}

.material-library-shell .material-upload-item .field span {
  font-size: 10px;
}

.material-library-shell .material-upload-item input {
  font-size: 11px;
  padding: 3px 6px;
  min-height: 24px;
}

.material-library-shell .material-upload-item .material-upload-source,
.material-library-shell .material-upload-item .material-upload-state {
  font-size: 10px;
}

.material-library-shell .material-card-error {
  margin: 0;
  color: #b42318;
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .material-library-shell .material-library-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .material-library-shell .material-library-list-card {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .material-library-shell .workspace-header,
  .material-library-shell .workspace-title,
  .material-library-shell .workspace-actions {
    width: 100%;
  }

  .material-library-shell .workspace-title {
    align-items: flex-start;
  }

  .material-library-shell .workspace-title > div:last-child {
    min-width: 0;
  }

  .material-library-shell .workspace-title p {
    overflow-wrap: anywhere;
  }

  .material-library-shell .workspace-actions .ghost {
    flex: 1 1 120px;
  }
}

/* 模型颜色面板 */
.material-board-colors-card {
  order: 2;
}

.material-board-colors-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  justify-items: start;
}

.board-color-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 8px;
  min-width: 100px;
}

.board-color-chip.has-texture {
  background: #f6ffed;
  border-color: #b7eb8f;
}

.board-color-name {
  font-weight: 600;
  font-size: 13px;
  color: #1a1a1a !important;
  overflow-wrap: anywhere;
}

.board-color-meta {
  font-size: 11px;
  color: #555 !important;
}

.board-color-chip.has-texture .board-color-meta {
  color: #237804 !important;
}

.material-board-colors-tip {
  font-size: 12px;
  color: #999;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

/* 匹配提示 */
.material-match-hint {
  padding: 8px 12px;
  background: #e6f7ff;
  border: 1px solid #91d5ff;
  border-radius: 6px;
  font-size: 13px;
  color: #0050b3;
  margin-bottom: 12px;
}

/* 上传按钮组 */
.material-upload-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.material-upload-actions .primary {
  flex: 1 1 auto;
}

.material-upload-actions .ghost {
  flex: 1 1 auto;
}

/* 匹配的上传项高亮 */
.material-upload-item.matched-board-color {
  border-color: #52c41a;
  background: #f6ffed;
}

.material-match-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #52c41a;
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* 安装动画 - 右侧垂直图标工具栏 */
.install-toolbar {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 40px;
  background: rgba(255,255,255,0.96);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 6px 4px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.install-toolbar-title {
  font-size: 11px;
  font-weight: 600;
  color: #2563eb;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.install-step-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 4px;
}
.install-step-name {
  font-size: 10px;
  color: #374151;
  font-weight: 600;
  text-align: center;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.install-step-count {
  font-size: 10px;
  color: #9ca3af;
}
.install-progress-track {
  width: 4px;
  height: 60px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin: 4px 0;
}
.install-progress-fill {
  width: 100%;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-radius: 2px;
  transition: height 0.3s ease;
  height: 0%;
}
.install-icon-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.install-icon-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  color: #4b5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}
.install-icon-btn:hover {
  background: #e5e7eb;
  color: #1f2937;
  transform: scale(1.08);
}
.install-icon-btn.install-play-btn {
  background: #2563eb;
  color: #fff;
  width: 32px;
  height: 32px;
}
.install-icon-btn.install-play-btn:hover {
  background: #1d4ed8;
}
.install-icon-btn.install-play-btn.playing .icon-play { display: none; }
.install-icon-btn.install-play-btn.playing .icon-pause { display: block; }
.install-icon-btn.install-close-btn {
  background: #fee2e2;
  color: #ef4444;
  margin-top: 4px;
}
.install-icon-btn.install-close-btn:hover {
  background: #fecaca;
}
.install-step-list {
  display: none;
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  max-height: 240px;
  overflow-y: auto;
  background: rgba(255,255,255,0.97);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 8px;
}
.install-toolbar:hover .install-step-list {
  display: block;
}
.install-step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s;
}
.install-step-item:hover { background: #f3f4f6; opacity: 1; }
.install-step-item.done { opacity: 0.8; }
.install-step-item.current {
  background: #dbeafe;
  opacity: 1;
  font-weight: 600;
}
.install-step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d1d5db; flex-shrink: 0;
}
.install-step-item.done .install-step-dot { background: #3b82f6; }
.install-step-item.current .install-step-dot { background: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.2); }
.install-step-label { flex: 1; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-step-stage { font-size: 9px; color: #9ca3af; flex-shrink: 0; }

/* ===== 房间场景控制面板 ===== */
.room-toolbar {
  position: absolute;
  top: 50%;
  right: 56px;
  transform: translateY(-50%);
  width: 220px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  padding: 12px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);}
.room-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}
.room-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}
.room-panel-close {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.room-panel-close:hover {
  background: #e5e7eb;
  color: #1f2937;
}
.room-panel-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.room-panel-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}
.room-panel-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2563eb;
  cursor: pointer;
}
.room-panel-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.room-light-value {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  text-transform: none;
  letter-spacing: 0;
}
.room-style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.room-style-btn {
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #374151;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-style-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.room-style-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.room-light-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e7eb;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.room-light-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  border: 2px solid #fff;
}
.room-light-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  border: 2px solid #fff;
}

/* 高清渲染计时器 */
.render-timer {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(30, 40, 60, 0.95), rgba(50, 60, 90, 0.95));
  border: 1px solid rgba(255, 215, 0, 0.5);
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 215, 0, 0.2);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);  animation: renderPulse 2s ease-in-out infinite;
}
.render-timer[hidden] {
  display: none !important;
}
.render-timer-icon {
  font-size: 18px;
}
.render-timer-label {
  color: #ffd700;
  font-weight: 600;
}
.render-timer-time {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 10px;
  border-radius: 12px;
  font-family: monospace;
}
.render-timer-fps {
  color: #7fff7f;
  font-family: monospace;
}
@keyframes renderPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 215, 0, 0.2); }
  50% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 215, 0, 0.4); }
}

/* ============================================
   手机端全屏幕自适应优化（3D展示区）
   ============================================ */

/* 动态视口高度：适配手机浏览器地址栏伸缩 */
.cad-viewer {
  height: 100vh;
  height: 100dvh;
}

/* ---- 900px 以下：增强平板/手机适配 ---- */
@media (max-width: 900px) {
  /* 右侧工具栏缩小 */
  .ref-side-toolbar {
    right: 6px;
    top: 6px;
    gap: 6px;
  }
  .ref-side-toolbar button {
    width: 34px;
    height: 34px;
  }
  .tool-icon,
  .tool-icon svg {
    width: 18px;
    height: 18px;
  }

  /* 底部工具栏：固定10列网格改为横向滚动，保证文字完整 */
  .ref-bottom-toolbar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
    height: 36px;
  }
  .ref-bottom-toolbar::-webkit-scrollbar {
    display: none;
  }
  .ref-bottom-toolbar button {
    flex: 0 0 auto;
    min-width: 64px;
    padding: 0 10px;
    font-size: 11px;
    white-space: nowrap;
  }

  /* 柜体标签栏 / 底部弹层 随底部工具栏高度调整 */
  .cabinet-strip {
    bottom: 36px;
  }
  .ref-bottom-sheet {
    bottom: 36px;
  }

  /* 顶部工具栏：换行布局，禁止横向滚动（避免iOS出现滚动条遮挡按钮文字） */
  .ref-top-toolbar {
    max-width: calc(100vw - 50px);
    overflow: visible;
    overflow-x: visible;
    overflow-y: visible;
    flex-wrap: wrap;
    padding-bottom: 0;
  }
  .ref-top-toolbar::-webkit-scrollbar {
    display: none;
  }
  .ref-top-toolbar button {
    flex: 0 0 auto;
    min-width: 40px;
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  /* 左上角信息面板：避开顶部工具栏 */
  .board-info-panel {
    top: 40px;
    left: 0;
    width: min(220px, calc(100vw - 52px));
  }

  /* 备案信息上移 */
  body.viewer-page .site-beian {
    bottom: 46px;
  }
}

/* ---- 超小屏（手机竖屏 <=480px）---- */
@media (max-width: 480px) {
  .ref-side-toolbar button {
    width: 30px;
    height: 30px;
  }
  .tool-icon,
  .tool-icon svg {
    width: 16px;
    height: 16px;
  }

  .ref-top-toolbar button {
    min-width: 36px;
    height: 24px;
    padding: 0 6px;
    font-size: 10px;
  }

  .ref-bottom-toolbar {
    height: 32px;
  }
  .ref-bottom-toolbar button {
    min-width: 56px;
    padding: 0 8px;
    font-size: 10px;
  }

  .cabinet-strip {
    bottom: 32px;
    padding: 4px 6px;
    gap: 4px;
  }
  .cabinet-strip button {
    padding: 4px 8px;
    font-size: 10px;
  }
  .ref-bottom-sheet {
    bottom: 32px;
  }

  .board-info-panel {
    top: 36px;
    left: 0;
    width: min(200px, calc(100vw - 44px));
    padding: 6px;
    font-size: 10px;
  }

  body.viewer-page .site-beian {
    bottom: 42px;
  }
}

/* ---- 手机横屏（高度 <=500px）---- */
@media (max-height: 500px) and (orientation: landscape) {
  .ref-top-toolbar {
    top: 4px;
    left: 4px;
    gap: 4px;
  }
  .ref-top-toolbar button {
    height: 22px;
    font-size: 10px;
  }

  .ref-side-toolbar {
    top: 4px;
    right: 4px;
    gap: 4px;
    max-height: calc(100vh - 8px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .ref-side-toolbar::-webkit-scrollbar {
    display: none;
  }
  .ref-side-toolbar button {
    width: 28px;
    height: 28px;
  }

  .ref-bottom-toolbar {
    height: 28px;
  }
  .ref-bottom-toolbar button {
    min-width: 52px;
    font-size: 10px;
  }

  .cabinet-strip {
    bottom: 28px;
    padding: 2px 6px;
    gap: 4px;
  }
  .cabinet-strip button {
    padding: 2px 8px;
    font-size: 10px;
  }
  .ref-bottom-sheet {
    bottom: 28px;
    max-height: calc(100vh - 36px);
    min-height: 120px;
  }

  .board-info-panel {
    top: 32px;
    left: 0;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }

  /* 横屏隐藏备案，节省空间 */
  body.viewer-page .site-beian {
    display: none;
  }
}

/* ---- iPhone 安全区域（刘海屏 / 底部小黑条）---- */
@supports (padding: max(0px)) {
  .ref-bottom-toolbar {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .cabinet-strip {
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---- 触摸设备优化 ---- */
@media (pointer: coarse) {
  .ref-top-toolbar button,
  .ref-bottom-toolbar button,
  .ref-side-toolbar button,
  .cabinet-strip button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

/* 强制板件信息面板往左移动 */
#boardInfoPanel.board-info-panel {
  left: 0 !important;
}


/* ============================================
   浅色主题工具栏布局统一（对齐premium灰色主题布局，但保持浅色）
   ============================================ */
.ref-top-toolbar {
  background: rgba(245, 240, 225, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid #d4c5a9;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.ref-side-toolbar {
  background: rgba(245, 240, 225, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid #d4c5a9;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.ref-bottom-toolbar {
  background: rgba(245, 240, 225, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid #d4c5a9;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}
.cabinet-strip {
  background: rgba(245, 240, 225, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid #d4c5a9;
  border-bottom: 1px solid #d4c5a9;
  border-left: none;
  border-right: none;
  border-radius: 0;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.08);
}

/* 工具栏按钮统一边框样式 */
.ref-top-toolbar button,
.ref-bottom-toolbar button,
.ref-side-toolbar button {
  border: 1px solid #d4c5a9;
  box-shadow: none;
  transition: all 0.15s ease;
}
.ref-top-toolbar button:hover,
.ref-bottom-toolbar button:hover,
.ref-side-toolbar button:hover {
  background: #E8DCC8;
  border-color: #c4b599;
  color: #222;
}
.cabinet-strip button {
  background: #EDE5D3;
  border: 1px solid #d4c5a9;
  color: #555;
  transition: all 0.15s ease;
}
.cabinet-strip button:hover {
  background: #E8DCC8;
  border-color: #c4b599;
  color: #333;
}
.cabinet-strip button.active {
  background: #1684ff;
  border-color: #1684ff;
  color: #fff;
  box-shadow: 0 2px 6px rgba(22, 132, 255, 0.3);
}


/* ============================================
   浅色主题统一使用premium布局（仅颜色不同）
   ============================================ */
/* ============================================
   CAD 3D 扫码看图系统 - 高级灰主题
   设计风格：极简 · 高级灰 · 柔和 · 不刺眼
   ============================================ */

/* ---------- 主题变量 ---------- */
body:not(.theme-premium):not(.theme-atelier) {
  /* 背景层级 - 青色系 */
  --bg-primary: #f5f0e1;
  --bg-secondary: #ede5d3;
  --bg-tertiary: #e8dcc8;
  --bg-elevated: #e0d4bc;

  /* 面板 - 毛玻璃 */
  --panel-bg: rgba(245, 240, 225, 0.88);
  --panel-solid: #f5f0e1;
  --panel-hover: rgba(232, 220, 200, 0.92);
  --panel-active: rgba(224, 212, 188, 0.95);

  /* 文字 - 白色为主 */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-inverse: #ffffff;

  /* 强调色 - 青色 */
  --accent: #1684ff;
  --accent-hover: #4da3ff;
  --accent-soft: rgba(22, 132, 255, 0.12);
  --accent-border: rgba(22, 132, 255, 0.3);

  /* 状态色 - 柔和 */
  --success: #00e676;
  --success-soft: rgba(0, 230, 118, 0.12);
  --warning: #ffab00;
  --warning-soft: rgba(255, 171, 0, 0.12);
  --danger: #ff5252;
  --danger-soft: rgba(255, 82, 82, 0.12);

  /* 边框 - 极淡青 */
  --border-color: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.2);
  --border-strong: rgba(0, 0, 0, 0.15);

  /* 阴影 - 柔和 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);

  /* 圆角 */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* 毛玻璃 */
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);

  /* 过渡 */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  background: #f5f0e1;
  color: var(--text-primary);
}

/* 全局背景 - 青色渐变 */
body:not(.theme-premium):not(.theme-atelier)::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 70% 50% at 30% 0%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(0, 180, 216, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body:not(.theme-premium):not(.theme-atelier) > * {
  position: relative;
  z-index: 1;
}

/* ---------- 滚动条 ---------- */
body:not(.theme-premium):not(.theme-atelier) ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
body:not(.theme-premium):not(.theme-atelier) ::-webkit-scrollbar-track {
  background: transparent;
}
body:not(.theme-premium):not(.theme-atelier) ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
body:not(.theme-premium):not(.theme-atelier) ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ---------- 通用面板 ---------- */
body:not(.theme-premium):not(.theme-atelier) .workspace-shell,
body:not(.theme-premium):not(.theme-atelier) .console-shell,
body:not(.theme-premium):not(.theme-atelier) .upload-command-card,
body:not(.theme-premium):not(.theme-atelier) .project-operations-card,
body:not(.theme-premium):not(.theme-atelier) .material-library-shell,
body:not(.theme-premium):not(.theme-atelier) .login-shell {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

body:not(.theme-premium):not(.theme-atelier) .workspace-header {
  background: linear-gradient(180deg, rgba(28, 28, 30, 0.95) 0%, rgba(28, 28, 30, 0.7) 100%);
  backdrop-filter: var(--blur-md);
  border-bottom: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .brand-mark {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* ---------- 按钮 ---------- */
body:not(.theme-premium):not(.theme-atelier) button,
body:not(.theme-premium):not(.theme-atelier) .ghost,
body:not(.theme-premium):not(.theme-atelier) .link-button {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  font-weight: 500;
}

body:not(.theme-premium):not(.theme-atelier) button:hover,
body:not(.theme-premium):not(.theme-atelier) .ghost:hover,
body:not(.theme-premium):not(.theme-atelier) .link-button:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) button:active,
body:not(.theme-premium):not(.theme-atelier) .ghost:active {
  background: var(--panel-active);
  transform: scale(0.98);
}

body:not(.theme-premium):not(.theme-atelier) .primary,
body:not(.theme-premium):not(.theme-atelier) button.primary {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

body:not(.theme-premium):not(.theme-atelier) .primary:hover,
body:not(.theme-premium):not(.theme-atelier) button.primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

body:not(.theme-premium):not(.theme-atelier) .primary:active {
  transform: translateY(0);
}

body:not(.theme-premium):not(.theme-atelier) .danger,
body:not(.theme-premium):not(.theme-atelier) button.danger {
  background: var(--danger-soft);
  border-color: rgba(255, 69, 58, 0.25);
  color: var(--danger);
}

body:not(.theme-premium):not(.theme-atelier) .danger:hover {
  background: rgba(255, 69, 58, 0.2);
  border-color: var(--danger);
  color: var(--danger);
}

/* ---------- 输入框 ---------- */
body:not(.theme-premium):not(.theme-atelier) input,
body:not(.theme-premium):not(.theme-atelier) textarea,
body:not(.theme-premium):not(.theme-atelier) select {
  background: #f5f0e1;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) input::placeholder,
body:not(.theme-premium):not(.theme-atelier) textarea::placeholder {
  color: var(--text-muted);
}

body:not(.theme-premium):not(.theme-atelier) input:focus,
body:not(.theme-premium):not(.theme-atelier) textarea:focus,
body:not(.theme-premium):not(.theme-atelier) select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-secondary);
}

/* ---------- 项目列表 ---------- */
body:not(.theme-premium):not(.theme-atelier) .project-table-head {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-weight: 600;
  letter-spacing: 0.3px;
}

body:not(.theme-premium):not(.theme-atelier) .project-item,
body:not(.theme-premium):not(.theme-atelier) .project-table-row {
  border-top: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .project-item:hover,
body:not(.theme-premium):not(.theme-atelier) .project-table-row:hover {
  background: var(--panel-hover);
}

/* ---------- 状态标签 ---------- */
body:not(.theme-premium):not(.theme-atelier) .status-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

body:not(.theme-premium):not(.theme-atelier) .status-pill.status-success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(48, 209, 88, 0.25);
}

body:not(.theme-premium):not(.theme-atelier) .status-pill.status-warning {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid rgba(255, 159, 10, 0.25);
}

body:not(.theme-premium):not(.theme-atelier) .status-pill.status-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(255, 69, 58, 0.25);
}

body:not(.theme-premium):not(.theme-atelier) .status-pill.status-neutral {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ---------- 卡片 ---------- */
body:not(.theme-premium):not(.theme-atelier) .card,
body:not(.theme-premium):not(.theme-atelier) .stat-card,
body:not(.theme-premium):not(.theme-atelier) .info-card {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .card:hover,
body:not(.theme-premium):not(.theme-atelier) .stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

/* ---------- 标签/徽章 ---------- */
body:not(.theme-premium):not(.theme-atelier) .badge,
body:not(.theme-premium):not(.theme-atelier) .tag,
body:not(.theme-premium):not(.theme-atelier) .chip {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 2px 8px;
  font-size: 12px;
}

/* ---------- 分隔线 ---------- */
body:not(.theme-premium):not(.theme-atelier) hr,
body:not(.theme-premium):not(.theme-atelier) .divider {
  border: none;
  border-top: 1px solid var(--border-color);
}

/* ---------- 表格 ---------- */
body:not(.theme-premium):not(.theme-atelier) table {
  border-collapse: collapse;
}

body:not(.theme-premium):not(.theme-atelier) th {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) tr:hover td {
  background: var(--panel-hover);
}

/* ---------- 模态框/弹窗 ---------- */
body:not(.theme-premium):not(.theme-atelier) .modal,
body:not(.theme-premium):not(.theme-atelier) .dialog,
body:not(.theme-premium):not(.theme-atelier) .popup {
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .modal-header,
body:not(.theme-premium):not(.theme-atelier) .dialog-header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
}

body:not(.theme-premium):not(.theme-atelier) .modal-footer,
body:not(.theme-premium):not(.theme-atelier) .dialog-footer {
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
}

/* ---------- 下拉菜单 ---------- */
body:not(.theme-premium):not(.theme-atelier) .dropdown,
body:not(.theme-premium):not(.theme-atelier) .menu,
body:not(.theme-premium):not(.theme-atelier) .popover {
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .dropdown-item,
body:not(.theme-premium):not(.theme-atelier) .menu-item {
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  transition: background var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .dropdown-item:hover,
body:not(.theme-premium):not(.theme-atelier) .menu-item:hover {
  background: var(--panel-hover);
}

/* ---------- 进度条 ---------- */
body:not(.theme-premium):not(.theme-atelier) .progress,
body:not(.theme-premium):not(.theme-atelier) .progress-bar {
  background: #f5f0e1;
  border-radius: 4px;
  overflow: hidden;
}

body:not(.theme-premium):not(.theme-atelier) .progress-fill,
body:not(.theme-premium):not(.theme-atelier) .progress-bar-fill {
  background: var(--accent);
  border-radius: 4px;
  height: 100%;
  transition: width var(--transition-slow);
}

/* ---------- 提示/通知 ---------- */
body:not(.theme-premium):not(.theme-atelier) .toast,
body:not(.theme-premium):not(.theme-atelier) .notification,
body:not(.theme-premium):not(.theme-atelier) .alert {
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  padding: 12px 16px;
}

body:not(.theme-premium):not(.theme-atelier) .alert-success {
  border-left: 3px solid var(--success);
  background: var(--success-soft);
}

body:not(.theme-premium):not(.theme-atelier) .alert-warning {
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
}

body:not(.theme-premium):not(.theme-atelier) .alert-danger {
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
}

/* ---------- 标签页 ---------- */
body:not(.theme-premium):not(.theme-atelier) .tabs,
body:not(.theme-premium):not(.theme-atelier) .tab-list {
  border-bottom: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .tab,
body:not(.theme-premium):not(.theme-atelier) .tab-item {
  padding: 10px 16px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
}

body:not(.theme-premium):not(.theme-atelier) .tab:hover,
body:not(.theme-premium):not(.theme-atelier) .tab-item:hover {
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .tab.active,
body:not(.theme-premium):not(.theme-atelier) .tab-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- 开关 ---------- */
body:not(.theme-premium):not(.theme-atelier) .switch,
body:not(.theme-premium):not(.theme-atelier) .toggle {
  background: #f5f0e1;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .switch.active,
body:not(.theme-premium):not(.theme-atelier) .toggle.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- 复选框/单选 ---------- */
body:not(.theme-premium):not(.theme-atelier) input[type="checkbox"],
body:not(.theme-premium):not(.theme-atelier) input[type="radio"] {
  accent-color: var(--accent);
}

/* ---------- 上传区域 ---------- */
body:not(.theme-premium):not(.theme-atelier) .dropzone {
  background: #f5f0e1;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .dropzone:hover,
body:not(.theme-premium):not(.theme-atelier) .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* ---------- 3D查看器区域 ---------- */
body:not(.theme-premium):not(.theme-atelier) .cad-viewer,
body:not(.theme-premium):not(.theme-atelier) .viewer-container,
body:not(.theme-premium):not(.theme-atelier) .viewer-stage {
  background: #f5f0e1;
}

/* 查看器顶部工具栏 */
body:not(.theme-premium):not(.theme-atelier) .viewer-toolbar,
body:not(.theme-premium):not(.theme-atelier) .viewer-top-bar {
  background: linear-gradient(180deg, rgba(28, 28, 30, 0.92) 0%, rgba(28, 28, 30, 0.7) 100%);
  backdrop-filter: var(--blur-md);
  border-bottom: 1px solid var(--border-color);
}

/* 查看器底部控制栏 */
body:not(.theme-premium):not(.theme-atelier) .viewer-controls,
body:not(.theme-premium):not(.theme-atelier) .viewer-bottom-bar,
body:not(.theme-premium):not(.theme-atelier) .cabinet-tabs-bar {
  background: linear-gradient(0deg, rgba(28, 28, 30, 0.95) 0%, rgba(28, 28, 30, 0.75) 100%);
  backdrop-filter: var(--blur-md);
  border-top: 1px solid var(--border-color);
}

/* 柜体标签按钮 */
body:not(.theme-premium):not(.theme-atelier) .cabinet-tab,
body:not(.theme-premium):not(.theme-atelier) .cabinet-button {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 13px;
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .cabinet-tab:hover,
body:not(.theme-premium):not(.theme-atelier) .cabinet-button:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

body:not(.theme-premium):not(.theme-atelier) .cabinet-tab.active,
body:not(.theme-premium):not(.theme-atelier) .cabinet-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* 右侧工具栏 */
body:not(.theme-premium):not(.theme-atelier) .viewer-side-panel,
body:not(.theme-premium):not(.theme-atelier) .viewer-right-toolbar {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

body:not(.theme-premium):not(.theme-atelier) .viewer-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .viewer-tool-btn:hover {
  background: var(--panel-hover);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .viewer-tool-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* 信息面板 */
body:not(.theme-premium):not(.theme-atelier) .info-panel,
body:not(.theme-premium):not(.theme-atelier) .board-info-panel,
body:not(.theme-premium):not(.theme-atelier) .properties-panel {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

/* ---------- 登录页 ---------- */
body:not(.theme-premium):not(.theme-atelier) .login-shell {
  background: #f5f0e1;
}

body:not(.theme-premium):not(.theme-atelier) .login-visual {
  background:
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    var(--bg-secondary);
  background-size: 48px 48px, 48px 48px, auto;
}

body:not(.theme-premium):not(.theme-atelier) .login-card {
  background: var(--panel-solid);
  color: var(--text-primary);
  border-left: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .login-hero h1 {
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .login-hero p {
  color: var(--text-secondary);
}

body:not(.theme-premium):not(.theme-atelier) .eyebrow {
  color: var(--accent);
}

body:not(.theme-premium):not(.theme-atelier) .login-stats span {
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

body:not(.theme-premium):not(.theme-atelier) .login-stats strong {
  color: var(--text-primary);
}

/* ---------- 管理后台 ---------- */
body:not(.theme-premium):not(.theme-atelier) .admin-shell {
  background: #f5f0e1;
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-right: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar .muted {
  color: var(--text-muted);
}

body:not(.theme-premium):not(.theme-atelier) .admin-nav a,
body:not(.theme-premium):not(.theme-atelier) .admin-nav button {
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .admin-nav a:hover,
body:not(.theme-premium):not(.theme-atelier) .admin-nav button:hover {
  background: var(--panel-hover);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .admin-nav a.active,
body:not(.theme-premium):not(.theme-atelier) .admin-nav button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

body:not(.theme-premium):not(.theme-atelier) .admin-content {
  background: #f5f0e1;
}

/* ---------- 控制台/工作台 ---------- */
body:not(.theme-premium):not(.theme-atelier) .console-panel {
  background: var(--panel-solid);
}

body:not(.theme-premium):not(.theme-atelier) .auth-bar {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

body:not(.theme-premium):not(.theme-atelier) .auth-user {
  color: var(--text-primary);
}

/* ---------- 统计卡片 ---------- */
body:not(.theme-premium):not(.theme-atelier) .stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

body:not(.theme-premium):not(.theme-atelier) .stat-card .stat-value {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
}

body:not(.theme-premium):not(.theme-atelier) .stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ---------- 项目卡片 ---------- */
body:not(.theme-premium):not(.theme-atelier) .project-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

body:not(.theme-premium):not(.theme-atelier) .project-card-title {
  color: var(--text-primary);
  font-weight: 600;
}

body:not(.theme-premium):not(.theme-atelier) .project-card-meta {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ---------- 空状态 ---------- */
body:not(.theme-premium):not(.theme-atelier) .empty-state,
body:not(.theme-premium):not(.theme-atelier) .no-data {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 20px;
}

/* ---------- 加载中 ---------- */
body:not(.theme-premium):not(.theme-atelier) .loading,
body:not(.theme-premium):not(.theme-atelier) .spinner {
  color: var(--accent);
}

/* ---------- 链接 ---------- */
body:not(.theme-premium):not(.theme-atelier) a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ---------- 标题层级 ---------- */
body:not(.theme-premium):not(.theme-atelier) h1,
body:not(.theme-premium):not(.theme-atelier) h2,
body:not(.theme-premium):not(.theme-atelier) h3,
body:not(.theme-premium):not(.theme-atelier) h4,
body:not(.theme-premium):not(.theme-atelier) h5,
body:not(.theme-premium):not(.theme-atelier) h6 {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- 段落/文本 ---------- */
body:not(.theme-premium):not(.theme-atelier) p,
body:not(.theme-premium):not(.theme-atelier) span,
body:not(.theme-premium):not(.theme-atelier) div {
  color: inherit;
}

body:not(.theme-premium):not(.theme-atelier) .text-muted,
body:not(.theme-premium):not(.theme-atelier) .muted {
  color: var(--text-muted) !important;
}

body:not(.theme-premium):not(.theme-atelier) .text-secondary {
  color: var(--text-secondary) !important;
}

body:not(.theme-premium):not(.theme-atelier) .text-primary {
  color: var(--text-primary) !important;
}

/* ---------- 代码块 ---------- */
body:not(.theme-premium):not(.theme-atelier) code,
body:not(.theme-premium):not(.theme-atelier) pre {
  background: #f5f0e1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: "Consolas", "Monaco", monospace;
}

/* ---------- 引用块 ---------- */
body:not(.theme-premium):not(.theme-atelier) blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text-secondary);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- 列表 ---------- */
body:not(.theme-premium):not(.theme-atelier) ul,
body:not(.theme-premium):not(.theme-atelier) ol {
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) li::marker {
  color: var(--text-secondary);
}

/* ---------- 表单标签 ---------- */
body:not(.theme-premium):not(.theme-atelier) label,
body:not(.theme-premium):not(.theme-atelier) .form-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
}

/* ---------- 禁用状态 ---------- */
body:not(.theme-premium):not(.theme-atelier) button:disabled,
body:not(.theme-premium):not(.theme-atelier) input:disabled,
body:not(.theme-premium):not(.theme-atelier) select:disabled,
body:not(.theme-premium):not(.theme-atelier) textarea:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- 选中状态 ---------- */
body:not(.theme-premium):not(.theme-atelier) ::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* ---------- 焦点轮廓 ---------- */
body:not(.theme-premium):not(.theme-atelier) :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================
   基础样式覆盖 - 覆盖styles.css中的硬编码颜色
   ============================================ */

/* 根变量覆盖 */
body:not(.theme-premium):not(.theme-atelier) {
  color: var(--text-primary);
  background: #f5f0e1;
  --line: var(--border-color);
  --muted: var(--text-muted);
  --panel: var(--panel-solid);
  --dark: var(--bg-elevated);
}

/* 面板 */
body:not(.theme-premium):not(.theme-atelier) .panel {
  background: var(--panel-solid);
  border-right: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* 输入框 */
body:not(.theme-premium):not(.theme-atelier) .field input[type="text"],
body:not(.theme-premium):not(.theme-atelier) .field input[type="password"],
body:not(.theme-premium):not(.theme-atelier) .field input[type="datetime-local"],
body:not(.theme-premium):not(.theme-atelier) .field input[type="number"] {
  background: #f5f0e1;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .field input:-webkit-autofill {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-primary) inset;
}

/* 上传区域 */
body:not(.theme-premium):not(.theme-atelier) .dropzone {
  border: 2px dashed var(--border-strong);
  background: #f5f0e1;
  color: var(--text-secondary);
}

body:not(.theme-premium):not(.theme-atelier) .dropzone strong {
  color: var(--text-primary);
}

/* 结果/项目列表/通知 */
body:not(.theme-premium):not(.theme-atelier) .result,
body:not(.theme-premium):not(.theme-atelier) .project-list,
body:not(.theme-premium):not(.theme-atelier) .notice {
  border: 1px solid var(--border-color);
  background: var(--panel-solid);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .notice {
  background: var(--bg-tertiary);
}

/* 分享行 */
body:not(.theme-premium):not(.theme-atelier) .share-row input {
  background: #f5f0e1;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .share-row button {
  background: var(--accent);
  color: #fff;
  border: none;
}

/* 二维码 */
body:not(.theme-premium):not(.theme-atelier) .qr {
  border: 1px solid var(--border-color);
  background: #fff;
}

/* 项目项 */
body:not(.theme-premium):not(.theme-atelier) .project-item {
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* ghost按钮 */
body:not(.theme-premium):not(.theme-atelier) .ghost {
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .ghost.danger {
  color: var(--danger);
  border-color: rgba(255, 69, 58, 0.25);
  background: var(--danger-soft);
}

/* 登录卡片 */
body:not(.theme-premium):not(.theme-atelier) .login-card {
  background: var(--panel-solid);
  color: var(--text-primary);
  border-left: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .login-card .brand-mark,
body:not(.theme-premium):not(.theme-atelier) .console-panel .brand-mark,
body:not(.theme-premium):not(.theme-atelier) .admin-sidebar .brand-mark {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .login-card h1,
body:not(.theme-premium):not(.theme-atelier) .login-card h2 {
  color: var(--text-primary);
}

/* 登录错误 */
body:not(.theme-premium):not(.theme-atelier) .login-error {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(255, 69, 58, 0.25);
}

/* 控制台面板 */
body:not(.theme-premium):not(.theme-atelier) .console-panel {
  background: var(--panel-solid);
}

/* 认证栏 */
body:not(.theme-premium):not(.theme-atelier) .auth-bar {
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
}

body:not(.theme-premium):not(.theme-atelier) .auth-user {
  color: var(--text-primary);
}

/* 舞台/3D区域 */
body:not(.theme-premium):not(.theme-atelier) .stage {
  background: #f5f0e1;
}

/* 管理后台 */
body:not(.theme-premium):not(.theme-atelier) .admin-shell {
  background: #f5f0e1;
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-right: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar h1 {
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar .muted {
  color: var(--text-muted);
}

/* 品牌标记 */
body:not(.theme-premium):not(.theme-atelier) .brand-mark {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* 主按钮 */
body:not(.theme-premium):not(.theme-atelier) .primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

body:not(.theme-premium):not(.theme-atelier) .primary:disabled {
  background: var(--text-muted);
  color: rgba(255, 255, 255, 0.6);
}

/* 链接按钮 */
body:not(.theme-premium):not(.theme-atelier) .link-button {
  color: var(--text-primary);
}

/* 字段标签 */
body:not(.theme-premium):not(.theme-atelier) .field span {
  color: var(--text-secondary);
}

/* 标题 */
body:not(.theme-premium):not(.theme-atelier) h1 {
  color: var(--text-primary);
}

/* 静音文本 */
body:not(.theme-premium):not(.theme-atelier) .muted {
  color: var(--text-muted);
}

/* 项目列表头部 */
body:not(.theme-premium):not(.theme-atelier) .project-list-head {
  color: var(--text-secondary);
}

/* 项目链接 */
body:not(.theme-premium):not(.theme-atelier) .project-link {
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .project-item strong {
  color: var(--text-primary);
}

/* 登录视觉区 */
body:not(.theme-premium):not(.theme-atelier) .login-visual {
  background:
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    var(--bg-secondary);
  background-size: 48px 48px, 48px 48px, auto;
}

body:not(.theme-premium):not(.theme-atelier) .login-grid {
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(0, 212, 255, 0.1) 42% 43%, transparent 43% 100%),
    linear-gradient(25deg, transparent 0 58%, rgba(0, 212, 255, 0.12) 58% 59%, transparent 59% 100%);
}

body:not(.theme-premium):not(.theme-atelier) .login-hero h1 {
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .login-hero p {
  color: var(--text-secondary);
}

body:not(.theme-premium):not(.theme-atelier) .eyebrow {
  color: var(--accent);
}

body:not(.theme-premium):not(.theme-atelier) .login-stats span {
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

body:not(.theme-premium):not(.theme-atelier) .login-stats strong {
  color: var(--text-primary);
}

/* 首页/控制台布局 */
body:not(.theme-premium):not(.theme-atelier) .home,
body:not(.theme-premium):not(.theme-atelier) .console-shell {
  background: #f5f0e1;
}

/* 所有div默认继承文字颜色 */
body:not(.theme-premium):not(.theme-atelier) div,
body:not(.theme-premium):not(.theme-atelier) span,
body:not(.theme-premium):not(.theme-atelier) p,
body:not(.theme-premium):not(.theme-atelier) li,
body:not(.theme-premium):not(.theme-atelier) td,
body:not(.theme-premium):not(.theme-atelier) th {
  color: inherit;
}

/* 确保白色背景的元素在深色主题下可见 */
body:not(.theme-premium):not(.theme-atelier) [style*="background: #fff"],
body:not(.theme-premium):not(.theme-atelier) [style*="background: #ffffff"],
body:not(.theme-premium):not(.theme-atelier) [style*="background-color: #fff"],
body:not(.theme-premium):not(.theme-atelier) [style*="background-color: #ffffff"] {
  background: var(--panel-solid) !important;
  color: var(--text-primary) !important;
}

/* ---------- 主题切换按钮 ---------- */
body:not(.theme-premium):not(.theme-atelier) .theme-toggle-btn {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-sm);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .theme-toggle-btn:hover {
  background: var(--panel-hover);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

/* ---------- 备案信息 ---------- */
body:not(.theme-premium):not(.theme-atelier) .site-beian a {
  color: var(--text-muted);
  background: transparent;
}

body:not(.theme-premium):not(.theme-atelier).viewer-page .site-beian a {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- 尺寸标注线 ---------- */
body:not(.theme-premium):not(.theme-atelier) .measurement-line {
  stroke: var(--accent);
}

/* ---------- 五金件标记 ---------- */
body:not(.theme-premium):not(.theme-atelier) .hardware-marker {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* ---------- 爆炸图/动画控制 ---------- */
body:not(.theme-premium):not(.theme-atelier) .animation-control {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ---------- 房间场景 ---------- */
body:not(.theme-premium):not(.theme-atelier) .room-scene {
  background: var(--bg-secondary);
}

/* ---------- 材质库 ---------- */
body:not(.theme-premium):not(.theme-atelier) .material-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .material-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

body:not(.theme-premium):not(.theme-atelier) .material-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- 板件信息 ---------- */
body:not(.theme-premium):not(.theme-atelier) .board-info-row {
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
}

body:not(.theme-premium):not(.theme-atelier) .board-info-row:last-child {
  border-bottom: none;
}

body:not(.theme-premium):not(.theme-atelier) .board-info-label {
  color: var(--text-secondary);
  font-size: 12px;
}

body:not(.theme-premium):not(.theme-atelier) .board-info-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* ---------- 铰链信息 ---------- */
body:not(.theme-premium):not(.theme-atelier) .hinge-info {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

body:not(.theme-premium):not(.theme-atelier) .hinge-position {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  body:not(.theme-premium):not(.theme-atelier) .home,
  body:not(.theme-premium):not(.theme-atelier) .console-shell {
    grid-template-columns: 1fr;
  }

  body:not(.theme-premium):not(.theme-atelier) .admin-shell {
    grid-template-columns: 1fr;
  }

  body:not(.theme-premium):not(.theme-atelier) .login-shell {
    grid-template-columns: 1fr;
  }
}

/* ---------- 打印样式 ---------- */
@media print {
  body:not(.theme-premium):not(.theme-atelier) {
    background: #fff;
    color: #000;
  }
}

/* ============================================
   管理后台样式覆盖 - 青色系
   ============================================ */

/* 顶部Hero区域 */
body:not(.theme-premium):not(.theme-atelier) .ops-hero {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero h1 {
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero p {
  color: var(--text-secondary);
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero-status {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero-status span {
  color: var(--text-secondary);
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero-status strong {
  color: var(--accent);
}

/* 统计指标卡片 */
body:not(.theme-premium):not(.theme-atelier) .ops-metrics,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics {
  gap: 12px;
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article:hover,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article span,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article span {
  color: var(--text-secondary);
  font-size: 13px;
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article strong,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article strong {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article small,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article small {
  color: var(--text-muted);
  font-size: 11px;
}

/* 存储指标特殊状态 */
body:not(.theme-premium):not(.theme-atelier) .storage-metric[data-storage-state="ok"] {
  border-color: rgba(0, 230, 118, 0.25);
}

body:not(.theme-premium):not(.theme-atelier) .storage-metric[data-storage-state="warning"] {
  border-color: rgba(255, 171, 0, 0.3);
}

body:not(.theme-premium):not(.theme-atelier) .storage-metric[data-storage-state="danger"] {
  border-color: rgba(255, 82, 82, 0.3);
}

/* 提示条区域 */
body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  gap: 12px;
}

body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip > span {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip strong {
  color: var(--accent);
}

body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip em {
  color: var(--text-secondary);
  font-style: normal;
}

/* 存储健康提示 */
body:not(.theme-premium):not(.theme-atelier) .storage-health-notice {
  background: var(--success-soft) !important;
  border-color: rgba(0, 230, 118, 0.25) !important;
}

body:not(.theme-premium):not(.theme-atelier) .storage-health-notice[data-storage-state="warning"] {
  background: var(--warning-soft) !important;
  border-color: rgba(255, 171, 0, 0.3) !important;
}

body:not(.theme-premium):not(.theme-atelier) .storage-health-notice[data-storage-state="danger"] {
  background: var(--danger-soft) !important;
  border-color: rgba(255, 82, 82, 0.3) !important;
}

body:not(.theme-premium):not(.theme-atelier) .storage-health-notice strong {
  color: var(--success) !important;
}

body:not(.theme-premium):not(.theme-atelier) .storage-health-notice[data-storage-state="warning"] strong {
  color: var(--warning) !important;
}

body:not(.theme-premium):not(.theme-atelier) .storage-health-notice[data-storage-state="danger"] strong {
  color: var(--danger) !important;
}

/* 缓存维护控制 */
body:not(.theme-premium):not(.theme-atelier) .storage-maintenance-control {
  background: var(--bg-tertiary) !important;
}

/* 内容区域 */
body:not(.theme-premium):not(.theme-atelier) .ops-section,
body:not(.theme-premium):not(.theme-atelier) .admin-section {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

/* 区域头部 */
body:not(.theme-premium):not(.theme-atelier) .ops-section-head {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .ops-section-head strong {
  color: var(--text-primary);
  font-size: 18px;
}

body:not(.theme-premium):not(.theme-atelier) .ops-section-head .muted {
  color: var(--text-muted) !important;
}

/* 新建账号抽屉 */
body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer summary {
  color: var(--text-primary);
  cursor: pointer;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer summary:hover {
  background: var(--panel-hover);
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-form {
  border-top: 1px solid var(--border-color);
  padding: 16px;
}

body:not(.theme-premium):not(.theme-atelier) .admin-form-grid {
  gap: 16px;
}

/* 表格容器 */
body:not(.theme-premium):not(.theme-atelier) .admin-table-shell {
  background: #f5f0e1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* 表格头部 */
body:not(.theme-premium):not(.theme-atelier) .admin-table-head {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
}

body:not(.theme-premium):not(.theme-atelier) .admin-table-head span {
  color: var(--text-secondary);
}

/* 列表 */
body:not(.theme-premium):not(.theme-atelier) .admin-list {
  background: #f5f0e1;
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .admin-list .muted {
  color: var(--text-muted) !important;
}

/* 账号列表项 */
body:not(.theme-premium):not(.theme-atelier) .admin-user-item,
body:not(.theme-premium):not(.theme-atelier) .admin-account-row,
body:not(.theme-premium):not(.theme-atelier) .admin-list > div {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: background var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .admin-user-item:hover,
body:not(.theme-premium):not(.theme-atelier) .admin-account-row:hover,
body:not(.theme-premium):not(.theme-atelier) .admin-list > div:hover {
  background: var(--panel-hover);
}

/* 项目筛选 */
body:not(.theme-premium):not(.theme-atelier) .admin-project-filter {
  color: var(--text-secondary);
}

body:not(.theme-premium):not(.theme-atelier) .admin-project-filter select {
  background: #f5f0e1;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

/* 状态标签 */
body:not(.theme-premium):not(.theme-atelier) .admin-status-badge,
body:not(.theme-premium):not(.theme-atelier) .user-status-badge {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

body:not(.theme-premium):not(.theme-atelier) .admin-status-badge[data-status="disabled"],
body:not(.theme-premium):not(.theme-atelier) .user-status-badge[data-status="disabled"] {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-color: var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .admin-status-badge[data-status="expired"],
body:not(.theme-premium):not(.theme-atelier) .user-status-badge[data-status="expired"] {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 82, 82, 0.25);
}

/* 管理后台侧边栏 */
body:not(.theme-premium):not(.theme-atelier) .admin-sidebar-nav,
body:not(.theme-premium):not(.theme-atelier) .ops-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar-nav a,
body:not(.theme-premium):not(.theme-atelier) .ops-sidebar a,
body:not(.theme-premium):not(.theme-atelier) .admin-sidebar-nav button,
body:not(.theme-premium):not(.theme-atelier) .ops-sidebar button {
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar-nav a:hover,
body:not(.theme-premium):not(.theme-atelier) .ops-sidebar a:hover,
body:not(.theme-premium):not(.theme-atelier) .admin-sidebar-nav button:hover,
body:not(.theme-premium):not(.theme-atelier) .ops-sidebar button:hover {
  background: var(--panel-hover);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar-nav a.active,
body:not(.theme-premium):not(.theme-atelier) .ops-sidebar a.active,
body:not(.theme-premium):not(.theme-atelier) .admin-sidebar-nav button.active,
body:not(.theme-premium):not(.theme-atelier) .ops-sidebar button.active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

/* 管理后台主内容区 */
body:not(.theme-premium):not(.theme-atelier) .admin-main,
body:not(.theme-premium):not(.theme-atelier) .ops-content {
  background: #f5f0e1;
  color: var(--text-primary);
}

/* 公开分享规则区域 */
body:not(.theme-premium):not(.theme-atelier) .public-share-rules,
body:not(.theme-premium):not(.theme-atelier) .share-rules-box {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

/* 确保所有article元素在深色主题下不使用白色背景 */
body:not(.theme-premium):not(.theme-atelier) article {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* 确保所有section元素在深色主题下不使用白色背景 */
body:not(.theme-premium):not(.theme-atelier) section {
  color: var(--text-primary);
}

/* 通用白色背景覆盖 - 最后兜底 */
body:not(.theme-premium):not(.theme-atelier) [class*="card"]:not([class*="stat-card"]):not([class*="metric-card"]),
body:not(.theme-premium):not(.theme-atelier) [class*="box"],
body:not(.theme-premium):not(.theme-atelier) [class*="tile"],
body:not(.theme-premium):not(.theme-atelier) [class*="panel"]:not([class*="panel-bg"]):not([class*="panel-solid"]):not([class*="panel-hover"]):not([class*="panel-active"]) {
  background: var(--panel-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* ============================================
   全局左对齐布局
   ============================================ */

/* 页面主容器左对齐 */
body:not(.theme-premium):not(.theme-atelier) .home,
body:not(.theme-premium):not(.theme-atelier) .console-shell,
body:not(.theme-premium):not(.theme-atelier) .admin-shell,
body:not(.theme-premium):not(.theme-atelier) .login-shell,
body:not(.theme-premium):not(.theme-atelier) .workspace-shell {
  justify-content: flex-start;
  align-items: flex-start;
}

/* 主内容区左对齐 */
body:not(.theme-premium):not(.theme-atelier) main,
body:not(.theme-premium):not(.theme-atelier) .main-content,
body:not(.theme-premium):not(.theme-atelier) .content-area,
body:not(.theme-premium):not(.theme-atelier) .console-content,
body:not(.theme-premium):not(.theme-atelier) .admin-content,
body:not(.theme-premium):not(.theme-atelier) .admin-main,
body:not(.theme-premium):not(.theme-atelier) .ops-content {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: 0;
  margin-right: auto;
}

/* 所有section左对齐 */
body:not(.theme-premium):not(.theme-atelier) section {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 所有div默认左对齐 */
body:not(.theme-premium):not(.theme-atelier) div {
  text-align: left;
}

/* 标题左对齐 */
body:not(.theme-premium):not(.theme-atelier) h1,
body:not(.theme-premium):not(.theme-atelier) h2,
body:not(.theme-premium):not(.theme-atelier) h3,
body:not(.theme-premium):not(.theme-atelier) h4,
body:not(.theme-premium):not(.theme-atelier) h5,
body:not(.theme-premium):not(.theme-atelier) h6 {
  text-align: left;
}

/* 段落左对齐 */
body:not(.theme-premium):not(.theme-atelier) p,
body:not(.theme-premium):not(.theme-atelier) span,
body:not(.theme-premium):not(.theme-atelier) label {
  text-align: left;
}

/* 列表左对齐 */
body:not(.theme-premium):not(.theme-atelier) ul,
body:not(.theme-premium):not(.theme-atelier) ol,
body:not(.theme-premium):not(.theme-atelier) li {
  text-align: left;
}

/* 表格左对齐 */
body:not(.theme-premium):not(.theme-atelier) table,
body:not(.theme-premium):not(.theme-atelier) th,
body:not(.theme-premium):not(.theme-atelier) td {
  text-align: left;
}

/* 表单左对齐 */
body:not(.theme-premium):not(.theme-atelier) form,
body:not(.theme-premium):not(.theme-atelier) .field,
body:not(.theme-premium):not(.theme-atelier) .form-group {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 卡片内容左对齐 */
body:not(.theme-premium):not(.theme-atelier) .card,
body:not(.theme-premium):not(.theme-atelier) .stat-card,
body:not(.theme-premium):not(.theme-atelier) .metric-card,
body:not(.theme-premium):not(.theme-atelier) .info-card {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 统计卡片内部左对齐 */
body:not(.theme-premium):not(.theme-atelier) .stat-value,
body:not(.theme-premium):not(.theme-atelier) .stat-label,
body:not(.theme-premium):not(.theme-atelier) .metric-value,
body:not(.theme-premium):not(.theme-atelier) .metric-label {
  text-align: left;
}

/* 管理后台指标左对齐 */
body:not(.theme-premium):not(.theme-atelier) .ops-metrics article,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article span,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article span,
body:not(.theme-premium):not(.theme-atelier) .ops-metrics article strong,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article strong,
body:not(.theme-premium):not(.theme-atelier) .ops-metrics article small,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article small {
  text-align: left;
}

/* Hero区域左对齐 */
body:not(.theme-premium):not(.theme-atelier) .ops-hero {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero > div {
  text-align: left;
}

/* 区域头部左对齐 */
body:not(.theme-premium):not(.theme-atelier) .ops-section-head,
body:not(.theme-premium):not(.theme-atelier) .section-head,
body:not(.theme-premium):not(.theme-atelier) .sub-section-head {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 项目列表左对齐 */
body:not(.theme-premium):not(.theme-atelier) .project-list,
body:not(.theme-premium):not(.theme-atelier) .sub-project-list,
body:not(.theme-premium):not(.theme-atelier) .admin-list,
body:not(.theme-premium):not(.theme-atelier) .admin-project-list {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body:not(.theme-premium):not(.theme-atelier) .project-item,
body:not(.theme-premium):not(.theme-atelier) .project-link,
body:not(.theme-premium):not(.theme-atelier) .admin-user-item,
body:not(.theme-premium):not(.theme-atelier) .admin-account-row {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 表格左对齐 */
body:not(.theme-premium):not(.theme-atelier) .admin-table-head,
body:not(.theme-premium):not(.theme-atelier) .admin-table-shell,
body:not(.theme-premium):not(.theme-atelier) .project-table-head,
body:not(.theme-premium):not(.theme-atelier) .project-table-row {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body:not(.theme-premium):not(.theme-atelier) .admin-table-head span,
body:not(.theme-premium):not(.theme-atelier) .project-table-head span {
  text-align: left;
}

/* 提示条左对齐 */
body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip,
body:not(.theme-premium):not(.theme-atelier) .alert,
body:not(.theme-premium):not(.theme-atelier) .notice,
body:not(.theme-premium):not(.theme-atelier) .notification {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 登录页左对齐 */
body:not(.theme-premium):not(.theme-atelier) .login-card,
body:not(.theme-premium):not(.theme-atelier) .login-hero {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: 0;
  margin-right: auto;
}

body:not(.theme-premium):not(.theme-atelier) .login-hero h1,
body:not(.theme-premium):not(.theme-atelier) .login-hero p {
  text-align: left;
}

/* 上传区域左对齐 */
body:not(.theme-premium):not(.theme-atelier) .dropzone {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 品牌区域左对齐 */
body:not(.theme-premium):not(.theme-atelier) .brand {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 工具栏左对齐 */
body:not(.theme-premium):not(.theme-atelier) .toolbar,
body:not(.theme-premium):not(.theme-atelier) .viewer-toolbar,
body:not(.theme-premium):not(.theme-atelier) .viewer-top-bar,
body:not(.theme-premium):not(.theme-atelier) .viewer-controls,
body:not(.theme-premium):not(.theme-atelier) .viewer-bottom-bar,
body:not(.theme-premium):not(.theme-atelier) .cabinet-tabs-bar {
  text-align: left;
  justify-content: flex-start;
  align-items: center;
}

/* 按钮组左对齐 */
body:not(.theme-premium):not(.theme-atelier) .button-group,
body:not(.theme-premium):not(.theme-atelier) .btn-group,
body:not(.theme-premium):not(.theme-atelier) .actions,
body:not(.theme-premium):not(.theme-atelier) .auth-actions,
body:not(.theme-premium):not(.theme-atelier) .admin-user-actions,
body:not(.theme-premium):not(.theme-atelier) .project-row-actions,
body:not(.theme-premium):not(.theme-atelier) .sub-project-toolbar,
body:not(.theme-premium):not(.theme-atelier) .project-sort-buttons {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 侧边栏左对齐 */
body:not(.theme-premium):not(.theme-atelier) .admin-sidebar,
body:not(.theme-premium):not(.theme-atelier) .ops-sidebar,
body:not(.theme-premium):not(.theme-atelier) .sidebar,
body:not(.theme-premium):not(.theme-atelier) .panel {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body:not(.theme-premium):not(.theme-atelier) .admin-nav,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body:not(.theme-premium):not(.theme-atelier) .admin-nav a,
body:not(.theme-premium):not(.theme-atelier) .admin-nav button,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav a,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav button {
  text-align: left;
  justify-content: flex-start;
  align-items: center;
}

/* 网格布局左对齐 */
body:not(.theme-premium):not(.theme-atelier) .sub-stats-grid,
body:not(.theme-premium):not(.theme-atelier) .stats-grid,
body:not(.theme-premium):not(.theme-atelier) .metrics-grid,
body:not(.theme-premium):not(.theme-atelier) .card-grid,
body:not(.theme-premium):not(.theme-atelier) .admin-form-grid,
body:not(.theme-premium):not(.theme-atelier) .form-grid {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
}

/* 登录统计左对齐 */
body:not(.theme-premium):not(.theme-atelier) .login-stats {
  justify-content: flex-start;
  text-align: left;
}

body:not(.theme-premium):not(.theme-atelier) .login-stats span {
  text-align: left;
}

/* 认证栏左对齐 */
body:not(.theme-premium):not(.theme-atelier) .auth-bar {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 项目列表头部左对齐 */
body:not(.theme-premium):not(.theme-atelier) .project-list-head,
body:not(.theme-premium):not(.theme-atelier) .sub-section-head {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 抽屉左对齐 */
body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer,
body:not(.theme-premium):not(.theme-atelier) .drawer,
body:not(.theme-premium):not(.theme-atelier) details {
  text-align: left;
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer summary,
body:not(.theme-premium):not(.theme-atelier) details summary {
  text-align: left;
}

/* 模态框左对齐 */
body:not(.theme-premium):not(.theme-atelier) .modal,
body:not(.theme-premium):not(.theme-atelier) .dialog,
body:not(.theme-premium):not(.theme-atelier) .popup {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body:not(.theme-premium):not(.theme-atelier) .modal-header,
body:not(.theme-premium):not(.theme-atelier) .dialog-header,
body:not(.theme-premium):not(.theme-atelier) .modal-body,
body:not(.theme-premium):not(.theme-atelier) .dialog-body,
body:not(.theme-premium):not(.theme-atelier) .modal-footer,
body:not(.theme-premium):not(.theme-atelier) .dialog-footer {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 下拉菜单左对齐 */
body:not(.theme-premium):not(.theme-atelier) .dropdown,
body:not(.theme-premium):not(.theme-atelier) .menu,
body:not(.theme-premium):not(.theme-atelier) .popover {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body:not(.theme-premium):not(.theme-atelier) .dropdown-item,
body:not(.theme-premium):not(.theme-atelier) .menu-item {
  text-align: left;
  justify-content: flex-start;
  align-items: center;
}

/* 标签页左对齐 */
body:not(.theme-premium):not(.theme-atelier) .tabs,
body:not(.theme-premium):not(.theme-atelier) .tab-list {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 页脚左对齐 */
body:not(.theme-premium):not(.theme-atelier) footer,
body:not(.theme-premium):not(.theme-atelier) .sub-console-footer,
body:not(.theme-premium):not(.theme-atelier) .site-beian {
  text-align: left;
  justify-content: flex-start;
  align-items: center;
}

body:not(.theme-premium):not(.theme-atelier) .sub-console-footer p {
  text-align: left;
}

/* 搜索框左对齐 */
body:not(.theme-premium):not(.theme-atelier) .project-search-input,
body:not(.theme-premium):not(.theme-atelier) input[type="search"],
body:not(.theme-premium):not(.theme-atelier) input[type="text"],
body:not(.theme-premium):not(.theme-atelier) input[type="password"],
body:not(.theme-premium):not(.theme-atelier) input[type="number"],
body:not(.theme-premium):not(.theme-atelier) input[type="datetime-local"],
body:not(.theme-premium):not(.theme-atelier) textarea,
body:not(.theme-premium):not(.theme-atelier) select {
  text-align: left;
}

/* 错误提示左对齐 */
body:not(.theme-premium):not(.theme-atelier) .login-error,
body:not(.theme-premium):not(.theme-atelier) .error,
body:not(.theme-premium):not(.theme-atelier) .error-message {
  text-align: left;
}

/* 结果区域左对齐 */
body:not(.theme-premium):not(.theme-atelier) .result,
body:not(.theme-premium):not(.theme-atelier) .workspace-result {
  text-align: left;
}

/* 分享行左对齐 */
body:not(.theme-premium):not(.theme-atelier) .share-row {
  justify-content: flex-start;
  text-align: left;
}

/* 保留按钮内部文字居中（不影响布局） */
body:not(.theme-premium):not(.theme-atelier) button,
body:not(.theme-premium):not(.theme-atelier) .primary,
body:not(.theme-premium):not(.theme-atelier) .ghost,
body:not(.theme-premium):not(.theme-atelier) .link-button,
body:not(.theme-premium):not(.theme-atelier) .sort-btn,
body:not(.theme-premium):not(.theme-atelier) .cabinet-tab,
body:not(.theme-premium):not(.theme-atelier) .cabinet-button,
body:not(.theme-premium):not(.theme-atelier) .viewer-tool-btn {
  text-align: center;
  justify-content: center;
  align-items: center;
}

/* 保留图标居中 */
body:not(.theme-premium):not(.theme-atelier) .brand-mark,
body:not(.theme-premium):not(.theme-atelier) .icon,
body:not(.theme-premium):not(.theme-atelier) .avatar {
  text-align: center;
  justify-content: center;
  align-items: center;
}

/* 保留状态标签居中 */
body:not(.theme-premium):not(.theme-atelier) .status-pill,
body:not(.theme-premium):not(.theme-atelier) .badge,
body:not(.theme-premium):not(.theme-atelier) .tag,
body:not(.theme-premium):not(.theme-atelier) .chip,
body:not(.theme-premium):not(.theme-atelier) .admin-status-badge,
body:not(.theme-premium):not(.theme-atelier) .user-status-badge {
  text-align: center;
  justify-content: center;
  align-items: center;
}

/* ============================================
   舒适布局优化 - 呼吸感 · 层次 · 节奏
   ============================================ */

/* ---------- 全局间距与排版 ---------- */
body:not(.theme-premium):not(.theme-atelier) {
  /* 舒适间距系统 */
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* 舒适字体节奏 */
  --font-xs: 12px;
  --font-sm: 13px;
  --font-base: 14px;
  --font-md: 15px;
  --font-lg: 17px;
  --font-xl: 20px;
  --font-2xl: 24px;
  --font-3xl: 30px;

  /* 舒适行高 */
  --line-tight: 1.3;
  --line-normal: 1.6;
  --line-relaxed: 1.8;

  font-size: var(--font-base);
  line-height: var(--line-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 页面容器舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .home,
body:not(.theme-premium):not(.theme-atelier) .console-shell {
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
}

body:not(.theme-premium):not(.theme-atelier) .admin-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
}

/* 左侧面板舒适内边距 */
body:not(.theme-premium):not(.theme-atelier) .panel {
  padding: var(--space-2xl) var(--space-xl);
  gap: var(--space-lg);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

/* 主内容区舒适内边距 */
body:not(.theme-premium):not(.theme-atelier) .console-content,
body:not(.theme-premium):not(.theme-atelier) .admin-content,
body:not(.theme-premium):not(.theme-atelier) .admin-main,
body:not(.theme-premium):not(.theme-atelier) .ops-content,
body:not(.theme-premium):not(.theme-atelier) main {
  padding: var(--space-2xl);
  overflow-y: auto;
  max-width: 100%;
}

/* ---------- 品牌区域舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .brand {
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

body:not(.theme-premium):not(.theme-atelier) .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 700;
}

body:not(.theme-premium):not(.theme-atelier) h1 {
  font-size: var(--font-2xl);
  font-weight: 700;
  line-height: var(--line-tight);
  letter-spacing: -0.01em;
}

/* ---------- 标题层级舒适节奏 ---------- */
body:not(.theme-premium):not(.theme-atelier) h2 {
  font-size: var(--font-xl);
  font-weight: 600;
  line-height: var(--line-tight);
  letter-spacing: -0.005em;
}

body:not(.theme-premium):not(.theme-atelier) h3 {
  font-size: var(--font-lg);
  font-weight: 600;
  line-height: var(--line-tight);
}

body:not(.theme-premium):not(.theme-atelier) h4 {
  font-size: var(--font-md);
  font-weight: 600;
  line-height: var(--line-tight);
}

body:not(.theme-premium):not(.theme-atelier) p {
  font-size: var(--font-base);
  line-height: var(--line-relaxed);
  color: var(--text-secondary);
}

/* ---------- 统计卡片舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .sub-stats-grid,
body:not(.theme-premium):not(.theme-atelier) .stats-grid,
body:not(.theme-premium):not(.theme-atelier) .metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

body:not(.theme-premium):not(.theme-atelier) .stat-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

body:not(.theme-premium):not(.theme-atelier) .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

body:not(.theme-premium):not(.theme-atelier) .stat-value {
  font-size: var(--font-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--line-tight);
  letter-spacing: -0.02em;
}

body:not(.theme-premium):not(.theme-atelier) .stat-label {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---------- 管理后台指标舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .ops-metrics,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article {
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article:hover,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article:hover {
  transform: translateY(-2px);
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article span,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article span {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article strong,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article strong {
  font-size: var(--font-2xl);
  font-weight: 700;
  line-height: var(--line-tight);
  letter-spacing: -0.01em;
}

body:not(.theme-premium):not(.theme-atelier) .ops-metrics article small,
body:not(.theme-premium):not(.theme-atelier) .admin-metrics article small {
  font-size: var(--font-xs);
  line-height: var(--line-normal);
}

/* ---------- Hero区域舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .ops-hero {
  padding: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero .eyebrow {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero h1 {
  font-size: var(--font-2xl);
  margin-bottom: var(--space-xs);
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero p {
  font-size: var(--font-sm);
  max-width: 640px;
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero-status {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 180px;
  text-align: center;
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero-status span {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

body:not(.theme-premium):not(.theme-atelier) .ops-hero-status strong {
  font-size: var(--font-xl);
  font-weight: 700;
}

/* ---------- 提示条舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip > span {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip strong {
  font-size: var(--font-sm);
  font-weight: 700;
  margin-bottom: 2px;
}

body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip em {
  font-size: var(--font-xs);
  line-height: var(--line-normal);
}

/* ---------- 内容区域舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .ops-section,
body:not(.theme-premium):not(.theme-atelier) .admin-section {
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

body:not(.theme-premium):not(.theme-atelier) .ops-section-head {
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
}

body:not(.theme-premium):not(.theme-atelier) .ops-section-head > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

body:not(.theme-premium):not(.theme-atelier) .ops-section-head .eyebrow {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

body:not(.theme-premium):not(.theme-atelier) .ops-section-head strong {
  font-size: var(--font-xl);
  font-weight: 700;
}

body:not(.theme-premium):not(.theme-atelier) .ops-section-head .muted {
  font-size: var(--font-sm);
  max-width: 400px;
}

/* ---------- 新建抽屉舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer {
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer summary {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-md);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer summary::before {
  content: "+";
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--accent);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer[open] summary::before {
  content: "−";
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-form {
  padding: var(--space-lg);
}

body:not(.theme-premium):not(.theme-atelier) .admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

body:not(.theme-premium):not(.theme-atelier) .admin-form-grid .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

body:not(.theme-premium):not(.theme-atelier) .admin-form-grid .field span {
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- 表格舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .admin-table-shell {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

body:not(.theme-premium):not(.theme-atelier) .admin-table-head {
  padding: var(--space-md) var(--space-lg);
  display: grid;
  gap: var(--space-md);
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body:not(.theme-premium):not(.theme-atelier) .admin-list {
  padding: 0;
}

body:not(.theme-premium):not(.theme-atelier) .admin-list > div,
body:not(.theme-premium):not(.theme-atelier) .admin-user-item,
body:not(.theme-premium):not(.theme-atelier) .admin-account-row {
  padding: var(--space-md) var(--space-lg);
  display: grid;
  gap: var(--space-md);
  align-items: center;
  transition: background var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .admin-list > div:hover,
body:not(.theme-premium):not(.theme-atelier) .admin-user-item:hover,
body:not(.theme-premium):not(.theme-atelier) .admin-account-row:hover {
  background: var(--panel-hover);
}

/* ---------- 项目列表舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .sub-projects-section {
  margin-bottom: var(--space-xl);
}

body:not(.theme-premium):not(.theme-atelier) .sub-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  gap: var(--space-lg);
  flex-wrap: wrap;
}

body:not(.theme-premium):not(.theme-atelier) .sub-section-head h2 {
  font-size: var(--font-xl);
  font-weight: 700;
}

body:not(.theme-premium):not(.theme-atelier) .sub-project-toolbar {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

body:not(.theme-premium):not(.theme-atelier) .project-search-input {
  min-width: 200px;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
}

body:not(.theme-premium):not(.theme-atelier) .project-sort-buttons {
  display: flex;
  gap: 4px;
}

body:not(.theme-premium):not(.theme-atelier) .sort-btn {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

body:not(.theme-premium):not(.theme-atelier) .sort-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

body:not(.theme-premium):not(.theme-atelier) .sub-project-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

body:not(.theme-premium):not(.theme-atelier) .project-item {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
  backdrop-filter: var(--blur-sm);
  transition: all var(--transition-base);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: center;
}

body:not(.theme-premium):not(.theme-atelier) .project-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

body:not(.theme-premium):not(.theme-atelier) .project-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body:not(.theme-premium):not(.theme-atelier) .project-item strong {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .project-item .muted {
  font-size: var(--font-xs);
  color: var(--text-muted) !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-row-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- 按钮舒适尺寸 ---------- */
body:not(.theme-premium):not(.theme-atelier) button,
body:not(.theme-premium):not(.theme-atelier) .ghost,
body:not(.theme-premium):not(.theme-atelier) .link-button {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

body:not(.theme-premium):not(.theme-atelier) .primary,
body:not(.theme-premium):not(.theme-atelier) button.primary {
  padding: var(--space-sm) var(--space-xl);
  font-size: var(--font-sm);
  font-weight: 700;
  min-height: 40px;
  border-radius: var(--radius-md);
}

body:not(.theme-premium):not(.theme-atelier) .link-button {
  padding: var(--space-xs) var(--space-md);
  min-height: 32px;
  font-size: var(--font-xs);
}

/* ---------- 输入框舒适尺寸 ---------- */
body:not(.theme-premium):not(.theme-atelier) input,
body:not(.theme-premium):not(.theme-atelier) textarea,
body:not(.theme-premium):not(.theme-atelier) select {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-sm);
  border-radius: var(--radius-md);
  min-height: 38px;
  transition: all var(--transition-base);
}

body:not(.theme-premium):not(.theme-atelier) input:focus,
body:not(.theme-premium):not(.theme-atelier) textarea:focus,
body:not(.theme-premium):not(.theme-atelier) select:focus {
  padding: var(--space-sm) var(--space-md);
}

body:not(.theme-premium):not(.theme-atelier) .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

body:not(.theme-premium):not(.theme-atelier) .field span {
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- 上传区域舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .dropzone {
  min-height: 180px;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px dashed var(--border-strong);
}

body:not(.theme-premium):not(.theme-atelier) .dropzone:hover,
body:not(.theme-premium):not(.theme-atelier) .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

body:not(.theme-premium):not(.theme-atelier) .dropzone strong {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .dropzone p,
body:not(.theme-premium):not(.theme-atelier) .dropzone span {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  text-align: center;
}

/* ---------- 登录页舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .login-shell {
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 460px);
}

body:not(.theme-premium):not(.theme-atelier) .login-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
}

body:not(.theme-premium):not(.theme-atelier) .login-hero {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

body:not(.theme-premium):not(.theme-atelier) .login-hero .eyebrow {
  font-size: var(--font-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 800;
}

body:not(.theme-premium):not(.theme-atelier) .login-hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body:not(.theme-premium):not(.theme-atelier) .login-hero p {
  font-size: var(--font-md);
  line-height: var(--line-relaxed);
  max-width: 440px;
}

body:not(.theme-premium):not(.theme-atelier) .login-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

body:not(.theme-premium):not(.theme-atelier) .login-stats span {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body:not(.theme-premium):not(.theme-atelier) .login-stats strong {
  font-size: var(--font-xl);
  font-weight: 700;
}

body:not(.theme-premium):not(.theme-atelier) .login-card {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-lg);
  overflow-y: auto;
}

body:not(.theme-premium):not(.theme-atelier) .login-card h1,
body:not(.theme-premium):not(.theme-atelier) .login-card h2 {
  font-size: var(--font-2xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

body:not(.theme-premium):not(.theme-atelier) .login-card .field {
  gap: var(--space-xs);
}

body:not(.theme-premium):not(.theme-atelier) .login-error {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
}

/* ---------- 侧边栏舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .admin-sidebar,
body:not(.theme-premium):not(.theme-atelier) .ops-sidebar,
body:not(.theme-premium):not(.theme-atelier) .sidebar {
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  overflow-y: auto;
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar .brand {
  margin-bottom: var(--space-md);
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar h1 {
  font-size: var(--font-lg);
  font-weight: 700;
}

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar .muted {
  font-size: var(--font-xs);
}

body:not(.theme-premium):not(.theme-atelier) .admin-nav,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body:not(.theme-premium):not(.theme-atelier) .admin-nav a,
body:not(.theme-premium):not(.theme-atelier) .admin-nav button,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav a,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav button {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all var(--transition-fast);
  width: 100%;
  text-align: left;
}

body:not(.theme-premium):not(.theme-atelier) .admin-nav a:hover,
body:not(.theme-premium):not(.theme-atelier) .admin-nav button:hover,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav a:hover,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav button:hover {
  background: var(--panel-hover);
}

body:not(.theme-premium):not(.theme-atelier) .admin-nav a.active,
body:not(.theme-premium):not(.theme-atelier) .admin-nav button.active,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav a.active,
body:not(.theme-premium):not(.theme-atelier) .sidebar-nav button.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ---------- 认证栏舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .auth-bar {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

body:not(.theme-premium):not(.theme-atelier) .auth-user {
  font-size: var(--font-sm);
  font-weight: 600;
}

body:not(.theme-premium):not(.theme-atelier) .auth-actions,
body:not(.theme-premium):not(.theme-atelier) .admin-user-actions {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

/* ---------- 页脚舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .sub-console-footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body:not(.theme-premium):not(.theme-atelier) .sub-console-footer p {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

/* ---------- 结果区域舒适布局 ---------- */
body:not(.theme-premium):not(.theme-atelier) .result,
body:not(.theme-premium):not(.theme-atelier) .workspace-result {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
}

body:not(.theme-premium):not(.theme-atelier) .result strong {
  font-size: var(--font-md);
  font-weight: 700;
  display: block;
  margin-bottom: var(--space-sm);
}

body:not(.theme-premium):not(.theme-atelier) .share-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

body:not(.theme-premium):not(.theme-atelier) .share-row input {
  min-width: 0;
}

body:not(.theme-premium):not(.theme-atelier) .qr {
  margin-top: var(--space-md);
  border-radius: var(--radius-md);
}

/* ---------- 响应式舒适布局 ---------- */
@media (max-width: 1024px) {
  body:not(.theme-premium):not(.theme-atelier) .home,
  body:not(.theme-premium):not(.theme-atelier) .console-shell {
    grid-template-columns: 1fr;
  }

  body:not(.theme-premium):not(.theme-atelier) .panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 50vh;
  }

  body:not(.theme-premium):not(.theme-atelier) .admin-shell {
    grid-template-columns: 1fr;
  }

  body:not(.theme-premium):not(.theme-atelier) .admin-sidebar,
  body:not(.theme-premium):not(.theme-atelier) .ops-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 40vh;
  }

  body:not(.theme-premium):not(.theme-atelier) .login-shell {
    grid-template-columns: 1fr;
  }

  body:not(.theme-premium):not(.theme-atelier) .login-visual {
    display: none;
  }
}

@media (max-width: 640px) {
  body:not(.theme-premium):not(.theme-atelier) {
    --space-2xl: 32px;
    --space-xl: 24px;
    --space-lg: 16px;
  }

  body:not(.theme-premium):not(.theme-atelier) .console-content,
  body:not(.theme-premium):not(.theme-atelier) .admin-content,
  body:not(.theme-premium):not(.theme-atelier) .admin-main,
  body:not(.theme-premium):not(.theme-atelier) .ops-content,
  body:not(.theme-premium):not(.theme-atelier) main {
    padding: var(--space-lg);
  }

  body:not(.theme-premium):not(.theme-atelier) .ops-hero {
    flex-direction: column;
  }

  body:not(.theme-premium):not(.theme-atelier) .ops-section-head {
    flex-direction: column;
  }

  body:not(.theme-premium):not(.theme-atelier) .sub-stats-grid,
  body:not(.theme-premium):not(.theme-atelier) .stats-grid,
  body:not(.theme-premium):not(.theme-atelier) .metrics-grid,
  body:not(.theme-premium):not(.theme-atelier) .ops-metrics,
  body:not(.theme-premium):not(.theme-atelier) .admin-metrics {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   舒适布局优化 - 呼吸感 · 层次 · 节奏
   ============================================ */

body:not(.theme-premium):not(.theme-atelier) {
  --space-xs: 6px; --space-sm: 10px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px;
  --font-xs: 12px; --font-sm: 13px; --font-base: 14px; --font-md: 15px; --font-lg: 17px; --font-xl: 20px; --font-2xl: 24px; --font-3xl: 30px;
  --line-tight: 1.3; --line-normal: 1.6; --line-relaxed: 1.8;
  font-size: var(--font-base); line-height: var(--line-normal);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

body:not(.theme-premium):not(.theme-atelier) .home, body:not(.theme-premium):not(.theme-atelier) .console-shell { grid-template-columns: 380px minmax(0, 1fr); }
body:not(.theme-premium):not(.theme-atelier) .admin-shell { grid-template-columns: 260px minmax(0, 1fr); }
body:not(.theme-premium):not(.theme-atelier) .panel { padding: var(--space-2xl) var(--space-xl); gap: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .console-content, body:not(.theme-premium):not(.theme-atelier) .admin-content, body:not(.theme-premium):not(.theme-atelier) .admin-main, body:not(.theme-premium):not(.theme-atelier) .ops-content, body:not(.theme-premium):not(.theme-atelier) main { padding: var(--space-2xl); }

body:not(.theme-premium):not(.theme-atelier) .brand { gap: var(--space-md); }
body:not(.theme-premium):not(.theme-atelier) .brand-mark { width: 48px; height: 48px; border-radius: var(--radius-md); font-size: 18px; }
body:not(.theme-premium):not(.theme-atelier) h1 { font-size: var(--font-2xl); font-weight: 700; line-height: var(--line-tight); letter-spacing: -0.01em; }
body:not(.theme-premium):not(.theme-atelier) h2 { font-size: var(--font-xl); font-weight: 600; }
body:not(.theme-premium):not(.theme-atelier) h3 { font-size: var(--font-lg); font-weight: 600; }
body:not(.theme-premium):not(.theme-atelier) p { font-size: var(--font-base); line-height: var(--line-relaxed); color: var(--text-secondary); }

body:not(.theme-premium):not(.theme-atelier) .sub-stats-grid, body:not(.theme-premium):not(.theme-atelier) .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-xl); }
body:not(.theme-premium):not(.theme-atelier) .stat-card { padding: var(--space-lg); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: var(--space-xs); transition: all var(--transition-base); }
body:not(.theme-premium):not(.theme-atelier) .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
body:not(.theme-premium):not(.theme-atelier) .stat-value { font-size: var(--font-3xl); font-weight: 700; line-height: var(--line-tight); letter-spacing: -0.02em; }
body:not(.theme-premium):not(.theme-atelier) .stat-label { font-size: var(--font-sm); font-weight: 500; }

body:not(.theme-premium):not(.theme-atelier) .ops-metrics, body:not(.theme-premium):not(.theme-atelier) .admin-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .ops-metrics article, body:not(.theme-premium):not(.theme-atelier) .admin-metrics article { padding: var(--space-lg) var(--space-md); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: var(--space-xs); transition: all var(--transition-base); }
body:not(.theme-premium):not(.theme-atelier) .ops-metrics article:hover { transform: translateY(-2px); }
body:not(.theme-premium):not(.theme-atelier) .ops-metrics article span { font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
body:not(.theme-premium):not(.theme-atelier) .ops-metrics article strong { font-size: var(--font-2xl); font-weight: 700; line-height: var(--line-tight); }
body:not(.theme-premium):not(.theme-atelier) .ops-metrics article small { font-size: var(--font-xs); line-height: var(--line-normal); }

body:not(.theme-premium):not(.theme-atelier) .ops-hero { padding: var(--space-xl) var(--space-lg); margin-bottom: var(--space-lg); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-xl); }
body:not(.theme-premium):not(.theme-atelier) .ops-hero > div { flex: 1; display: flex; flex-direction: column; gap: var(--space-sm); }
body:not(.theme-premium):not(.theme-atelier) .ops-hero .eyebrow { font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
body:not(.theme-premium):not(.theme-atelier) .ops-hero h1 { font-size: var(--font-2xl); margin-bottom: var(--space-xs); }
body:not(.theme-premium):not(.theme-atelier) .ops-hero p { font-size: var(--font-sm); max-width: 640px; }
body:not(.theme-premium):not(.theme-atelier) .ops-hero-status { padding: var(--space-md) var(--space-lg); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: var(--space-xs); min-width: 180px; text-align: center; }
body:not(.theme-premium):not(.theme-atelier) .ops-hero-status span { font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
body:not(.theme-premium):not(.theme-atelier) .ops-hero-status strong { font-size: var(--font-xl); font-weight: 700; }

body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-sm); padding: var(--space-md); margin-bottom: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip > span { padding: var(--space-md); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: var(--space-xs); }
body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip strong { font-size: var(--font-sm); font-weight: 700; margin-bottom: 2px; }
body:not(.theme-premium):not(.theme-atelier) .ops-alert-strip em { font-size: var(--font-xs); line-height: var(--line-normal); font-style: normal; }

body:not(.theme-premium):not(.theme-atelier) .ops-section, body:not(.theme-premium):not(.theme-atelier) .admin-section { padding: var(--space-xl); margin-bottom: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .ops-section-head { padding-bottom: var(--space-md); margin-bottom: var(--space-lg); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .ops-section-head > div { display: flex; flex-direction: column; gap: var(--space-xs); }
body:not(.theme-premium):not(.theme-atelier) .ops-section-head .eyebrow { font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
body:not(.theme-premium):not(.theme-atelier) .ops-section-head strong { font-size: var(--font-xl); font-weight: 700; }
body:not(.theme-premium):not(.theme-atelier) .ops-section-head .muted { font-size: var(--font-sm); max-width: 400px; }

body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer { margin-bottom: var(--space-lg); border-radius: var(--radius-lg); overflow: hidden; }
body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer summary { padding: var(--space-md) var(--space-lg); font-size: var(--font-md); font-weight: 600; list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-sm); }
body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer summary::before { content: "+"; font-size: var(--font-lg); font-weight: 700; color: var(--accent); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); background: var(--accent-soft); }
body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer[open] summary::before { content: "−"; }
body:not(.theme-premium):not(.theme-atelier) .admin-create-form { padding: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .admin-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .admin-form-grid .field { display: flex; flex-direction: column; gap: var(--space-xs); }
body:not(.theme-premium):not(.theme-atelier) .admin-form-grid .field span { font-size: var(--font-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }

body:not(.theme-premium):not(.theme-atelier) .admin-table-shell { border-radius: var(--radius-lg); overflow: hidden; }
body:not(.theme-premium):not(.theme-atelier) .admin-table-head { padding: var(--space-md) var(--space-lg); display: grid; gap: var(--space-md); font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.05em; }
body:not(.theme-premium):not(.theme-atelier) .admin-list > div, body:not(.theme-premium):not(.theme-atelier) .admin-user-item, body:not(.theme-premium):not(.theme-atelier) .admin-account-row { padding: var(--space-md) var(--space-lg); display: grid; gap: var(--space-md); align-items: center; transition: background var(--transition-fast); }
body:not(.theme-premium):not(.theme-atelier) .admin-list > div:hover { background: var(--panel-hover); }

body:not(.theme-premium):not(.theme-atelier) .sub-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-lg); gap: var(--space-lg); flex-wrap: wrap; }
body:not(.theme-premium):not(.theme-atelier) .sub-section-head h2 { font-size: var(--font-xl); font-weight: 700; }
body:not(.theme-premium):not(.theme-atelier) .sub-project-toolbar { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; }
body:not(.theme-premium):not(.theme-atelier) .project-search-input { min-width: 200px; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); font-size: var(--font-sm); }
body:not(.theme-premium):not(.theme-atelier) .project-sort-buttons { display: flex; gap: 4px; }
body:not(.theme-premium):not(.theme-atelier) .sort-btn { padding: var(--space-xs) var(--space-md); font-size: var(--font-xs); font-weight: 600; border-radius: var(--radius-sm); }
body:not(.theme-premium):not(.theme-atelier) .sort-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
body:not(.theme-premium):not(.theme-atelier) .sub-project-list { display: flex; flex-direction: column; gap: var(--space-sm); }
body:not(.theme-premium):not(.theme-atelier) .project-item { padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md); border: 1px solid var(--border-color); background: var(--panel-bg); backdrop-filter: var(--blur-sm); transition: all var(--transition-base); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; }
body:not(.theme-premium):not(.theme-atelier) .project-item:hover { border-color: var(--border-hover); transform: translateX(4px); box-shadow: var(--shadow-sm); }
body:not(.theme-premium):not(.theme-atelier) .project-link { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body:not(.theme-premium):not(.theme-atelier) .project-item strong { font-size: var(--font-md); font-weight: 600; color: var(--text-primary); }
body:not(.theme-premium):not(.theme-atelier) .project-item .muted { font-size: var(--font-xs); color: var(--text-muted) !important; }
body:not(.theme-premium):not(.theme-atelier) .project-row-actions { display: flex; gap: var(--space-xs); align-items: center; flex-wrap: wrap; }

body:not(.theme-premium):not(.theme-atelier) button, body:not(.theme-premium):not(.theme-atelier) .ghost, body:not(.theme-premium):not(.theme-atelier) .link-button { padding: var(--space-sm) var(--space-md); font-size: var(--font-sm); font-weight: 600; border-radius: var(--radius-md); min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: all var(--transition-base); white-space: nowrap; }
body:not(.theme-premium):not(.theme-atelier) .primary, body:not(.theme-premium):not(.theme-atelier) button.primary { padding: var(--space-sm) var(--space-xl); font-size: var(--font-sm); font-weight: 700; min-height: 40px; border-radius: var(--radius-md); }
body:not(.theme-premium):not(.theme-atelier) .link-button { padding: var(--space-xs) var(--space-md); min-height: 32px; font-size: var(--font-xs); }

body:not(.theme-premium):not(.theme-atelier) input, body:not(.theme-premium):not(.theme-atelier) textarea, body:not(.theme-premium):not(.theme-atelier) select { padding: var(--space-sm) var(--space-md); font-size: var(--font-sm); border-radius: var(--radius-md); min-height: 38px; transition: all var(--transition-base); }
body:not(.theme-premium):not(.theme-atelier) .field { display: flex; flex-direction: column; gap: var(--space-xs); }
body:not(.theme-premium):not(.theme-atelier) .field span { font-size: var(--font-xs); font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }

body:not(.theme-premium):not(.theme-atelier) .dropzone { min-height: 180px; border-radius: var(--radius-lg); padding: var(--space-xl); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-sm); cursor: pointer; transition: all var(--transition-base); border: 2px dashed var(--border-strong); }
body:not(.theme-premium):not(.theme-atelier) .dropzone:hover, body:not(.theme-premium):not(.theme-atelier) .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
body:not(.theme-premium):not(.theme-atelier) .dropzone strong { font-size: var(--font-lg); font-weight: 700; color: var(--text-primary); }
body:not(.theme-premium):not(.theme-atelier) .dropzone p, body:not(.theme-premium):not(.theme-atelier) .dropzone span { font-size: var(--font-sm); color: var(--text-secondary); text-align: center; }

body:not(.theme-premium):not(.theme-atelier) .login-shell { grid-template-columns: minmax(0, 1.2fr) minmax(380px, 460px); }
body:not(.theme-premium):not(.theme-atelier) .login-visual { display: flex; align-items: center; justify-content: center; padding: var(--space-2xl); }
body:not(.theme-premium):not(.theme-atelier) .login-hero { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .login-hero .eyebrow { font-size: var(--font-sm); text-transform: uppercase; letter-spacing: 0.15em; font-weight: 800; }
body:not(.theme-premium):not(.theme-atelier) .login-hero h1 { font-size: 42px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
body:not(.theme-premium):not(.theme-atelier) .login-hero p { font-size: var(--font-md); line-height: var(--line-relaxed); max-width: 440px; }
body:not(.theme-premium):not(.theme-atelier) .login-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); margin-top: var(--space-md); }
body:not(.theme-premium):not(.theme-atelier) .login-stats span { padding: var(--space-md); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 4px; }
body:not(.theme-premium):not(.theme-atelier) .login-stats strong { font-size: var(--font-xl); font-weight: 700; }
body:not(.theme-premium):not(.theme-atelier) .login-card { padding: var(--space-2xl); display: flex; flex-direction: column; justify-content: center; gap: var(--space-lg); overflow-y: auto; }
body:not(.theme-premium):not(.theme-atelier) .login-card h1, body:not(.theme-premium):not(.theme-atelier) .login-card h2 { font-size: var(--font-2xl); font-weight: 700; margin-bottom: var(--space-xs); }
body:not(.theme-premium):not(.theme-atelier) .login-error { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); font-size: var(--font-sm); font-weight: 500; }

body:not(.theme-premium):not(.theme-atelier) .admin-sidebar, body:not(.theme-premium):not(.theme-atelier) .ops-sidebar, body:not(.theme-premium):not(.theme-atelier) .sidebar { padding: var(--space-xl) var(--space-lg); display: flex; flex-direction: column; gap: var(--space-lg); overflow-y: auto; }
body:not(.theme-premium):not(.theme-atelier) .admin-sidebar h1 { font-size: var(--font-lg); font-weight: 700; }
body:not(.theme-premium):not(.theme-atelier) .admin-sidebar .muted { font-size: var(--font-xs); }
body:not(.theme-premium):not(.theme-atelier) .admin-nav, body:not(.theme-premium):not(.theme-atelier) .sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
body:not(.theme-premium):not(.theme-atelier) .admin-nav a, body:not(.theme-premium):not(.theme-atelier) .admin-nav button, body:not(.theme-premium):not(.theme-atelier) .sidebar-nav a, body:not(.theme-premium):not(.theme-atelier) .sidebar-nav button { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); font-size: var(--font-sm); font-weight: 500; display: flex; align-items: center; gap: var(--space-sm); transition: all var(--transition-fast); width: 100%; text-align: left; }
body:not(.theme-premium):not(.theme-atelier) .admin-nav a:hover, body:not(.theme-premium):not(.theme-atelier) .admin-nav button:hover { background: var(--panel-hover); }
body:not(.theme-premium):not(.theme-atelier) .admin-nav a.active, body:not(.theme-premium):not(.theme-atelier) .admin-nav button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

body:not(.theme-premium):not(.theme-atelier) .auth-bar { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); margin-bottom: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .auth-user { font-size: var(--font-sm); font-weight: 600; }
body:not(.theme-premium):not(.theme-atelier) .auth-actions, body:not(.theme-premium):not(.theme-atelier) .admin-user-actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; }

body:not(.theme-premium):not(.theme-atelier) .sub-console-footer { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 4px; }
body:not(.theme-premium):not(.theme-atelier) .sub-console-footer p { font-size: var(--font-xs); color: var(--text-muted); }

body:not(.theme-premium):not(.theme-atelier) .result, body:not(.theme-premium):not(.theme-atelier) .workspace-result { padding: var(--space-lg); border-radius: var(--radius-lg); margin-top: var(--space-lg); }
body:not(.theme-premium):not(.theme-atelier) .result strong { font-size: var(--font-md); font-weight: 700; display: block; margin-bottom: var(--space-sm); }
body:not(.theme-premium):not(.theme-atelier) .share-row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-sm); margin-top: var(--space-sm); }
body:not(.theme-premium):not(.theme-atelier) .qr { margin-top: var(--space-md); border-radius: var(--radius-md); }

@media (max-width: 1024px) {
  body:not(.theme-premium):not(.theme-atelier) .home, body:not(.theme-premium):not(.theme-atelier) .console-shell { grid-template-columns: 1fr; }
  body:not(.theme-premium):not(.theme-atelier) .panel { border-right: none; border-bottom: 1px solid var(--border-color); max-height: 50vh; }
  body:not(.theme-premium):not(.theme-atelier) .admin-shell { grid-template-columns: 1fr; }
  body:not(.theme-premium):not(.theme-atelier) .admin-sidebar, body:not(.theme-premium):not(.theme-atelier) .ops-sidebar { border-right: none; border-bottom: 1px solid var(--border-color); max-height: 40vh; }
  body:not(.theme-premium):not(.theme-atelier) .login-shell { grid-template-columns: 1fr; }
  body:not(.theme-premium):not(.theme-atelier) .login-visual { display: none; }
}
@media (max-width: 640px) {
  body:not(.theme-premium):not(.theme-atelier) { --space-2xl: 32px; --space-xl: 24px; --space-lg: 16px; }
  body:not(.theme-premium):not(.theme-atelier) .console-content, body:not(.theme-premium):not(.theme-atelier) .admin-content, body:not(.theme-premium):not(.theme-atelier) main { padding: var(--space-lg); }
  body:not(.theme-premium):not(.theme-atelier) .ops-hero { flex-direction: column; }
  body:not(.theme-premium):not(.theme-atelier) .ops-section-head { flex-direction: column; }
  body:not(.theme-premium):not(.theme-atelier) .sub-stats-grid, body:not(.theme-premium):not(.theme-atelier) .ops-metrics, body:not(.theme-premium):not(.theme-atelier) .admin-metrics { grid-template-columns: 1fr; }
}

/* ============================================
   工作台账号信息条 - 青色背景白色字体
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip {
  width: min(1320px, calc(100% - 40px));
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--border-color);
  box-shadow: var(--shadow-md);
}

body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip span {
  display: grid;
  gap: 6px;
  min-height: 80px;
  padding: 16px 20px;
  background: var(--panel-bg);
  backdrop-filter: var(--blur-md);
  color: var(--text-secondary);
  font-size: var(--font-sm);
  transition: background var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip span:hover {
  background: var(--panel-hover);
}

body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip strong {
  color: var(--text-primary);
  font-size: var(--font-lg);
  font-weight: 700;
  line-height: var(--line-tight);
}

/* 统计卡片和主网格对齐 */
body:not(.theme-premium):not(.theme-atelier) .stats-grid,
body:not(.theme-premium):not(.theme-atelier) .sub-stats-grid {
  width: min(1320px, calc(100% - 40px));
  margin: 20px auto 0;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-main-grid {
  width: min(1320px, calc(100% - 40px));
  margin: 20px auto 40px;
}

/* 上传卡片和侧边栏卡片青色背景 */
body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel,
body:not(.theme-premium):not(.theme-atelier) .workspace-rail > section,
body:not(.theme-premium):not(.theme-atelier) .project-operations-card,
body:not(.theme-premium):not(.theme-atelier) .workspace-result {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel {
  padding: 28px;
  gap: 20px;
}

body:not(.theme-premium):not(.theme-atelier) .section-heading {
  gap: 10px;
}

body:not(.theme-premium):not(.theme-atelier) .section-heading h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .card-kicker {
  color: var(--accent);
  font-size: var(--font-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* 账号到期卡片 */
body:not(.theme-premium):not(.theme-atelier) .account-expiry-card {
  padding: 24px;
  gap: 12px;
  align-content: start;
  color: var(--text-primary);
  background: var(--panel-bg);
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card span {
  color: var(--text-secondary);
  line-height: 1.65;
}

/* 修改密码卡片 */
body:not(.theme-premium):not(.theme-atelier) .password-change-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card summary {
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card summary:hover {
  color: var(--accent);
}

/* 项目列表卡片 */
body:not(.theme-premium):not(.theme-atelier) .project-operations-card {
  padding: 24px;
}

body:not(.theme-premium):not(.theme-atelier) .project-operations-card .project-list-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

body:not(.theme-premium):not(.theme-atelier) .project-operations-card .project-item {
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .project-operations-card .project-item:first-child {
  border-top: none;
}

/* 项目列表工具栏 */
body:not(.theme-premium):not(.theme-atelier) .project-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

body:not(.theme-premium):not(.theme-atelier) .project-list-toolbar .project-search-input {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

/* 上传表单 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .field span {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout input[type="text"] {
  width: 100%;
}

/* 上传区域加大 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone {
  min-height: 200px;
  padding: 32px;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone strong {
  font-size: var(--font-xl);
  font-weight: 700;
}

/* 上传按钮加大 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .primary {
  padding: 14px 32px;
  font-size: var(--font-md);
  font-weight: 700;
  min-height: 48px;
}

/* 工作台头部 */
body:not(.theme-premium):not(.theme-atelier) .workspace-header {
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  border-bottom: 1px solid var(--border-color);
}

/* ============================================
   手机端3D查看器适配 - 全部缩小2倍
   ============================================ */
@media (max-width: 768px) {
  /* 顶部工具栏：换行布局，禁止横向滚动（避免iOS滚动条遮挡按钮文字） */
  .ref-top-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-width: calc(100vw - 45px) !important;
    padding: 2px 4px !important;
    gap: 6px !important;
  }
  .ref-top-toolbar::-webkit-scrollbar {
    display: none !important;
  }
  .ref-top-toolbar button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-width: auto !important;
    padding: 2px 8px !important;
    font-size: 12px !important;
    height: 28px !important;
  }

  /* 项目标签栏：强制横向滚动，缩小2倍 */
  .cabinet-strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    padding: 4px 8px !important;
    gap: 5px !important;
    bottom: 30px !important;
  }
  .cabinet-strip button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    min-height: 24px !important;
  }

  /* 底部按钮栏：强制横向滚动，缩小2倍 */
  .ref-bottom-toolbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    touch-action: pan-x !important;
    height: 30px !important;
    padding: 0 3px !important;
  }
  .ref-bottom-toolbar::-webkit-scrollbar {
    display: none !important;
  }
  .ref-bottom-toolbar button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-width: auto !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    height: 26px !important;
  }

  /* 右侧工具栏：缩小2倍 */
  .ref-side-toolbar {
    right: 3px !important;
    top: 3px !important;
    gap: 3px !important;
    padding: 3px !important;
  }
  .ref-side-toolbar button {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
  }

  /* 3D画布区域：留出底部空间 */
  #viewer-container,
  .viewer-canvas-wrap {
    padding-bottom: 60px !important;
  }
}

/* 小屏幕手机（iPhone SE等）进一步优化 */
@media (max-width: 480px) {
  .ref-top-toolbar button {
    padding: 2px 5px !important;
    font-size: 10px !important;
    height: 22px !important;
  }
  .cabinet-strip button {
    padding: 3px 8px !important;
    font-size: 10px !important;
  }
  .ref-bottom-toolbar button {
    padding: 0 8px !important;
    font-size: 10px !important;
  }
  .ref-side-toolbar button {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
  }
}

body:not(.theme-premium):not(.theme-atelier) .workspace-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-title > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-title .eyebrow {
  color: var(--accent);
  font-size: var(--font-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-title h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-title p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  max-width: 560px;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 响应式 */
@media (max-width: 1024px) {
  body:not(.theme-premium):not(.theme-atelier) .workspace-header {
    flex-direction: column;
    padding: 24px;
  }
  body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip {
    grid-template-columns: 1fr;
  }
  body:not(.theme-premium):not(.theme-atelier) .workspace-title {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   3D查看器工具栏统一颜色 - 青色系
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar,
body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar,
body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar,
body:not(.theme-premium):not(.theme-atelier) .cabinet-strip {
  background: var(--panel-solid);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
}

body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar {
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: var(--shadow-md);
}

body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar {
  border-top: 1px solid var(--border-color);
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar {
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: var(--shadow-md);
}

body:not(.theme-premium):not(.theme-atelier) .cabinet-strip {
  background: var(--panel-solid);
  backdrop-filter: var(--blur-md);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-left: none;
  border-right: none;
  border-radius: 0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

/* 工具栏按钮统一颜色 */
body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button,
body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button,
body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: none;
  transition: all var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button:hover,
body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button:hover,
body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button.active,
body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* 柜体标签按钮统一颜色 */
body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

/* 3D查看器主容器 */
body:not(.theme-premium):not(.theme-atelier) .cad-viewer,
body:not(.theme-premium):not(.theme-atelier) .viewer-container,
body:not(.theme-premium):not(.theme-atelier) .viewer-stage {
  background: #f5f0e1;
}

/* 浮动菜单 */
body:not(.theme-premium):not(.theme-atelier) .floating-menu {
  background: var(--panel-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 140px;
  max-width: 160px;
}

body:not(.theme-premium):not(.theme-atelier) .floating-menu button {
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.theme-premium):not(.theme-atelier) .floating-menu button:hover {
  background: var(--panel-hover);
}

/* 底部弹出面板 */
body:not(.theme-premium):not(.theme-atelier) .ref-bottom-sheet {
  background: var(--panel-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .ref-bottom-sheet header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body:not(.theme-premium):not(.theme-atelier) .ref-bottom-sheet header button {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
}

/* 板件信息面板 */
body:not(.theme-premium):not(.theme-atelier) .board-info-panel,
body:not(.theme-premium):not(.theme-atelier) .board-lookup-panel,
body:not(.theme-premium):not(.theme-atelier) .detail-dialog {
  background: var(--panel-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}

/* 空状态卡片 */
body:not(.theme-premium):not(.theme-atelier) .empty-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  color: var(--text-primary);
}

body:not(.theme-premium):not(.theme-atelier) .empty-card h2 {
  color: var(--text-primary);
  font-size: 22px;
  margin-bottom: 12px;
}

body:not(.theme-premium):not(.theme-atelier) .empty-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* 项目信息标签 */
body:not(.theme-premium):not(.theme-atelier) .viewer-project-info,
body:not(.theme-premium):not(.theme-atelier) .project-info-tag {
  background: var(--panel-bg);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* 质量风险标签 */
body:not(.theme-premium):not(.theme-atelier) .viewer-quality-risk,
body:not(.theme-premium):not(.theme-atelier) .viewer-quality-pending,
body:not(.theme-premium):not(.theme-atelier) .viewer-quality-ok {
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

body:not(.theme-premium):not(.theme-atelier) .viewer-quality-ok {
  background: var(--success-soft);
  border-color: rgba(0, 230, 118, 0.3);
  color: var(--success);
}

body:not(.theme-premium):not(.theme-atelier) .viewer-quality-risk {
  background: var(--warning-soft);
  border-color: rgba(255, 171, 0, 0.3);
  color: var(--warning);
}

body:not(.theme-premium):not(.theme-atelier) .viewer-quality-pending {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

/* ============================================
   工作台右侧账号区域 - 对齐放大
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .workspace-main-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: stretch;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-rail > section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 账号到期卡片放大 */
body:not(.theme-premium):not(.theme-atelier) .account-expiry-card {
  padding: 28px 24px;
  gap: 16px;
  align-content: start;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card .card-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 4px;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card span {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card strong {
  display: inline-block;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  border: 1px solid var(--accent-border);
  margin-top: auto;
}

/* 修改密码卡片放大 */
body:not(.theme-premium):not(.theme-atelier) .password-change-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card summary {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card summary::before {
  content: "▸";
  font-size: 14px;
  color: var(--accent);
  transition: transform var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card[open] summary::before {
  transform: rotate(90deg);
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card summary:hover {
  color: var(--accent);
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form .field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form input {
  width: 100%;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form .ghost {
  align-self: flex-start;
  margin-top: 4px;
}

/* 上传卡片和右侧卡片等高对齐 */
body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel {
  min-height: 100%;
}

/* 统计卡片加大 */
body:not(.theme-premium):not(.theme-atelier) .stats-grid .stat-card,
body:not(.theme-premium):not(.theme-atelier) .sub-stats-grid .stat-card {
  padding: 24px;
  min-height: 110px;
}

body:not(.theme-premium):not(.theme-atelier) .stat-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body:not(.theme-premium):not(.theme-atelier) .stat-label {
  font-size: 14px;
  font-weight: 500;
  margin-top: 4px;
}

/* 账号信息条加大 */
body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip span {
  min-height: 90px;
  padding: 20px 24px;
  gap: 8px;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip strong {
  font-size: 20px;
  font-weight: 800;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip span {
  font-size: 13px;
}

/* 项目列表卡片加大 */
body:not(.theme-premium):not(.theme-atelier) .project-operations-card {
  padding: 28px;
}

body:not(.theme-premium):not(.theme-atelier) .project-operations-card .project-item {
  padding: 20px 0;
}

body:not(.theme-premium):not(.theme-atelier) .project-item strong {
  font-size: 17px;
  font-weight: 700;
}

body:not(.theme-premium):not(.theme-atelier) .project-item .muted {
  font-size: 13px;
  margin-top: 4px;
}

/* 上传区域加大 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone {
  min-height: 240px;
  padding: 40px;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone strong {
  font-size: 22px;
  font-weight: 800;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone p,
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone span {
  font-size: 15px;
}

/* 上传按钮加大 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .primary {
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 800;
  min-height: 52px;
  border-radius: var(--radius-md);
}

/* 上传标题加大 */
body:not(.theme-premium):not(.theme-atelier) .section-heading h2 {
  font-size: 30px;
  font-weight: 800;
}

body:not(.theme-premium):not(.theme-atelier) .section-heading .card-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* 项目名称输入框加大 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .field span {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout input[type="text"] {
  height: 48px;
  font-size: 15px;
  padding: 0 16px;
}

/* 项目搜索和排序加大 */
body:not(.theme-premium):not(.theme-atelier) .project-list-toolbar {
  margin-bottom: 20px;
}

body:not(.theme-premium):not(.theme-atelier) .project-search-input {
  height: 44px;
  font-size: 14px;
  padding: 0 16px;
}

body:not(.theme-premium):not(.theme-atelier) .sort-btn {
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 700;
}

/* 项目操作按钮加大 */
body:not(.theme-premium):not(.theme-atelier) .project-row-actions .ghost,
body:not(.theme-premium):not(.theme-atelier) .project-row-actions .link-button {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
}

/* ============================================
   右侧两个卡片 - 上下左右对齐平分
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .workspace-rail {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  height: 100%;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-rail > section {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 当前账号卡片 - 内容垂直分布 */
body:not(.theme-premium):not(.theme-atelier) .account-expiry-card {
  justify-content: space-between;
  padding: 28px 24px;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card > * {
  width: 100%;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card .card-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 8px;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 12px;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: auto;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-card strong {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
  border: 1px solid var(--accent-border);
  margin-top: 16px;
  text-align: center;
}

/* 修改密码卡片 - 内容垂直分布 */
body:not(.theme-premium):not(.theme-atelier) .password-change-card {
  justify-content: flex-start;
  padding: 28px 24px;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card summary {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  padding: 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color var(--transition-fast);
  margin-bottom: 16px;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card summary::before {
  content: "▸";
  font-size: 16px;
  color: var(--accent);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card[open] summary::before {
  transform: rotate(90deg);
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card summary:hover {
  color: var(--accent);
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form .field span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form input {
  width: 100%;
  height: 44px;
  font-size: 14px;
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form .login-error {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

body:not(.theme-premium):not(.theme-atelier) .password-change-form .ghost {
  align-self: flex-start;
  margin-top: auto;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  height: 44px;
}

/* 未展开时修改密码卡片显示提示文字 */
body:not(.theme-premium):not(.theme-atelier) .password-change-card:not([open])::after {
  content: "点击展开修改密码";
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-muted);
  font-size: 14px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 8px;
  transition: all var(--transition-fast);
}

body:not(.theme-premium):not(.theme-atelier) .password-change-card:not([open]):hover::after {
  border-color: var(--accent-border);
  color: var(--text-secondary);
  background: var(--accent-soft);
}

/* 确保主网格等高 */
body:not(.theme-premium):not(.theme-atelier) .workspace-main-grid {
  align-items: stretch;
}

body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel {
  height: 100%;
  min-height: 100%;
}

/* ============================================
   上传区域优化 - 居中 隐藏 放大
   ============================================ */

/* 1. 标题文字居中 */
body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading {
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading h2 {
  text-align: center;
  font-size: 32px;
  font-weight: 800;
}

body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading .card-kicker {
  text-align: center;
}

/* 2. 隐藏项目名称输入框 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout > .field:first-child {
  display: none !important;
}

/* 3. 上传区域居中放大 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex: 1;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone {
  width: 100%;
  max-width: 520px;
  min-height: 320px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-width: 3px;
  border-radius: var(--radius-lg);
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone strong {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone p,
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone span {
  font-size: 16px;
  text-align: center;
  max-width: 360px;
}

/* 上传按钮居中放大 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .primary {
  width: 100%;
  max-width: 320px;
  padding: 18px 40px;
  font-size: 18px;
  font-weight: 800;
  min-height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 上传卡片整体垂直居中 */
body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 32px;
}

body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading {
  flex-shrink: 0;
}

body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .upload-form-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ============================================
   上传区域放大填满 - 去掉宽度限制
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone {
  width: 100%;
  max-width: 100% !important;
  min-height: 380px;
  padding: 60px 48px;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone strong {
  font-size: 32px;
  font-weight: 800;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone p,
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone span {
  font-size: 18px;
  max-width: 100%;
}

/* 上传按钮放大填满 */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .primary {
  width: 100%;
  max-width: 100% !important;
  padding: 20px 48px;
  font-size: 20px;
  font-weight: 800;
  min-height: 64px;
}

/* 标题放大 */
body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading h2 {
  font-size: 38px;
  font-weight: 800;
}

body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading .card-kicker {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

/* ============================================
   项目列表左右对齐
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .project-item,
body:not(.theme-premium):not(.theme-atelier) .project-table-row {
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) auto auto !important;
  gap: 24px !important;
  align-items: center !important;
  padding: 20px 24px !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-link {
  min-width: 0;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-link-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-width: 0;
}

body:not(.theme-premium):not(.theme-atelier) .project-link strong {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #000 !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-link .muted {
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #94a3b8 !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-cover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-banner {
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.25)) !important;
  border-color: #f59e0b !important;
  color: #fcd34d !important;
}

body:not(.theme-premium):not(.theme-atelier) .account-expiry-banner.urgent,
body:not(.theme-premium):not(.theme-atelier) .account-expiry-banner.expired {
  background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.25)) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-row-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 140px;
  text-align: center !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-row-meta .project-upload-time {
  font-size: 13px !important;
  color: var(--text-secondary) !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-row-meta .status-pill {
  font-size: 13px !important;
  padding: 4px 14px !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-row-meta > span:last-child {
  font-size: 12px !important;
  color: var(--text-muted) !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-row-actions {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  min-width: 200px;
}

/* 项目列表表头左右对齐 */
body:not(.theme-premium):not(.theme-atelier) .project-table-head,
body:not(.theme-premium):not(.theme-atelier) .project-list-head {
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) 140px 200px !important;
  gap: 24px !important;
  padding: 14px 24px !important;
  align-items: center !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-table-head span,
body:not(.theme-premium):not(.theme-atelier) .project-list-head span {
  text-align: left !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-table-head span:nth-child(2),
body:not(.theme-premium):not(.theme-atelier) .project-list-head span:nth-child(2) {
  text-align: center !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-table-head span:nth-child(3),
body:not(.theme-premium):not(.theme-atelier) .project-list-head span:nth-child(3) {
  text-align: right !important;
}

/* ============================================
   上传区域强制往右拉长填满
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .upload-form-layout {
  width: 100% !important;
  max-width: 100% !important;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  box-sizing: border-box !important;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone > div {
  width: 100% !important;
  text-align: center !important;
}

body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .primary {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ============================================
   项目列表操作按钮往右拉长到边距
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .project-item,
body:not(.theme-premium):not(.theme-atelier) .project-table-row {
  grid-template-columns: 32px minmax(0, 1fr) auto minmax(0, 1fr) !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-row-actions {
  justify-content: flex-end !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* 表头同步对齐 */
body:not(.theme-premium):not(.theme-atelier) .project-table-head,
body:not(.theme-premium):not(.theme-atelier) .project-list-head {
  grid-template-columns: 32px minmax(0, 1fr) auto minmax(0, 1fr) !important;
}

/* 批量操作栏 */
body:not(.theme-premium):not(.theme-atelier) .project-bulk-bar {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-select-all {
  color: #cbd5e1 !important;
}

body:not(.theme-premium):not(.theme-atelier) #projectSelectionStatus {
  color: #94a3b8 !important;
}

body:not(.theme-premium):not(.theme-atelier) .project-table-head span:nth-child(3),
body:not(.theme-premium):not(.theme-atelier) .project-list-head span:nth-child(3) {
  text-align: right !important;
  width: 100% !important;
}

/* ============================================
   上传标题强制居中
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading {
  text-align: center !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading .card-kicker {
  text-align: center !important;
  width: 100% !important;
}

body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading h2 {
  text-align: center !important;
  width: 100% !important;
  margin: 0 auto !important;
}

/* ============================================
   顶部头部区域左右内边距调整
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .workspace-header {
  padding-left: 60px !important;
  padding-right: 60px !important;
  padding-top: 28px !important;
  padding-bottom: 28px !important;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-title {
  margin-left: 0 !important;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-actions {
  margin-right: 0 !important;
}

/* ============================================
   顶部头部背景颜色统一为青色
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .workspace-header {
  background: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  backdrop-filter: none !important;
}

/* ============================================
   顶部头部宽度和下面内容对齐
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .workspace-header {
  max-width: min(1320px, calc(100% - 40px)) !important;
  margin: 20px auto 0 !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-md) !important;
}

/* ============================================
   顶部右侧按钮字体放大垂直居中
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .workspace-actions {
  align-items: center !important;
  display: flex !important;
  gap: 12px !important;
}

body:not(.theme-premium):not(.theme-atelier) .workspace-actions button,
body:not(.theme-premium):not(.theme-atelier) .workspace-actions .ghost {
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 10px 20px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ============================================
   隐藏3D查看器顶部提示框
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .viewer-badge {
  display: none !important;
}

/* ============================================
   管理后台顶部头部背景统一为青色 + 对齐
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .ops-topbar,
body:not(.theme-premium):not(.theme-atelier) .admin-topbar {
  background: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

body:not(.theme-premium):not(.theme-atelier) .ops-topbar .eyebrow,
body:not(.theme-premium):not(.theme-atelier) .admin-topbar .eyebrow {
  color: var(--accent) !important;
}

body:not(.theme-premium):not(.theme-atelier) .ops-topbar h2,
body:not(.theme-premium):not(.theme-atelier) .admin-topbar h2 {
  color: var(--text-primary) !important;
}

body:not(.theme-premium):not(.theme-atelier) .ops-topbar .auth-actions button,
body:not(.theme-premium):not(.theme-atelier) .admin-topbar .auth-actions button {
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  background: var(--bg-tertiary) !important;
}

/* ============================================
   板件信息面板往左移动对齐工具栏
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .board-info-panel {
  left: 0 !important;
  margin-left: 0 !important;
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
  transform: scale(1) !important;
  transform-origin: left top !important;
}

/* ============================================
   新建子账号表单背景统一为青色
   ============================================ */
body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  padding: 20px 24px !important;
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer summary {
  color: var(--text-primary) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  padding: 8px 0 !important;
  list-style: none !important;
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-drawer summary::-webkit-details-marker {
  display: none !important;
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-form {
  background: transparent !important;
  padding-top: 16px !important;
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-form .field span {
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-form input {
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 14px !important;
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-form input:focus {
  border-color: var(--accent) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15) !important;
}

body:not(.theme-premium):not(.theme-atelier) .admin-create-form .primary {
  background: var(--accent) !important;
  color: #000 !important;
  font-weight: 800 !important;
  padding: 12px 32px !important;
  border-radius: var(--radius-md) !important;
}


/* ---------- 3D查看器页面米黄色主题覆盖 ---------- */
body:not(.theme-premium):not(.theme-atelier).viewer-page {
  --bg-primary: #F5F0E1;
  --bg-secondary: #E8DCC8;
  --bg-tertiary: #F5F0E1;
  --bg-elevated: #E8DCC8;
  --panel-solid: #F5F0E1;
  --panel-bg: rgba(245, 240, 225, 0.88);
  --panel-hover: rgba(232, 220, 200, 0.92);
  --panel-active: rgba(232, 220, 200, 0.95);
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #888888;
  --text-inverse: #ffffff;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.2);
  --border-strong: rgba(0, 0, 0, 0.15);
}

body:not(.theme-premium):not(.theme-atelier).viewer-page .ref-side-toolbar button {
  background: #ffffff !important;
  color: #1677ff !important;
}



/* =========================================================
   移动端深度适配 - 手机窄屏工作台/素材库/项目列表/上传区
   修复1：工作台/素材库主网格被高特异性两列规则挤压成 0 宽
   修复2：项目列表行被 4 列 !important 规则压成 0px 列，封面/操作按钮重叠
   修复3：上传区 dropzone 留白与字号过大，提示文字被挤成竖排
   ========================================================= */

/* 一、工作台 & 素材库主网格强制单列 */
@media (max-width: 900px) {
  .workspace-main-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .workspace-rail {
    height: auto !important;
  }
  body .material-library-shell .material-library-grid.workspace-main-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .material-library-shell .material-library-list-card {
    grid-column: 1 !important;
  }
}

/* 二、项目列表 - 手机卡片式两列布局（复选框 | 项目内容） */
@media (max-width: 720px) {
  body:not(.theme-premium):not(.theme-atelier) .project-table-head,
  body:not(.theme-premium):not(.theme-atelier) .project-table-row,
  .project-table-head,
  .project-table-row {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 6px 10px !important;
    padding: 12px !important;
    align-items: start !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-check-cell,
  .project-check-cell {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: center !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-link,
  .project-link {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-row-meta,
  .project-row-meta {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px 12px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-row-actions,
  .project-row-actions {
    grid-column: 2 !important;
    grid-row: 3 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    margin-top: 2px !important;
  }
  .project-table-head span:nth-child(3),
  .project-table-head span:nth-child(4) {
    display: none !important;
  }
}

/* 三、上传区 dropzone - 手机端压缩留白与字号，避免提示文字竖排 */
@media (max-width: 720px) {
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone,
  .upload-form-layout .dropzone {
    padding: 24px 16px !important;
    min-height: 200px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone strong,
  .upload-form-layout .dropzone strong {
    font-size: 20px !important;
    line-height: 1.5 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone p,
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone span,
  .upload-form-layout .dropzone p,
  .upload-form-layout .dropzone span {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }
}

/* 四、工作台状态条 + 统计卡片 - 手机紧凑 2x2 布局（减少垂直占用） */
@media (max-width: 720px) {
  .workspace-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip span,
  .workspace-status-strip span {
    min-height: 56px !important;
    padding: 10px 12px !important;
    gap: 2px !important;
    font-size: 11px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip strong,
  .workspace-status-strip strong {
    font-size: 15px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .stats-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .stat-card,
  .stat-card {
    padding: 14px !important;
    min-height: 0 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .stat-value,
  .stat-value {
    font-size: 24px !important;
  }
}

/* 五、3D查看器 - 手机端极致紧凑（模型为主，UI最小化） */
@media (max-width: 768px) {
  /* 顶部工具条按钮 */
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button,
  .ref-top-toolbar button {
    font-size: 10px !important;
    height: 22px !important;
    padding: 0 6px !important;
    min-width: auto !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar,
  .ref-top-toolbar {
    top: 6px !important;
    left: 6px !important;
    gap: 4px !important;
    padding: 2px !important;
  }
  /* 右侧工具栏按钮 */
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar,
  .ref-side-toolbar {
    right: 4px !important;
    top: 4px !important;
    gap: 4px !important;
    padding: 2px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button,
  .ref-side-toolbar button {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
  }
  /* 底部工具条 */
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar,
  .ref-bottom-toolbar {
    height: 28px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button,
  .ref-bottom-toolbar button {
    font-size: 10px !important;
    height: 24px !important;
    padding: 0 8px !important;
  }

  /* 安装动画按钮：移动端显示在右侧工具栏"隐"按钮下方，隐藏底部对应按钮 */
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button.side-install,
  .ref-side-toolbar button.side-install {
    display: grid !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    font-size: 10px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button[data-bottom="install"],
  .ref-bottom-toolbar button[data-bottom="install"] {
    display: none !important;
  }
  /* 底部柜子名称标签 */
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip,
  .cabinet-strip {
    bottom: 28px !important;
    padding: 3px 6px !important;
    gap: 4px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button,
  .cabinet-strip button {
    font-size: 10px !important;
    padding: 3px 8px !important;
    min-height: 20px !important;
  }
  /* 弹出信息卡（板件详情小标签） */
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel,
  .board-info-panel {
    width: 168px !important;
    max-width: 45vw !important;
    padding: 6px !important;
    font-size: 9px !important;
    top: 38px !important;
    left: 4px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel.collapsed,
  .board-info-panel.collapsed {
    width: 160px !important;
    padding: 5px 6px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-header strong,
  .board-info-header strong {
    font-size: 10px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-header button,
  .board-info-header button {
    font-size: 9px !important;
    min-height: 18px !important;
    padding: 0 4px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel dl,
  .board-info-panel dl {
    font-size: 9px !important;
    gap: 2px 4px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .door-hinge-simple,
  .door-hinge-simple {
    font-size: 10px !important;
    margin-top: 6px !important;
    padding-top: 6px !important;
  }
  /* 3D画布区域 - 减少底部留白，模型最大化 */
  #viewer-container,
  .viewer-canvas-wrap {
    padding-bottom: 52px !important;
  }
}
/* =========================================================
   移动端终极适配 - 全页面字体缩小 + 紧凑布局 + 2列统计
   适配所有手机尺寸，最高优先级覆盖
   ========================================================= */
@media (max-width: 768px) {
  /* 全局基础字体缩小 */
  body:not(.theme-premium):not(.theme-atelier) {
    --font-xs: 10px !important;
    --font-sm: 11px !important;
    --font-base: 12px !important;
    --font-md: 13px !important;
    --font-lg: 14px !important;
    --font-xl: 16px !important;
    --font-2xl: 18px !important;
    --font-3xl: 22px !important;
    --space-xs: 4px !important;
    --space-sm: 6px !important;
    --space-md: 10px !important;
    --space-lg: 14px !important;
    --space-xl: 18px !important;
    --space-2xl: 24px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  /* 主内容区内边距缩小 */
  body:not(.theme-premium):not(.theme-atelier) .console-content,
  body:not(.theme-premium):not(.theme-atelier) .admin-content,
  body:not(.theme-premium):not(.theme-atelier) .admin-main,
  body:not(.theme-premium):not(.theme-atelier) .ops-content,
  body:not(.theme-premium):not(.theme-atelier) main {
    padding: 10px !important;
  }

  /* 工作台头部缩小 */
  body:not(.theme-premium):not(.theme-atelier) .workspace-header {
    padding: 12px 16px !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .workspace-title h1 {
    font-size: 16px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .workspace-actions button,
  body:not(.theme-premium):not(.theme-atelier) .workspace-actions .ghost {
    font-size: 11px !important;
    padding: 6px 12px !important;
    min-height: 32px !important;
  }

  /* 统计卡片强制2列 + 紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .stats-grid,
  body:not(.theme-premium):not(.theme-atelier) .sub-stats-grid,
  body:not(.theme-premium):not(.theme-atelier) .metrics-grid,
  body:not(.theme-premium):not(.theme-atelier) .ops-metrics,
  body:not(.theme-premium):not(.theme-atelier) .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .stat-card {
    padding: 10px !important;
    min-height: 0 !important;
    border-radius: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .stat-value {
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .stat-label {
    font-size: 10px !important;
    margin-top: 2px !important;
  }

  /* 工作台状态条2列紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip span {
    min-height: 48px !important;
    padding: 8px 10px !important;
    gap: 2px !important;
    font-size: 10px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .workspace-status-strip strong {
    font-size: 13px !important;
  }

  /* 上传区域 - 标题缩小 */
  body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel .section-heading .card-kicker {
    font-size: 10px !important;
    letter-spacing: 0.08em !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .upload-primary-panel {
    gap: 16px !important;
    padding: 16px !important;
  }

  /* 上传dropzone紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone {
    min-height: 140px !important;
    padding: 20px 16px !important;
    gap: 8px !important;
    border-width: 2px !important;
    border-radius: 10px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone strong {
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone p,
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone span {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  /* 上传按钮紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .primary {
    padding: 10px 24px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    min-height: 40px !important;
    border-radius: 8px !important;
  }

  /* 项目列表卡片紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .project-operations-card {
    padding: 12px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-item,
  body:not(.theme-premium):not(.theme-atelier) .project-table-row {
    padding: 12px !important;
    gap: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-link strong {
    font-size: 14px !important;
    font-weight: 600 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-link .muted {
    font-size: 11px !important;
    line-height: 1.4 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-row-meta .project-upload-time {
    font-size: 11px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-row-meta .status-pill {
    font-size: 11px !important;
    padding: 3px 10px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-row-meta > span:last-child {
    font-size: 10px !important;
  }

  /* 项目操作按钮紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .project-row-actions .ghost,
  body:not(.theme-premium):not(.theme-atelier) .project-row-actions .link-button {
    height: 30px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
  }

  /* 搜索和排序按钮紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .project-list-toolbar {
    margin-bottom: 12px !important;
    gap: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-search-input {
    height: 36px !important;
    font-size: 12px !important;
    padding: 0 12px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .sort-btn {
    height: 36px !important;
    padding: 0 14px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
  }

  /* 账号到期卡片紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .account-expiry-card {
    padding: 16px !important;
    gap: 10px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .account-expiry-card .card-kicker {
    font-size: 10px !important;
    margin-bottom: 4px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .account-expiry-card h2 {
    font-size: 20px !important;
    margin-bottom: 6px !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .account-expiry-card p {
    font-size: 12px !important;
    line-height: 1.6 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .account-expiry-card strong {
    padding: 8px 12px !important;
    font-size: 12px !important;
    margin-top: 8px !important;
  }

  /* 修改密码卡片紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .password-change-card {
    padding: 16px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .password-change-card summary {
    font-size: 14px !important;
    margin-bottom: 10px !important;
    gap: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .password-change-card summary::before {
    font-size: 12px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .password-change-form {
    gap: 10px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .password-change-form .field span {
    font-size: 11px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .password-change-form input {
    height: 36px !important;
    font-size: 12px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .password-change-form .ghost {
    padding: 8px 16px !important;
    font-size: 12px !important;
    height: 36px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .password-change-card:not([open])::after {
    font-size: 12px !important;
    margin-top: 6px !important;
  }

  /* 通用按钮缩小 */
  body:not(.theme-premium):not(.theme-atelier) button,
  body:not(.theme-premium):not(.theme-atelier) .ghost,
  body:not(.theme-premium):not(.theme-atelier) .link-button {
    padding: 6px 12px !important;
    font-size: 12px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    gap: 4px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .primary,
  body:not(.theme-premium):not(.theme-atelier) button.primary {
    padding: 8px 20px !important;
    font-size: 12px !important;
    min-height: 36px !important;
  }

  /* 输入框缩小 */
  body:not(.theme-premium):not(.theme-atelier) input,
  body:not(.theme-premium):not(.theme-atelier) textarea,
  body:not(.theme-premium):not(.theme-atelier) select {
    padding: 6px 10px !important;
    font-size: 12px !important;
    min-height: 34px !important;
    border-radius: 6px !important;
  }

  /* 标题层级缩小 */
  body:not(.theme-premium):not(.theme-atelier) h1 { font-size: 18px !important; }
  body:not(.theme-premium):not(.theme-atelier) h2 { font-size: 16px !important; }
  body:not(.theme-premium):not(.theme-atelier) h3 { font-size: 14px !important; }

  /* 登录页适配 */
  body:not(.theme-premium):not(.theme-atelier) .login-card {
    padding: 24px 20px !important;
    gap: 16px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .login-card h1,
  body:not(.theme-premium):not(.theme-atelier) .login-card h2 {
    font-size: 20px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .login-error {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* 空状态卡片紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .empty-card {
    padding: 24px 16px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .empty-card h2 {
    font-size: 16px !important;
    margin-bottom: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .empty-card p {
    font-size: 12px !important;
  }

  /* 管理后台侧边栏紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .admin-sidebar,
  body:not(.theme-premium):not(.theme-atelier) .ops-sidebar {
    padding: 12px !important;
    gap: 12px !important;
    max-height: none !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .admin-nav a,
  body:not(.theme-premium):not(.theme-atelier) .admin-nav button {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* 管理后台区块紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .ops-section,
  body:not(.theme-premium):not(.theme-atelier) .admin-section {
    padding: 14px !important;
    margin-bottom: 12px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ops-section-head {
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
    gap: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ops-section-head strong {
    font-size: 15px !important;
  }

  /* 批量操作栏紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .project-bulk-bar {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .project-bulk-bar button {
    font-size: 11px !important;
    padding: 6px 12px !important;
    min-height: 30px !important;
  }

  /* 页脚备案号缩小 */
  body:not(.theme-premium):not(.theme-atelier) .site-beian a {
    font-size: 9px !important;
  }
}

/* 超小屏手机 (<= 380px) 进一步压缩 */
@media (max-width: 380px) {
  body:not(.theme-premium):not(.theme-atelier) {
    font-size: 11px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .stat-value {
    font-size: 18px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .upload-form-layout .dropzone strong {
    font-size: 14px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .account-expiry-card h2 {
    font-size: 17px !important;
  }
}

/* 隐藏右下角虚拟摇杆 */
.camera-joystick,
[data-camera-joystick] {
  display: none !important;
}

/* =========================================================
   3D查看器移动端终极优化 - 隐藏右侧栏 + 主题色 + 小字体 + 重排
   ========================================================= */
@media (max-width: 768px) {
  /* 1. 隐藏右侧黑色工具栏 */
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar,
  .ref-side-toolbar {
    display: none !important;
  }

  /* 2. 顶部工具栏 - 黑色改主题色 */
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar,
  .ref-top-toolbar {
    background: rgba(245, 240, 225, 0.92) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    top: 8px !important;
    left: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button,
  .ref-top-toolbar button {
    background: transparent !important;
    color: #333 !important;
    border: 1px solid transparent !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    height: 28px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button.active,
  .ref-top-toolbar button.active {
    background: #1677ff !important;
    color: #fff !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button:hover,
  .ref-top-toolbar button:hover {
    background: rgba(22, 119, 255, 0.12) !important;
    color: #1677ff !important;
  }

  /* 3. 板件信息面板 - 主题色 + 小字体 */
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel,
  .board-info-panel {
    background: rgba(245, 240, 225, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    color: #333 !important;
    width: 200px !important;
    max-width: 42vw !important;
    padding: 10px !important;
    font-size: 10px !important;
    top: 44px !important;
    left: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel .board-info-header,
  .board-info-panel .board-info-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel .board-info-header strong,
  .board-info-panel .board-info-header strong {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel .board-info-header button,
  .board-info-panel .board-info-header button {
    font-size: 10px !important;
    min-height: 22px !important;
    padding: 2px 8px !important;
    background: rgba(22, 119, 255, 0.1) !important;
    color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.2) !important;
    border-radius: 4px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel dl,
  .board-info-panel dl {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    gap: 3px 8px !important;
    margin: 0 !important;
    font-size: 10px !important;
    line-height: 1.5 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel dt,
  .board-info-panel dt {
    color: #888 !important;
    font-weight: 500 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel dd,
  .board-info-panel dd {
    color: #333 !important;
    margin: 0 !important;
    font-weight: 600 !important;
    word-break: break-all !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .door-hinge-simple,
  .door-hinge-simple {
    font-size: 10px !important;
    margin-top: 6px !important;
    padding-top: 6px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    color: #666 !important;
  }

  /* 4. 柜体列表条 - 主题色 + 小字体 */
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip,
  .cabinet-strip {
    background: rgba(245, 240, 225, 0.92) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 4px 8px !important;
    gap: 4px !important;
    bottom: 36px !important;
    left: 8px !important;
    right: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button,
  .cabinet-strip button {
    background: transparent !important;
    color: #555 !important;
    border: 1px solid transparent !important;
    font-size: 11px !important;
    padding: 5px 10px !important;
    min-height: 28px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button.active,
  .cabinet-strip button.active {
    background: #1677ff !important;
    color: #fff !important;
    border-color: #1677ff !important;
  }

  /* 5. 底部工具栏 - 主题色 + 小字体 + 紧凑 */
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar,
  .ref-bottom-toolbar {
    background: rgba(245, 240, 225, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    height: 36px !important;
    gap: 2px !important;
    padding: 0 4px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    justify-content: flex-start !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button,
  .ref-bottom-toolbar button {
    background: transparent !important;
    color: #555 !important;
    border: 1px solid transparent !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button.active,
  .ref-bottom-toolbar button.active {
    background: rgba(22, 119, 255, 0.12) !important;
    color: #1677ff !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button:hover,
  .ref-bottom-toolbar button:hover {
    background: rgba(0, 0, 0, 0.05) !important;
  }

  /* 6. 顶部项目信息标签 - 主题色 */
  body:not(.theme-premium):not(.theme-atelier) .viewer-badge,
  .viewer-badge {
    display: none !important;
  }

  /* 7. 3D画布区域 - 调整底部留白 */
  #viewer-container,
  .viewer-canvas-wrap,
  .cad-viewer {
    padding-bottom: 76px !important;
  }

  /* 8. 渲染计时器 - 主题色 */
  body:not(.theme-premium):not(.theme-atelier) .render-timer,
  .render-timer {
    background: rgba(245, 240, 225, 0.92) !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
    gap: 6px !important;
  }

  /* 9. 质量风险标签 - 主题色适配 */
  body:not(.theme-premium):not(.theme-atelier) .viewer-quality-ok,
  .viewer-quality-ok {
    background: rgba(0, 230, 118, 0.15) !important;
    border-color: rgba(0, 230, 118, 0.3) !important;
    color: #00a152 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .viewer-quality-risk,
  .viewer-quality-risk {
    background: rgba(255, 171, 0, 0.15) !important;
    border-color: rgba(255, 171, 0, 0.3) !important;
    color: #b8860b !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .viewer-quality-pending,
  .viewer-quality-pending {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #666 !important;
  }
}

/* 超小屏进一步压缩 */
@media (max-width: 380px) {
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button,
  .ref-top-toolbar button {
    font-size: 10px !important;
    padding: 3px 6px !important;
    height: 26px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel,
  .board-info-panel {
    width: 170px !important;
    max-width: 48vw !important;
    padding: 8px !important;
    font-size: 9px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel dl,
  .board-info-panel dl {
    font-size: 9px !important;
    gap: 2px 6px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button,
  .cabinet-strip button {
    font-size: 10px !important;
    padding: 4px 8px !important;
    min-height: 26px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button,
  .ref-bottom-toolbar button {
    font-size: 9px !important;
    padding: 3px 6px !important;
    height: 28px !important;
    min-height: 28px !important;
  }
}

/* =========================================================
   修正：保留右侧按钮，只去黑色背景 + 字体改黑色
   ========================================================= */
@media (max-width: 768px) {
  /* 右侧工具栏 - 保留按钮，去黑色背景 */
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar,
  .ref-side-toolbar {
    display: flex !important;
    background: rgba(245, 240, 225, 0.92) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    padding: 6px 4px !important;
    gap: 4px !important;
    right: 8px !important;
    top: 8px !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button,
  .ref-side-toolbar button {
    background: transparent !important;
    color: #000 !important;
    border: 1px solid transparent !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button.active,
  .ref-side-toolbar button.active {
    background: #1677ff !important;
    color: #fff !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button:hover,
  .ref-side-toolbar button:hover {
    background: rgba(22, 119, 255, 0.12) !important;
    color: #1677ff !important;
  }

  /* 顶部工具栏 - 字体改黑色 */
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button,
  .ref-top-toolbar button {
    color: #000 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button.active,
  .ref-top-toolbar button.active {
    color: #fff !important;
  }

  /* 板件信息面板 - 字体改黑色 */
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel,
  .board-info-panel {
    color: #000 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel .board-info-header strong,
  .board-info-panel .board-info-header strong {
    color: #000 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel dd,
  .board-info-panel dd {
    color: #000 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel dt,
  .board-info-panel dt {
    color: #555 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .door-hinge-simple,
  .door-hinge-simple {
    color: #333 !important;
  }

  /* 柜体列表条 - 字体改黑色 */
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button,
  .cabinet-strip button {
    color: #000 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button.active,
  .cabinet-strip button.active {
    color: #fff !important;
  }

  /* 底部工具栏 - 字体改黑色 */
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button,
  .ref-bottom-toolbar button {
    color: #000 !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button.active,
  .ref-bottom-toolbar button.active {
    color: #1677ff !important;
  }

  /* 渲染计时器 - 字体改黑色 */
  body:not(.theme-premium):not(.theme-atelier) .render-timer,
  .render-timer {
    color: #000 !important;
  }
}

/* 超小屏右侧按钮进一步缩小 */
@media (max-width: 380px) {
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button,
  .ref-side-toolbar button {
    width: 28px !important;
    height: 28px !important;
    font-size: 10px !important;
  }
}

/* =========================================================
   终极修正：所有工具栏按钮去黑背景 + 字改黑色
   使用最高特异性强制覆盖
   ========================================================= */
@media (max-width: 768px) {
  /* 右侧工具栏容器 - 去黑背景 */
  html body.cad-viewer-page .ref-side-toolbar,
  html body .cad-viewer .ref-side-toolbar,
  html body .ref-side-toolbar {
    background: rgba(245, 240, 225, 0.9) !important;
    background-color: rgba(245, 240, 225, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    padding: 6px 4px !important;
    gap: 4px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
  }

  /* 右侧所有按钮 - 去黑背景 + 黑字 */
  html body.cad-viewer-page .ref-side-toolbar button,
  html body .cad-viewer .ref-side-toolbar button,
  html body .ref-side-toolbar button {
    background: transparent !important;
    background-color: transparent !important;
    color: #000000 !important;
    border: 1px solid transparent !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #000000 !important;
  }

  /* 右侧按钮选中态 - 蓝底白字 */
  html body.cad-viewer-page .ref-side-toolbar button.active,
  html body .cad-viewer .ref-side-toolbar button.active,
  html body .ref-side-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* 右侧按钮hover */
  html body.cad-viewer-page .ref-side-toolbar button:hover,
  html body .cad-viewer .ref-side-toolbar button:hover,
  html body .ref-side-toolbar button:hover {
    background: rgba(22, 119, 255, 0.15) !important;
    background-color: rgba(22, 119, 255, 0.15) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
  }

  /* 顶部工具栏容器 - 去黑背景 */
  html body.cad-viewer-page .ref-top-toolbar,
  html body .cad-viewer .ref-top-toolbar,
  html body .ref-top-toolbar {
    background: rgba(245, 240, 225, 0.9) !important;
    background-color: rgba(245, 240, 225, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
  }

  /* 顶部所有按钮 - 去黑背景 + 黑字 */
  html body.cad-viewer-page .ref-top-toolbar button,
  html body .cad-viewer .ref-top-toolbar button,
  html body .ref-top-toolbar button {
    background: transparent !important;
    background-color: transparent !important;
    color: #000000 !important;
    border: 1px solid transparent !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #000000 !important;
  }

  /* 顶部按钮选中态 */
  html body.cad-viewer-page .ref-top-toolbar button.active,
  html body .cad-viewer .ref-top-toolbar button.active,
  html body .ref-top-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* 底部工具栏容器 - 去黑背景 */
  html body.cad-viewer-page .ref-bottom-toolbar,
  html body .cad-viewer .ref-bottom-toolbar,
  html body .ref-bottom-toolbar {
    background: rgba(245, 240, 225, 0.95) !important;
    background-color: rgba(245, 240, 225, 0.95) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08) !important;
  }

  /* 底部所有按钮 - 去黑背景 + 黑字 */
  html body.cad-viewer-page .ref-bottom-toolbar button,
  html body .cad-viewer .ref-bottom-toolbar button,
  html body .ref-bottom-toolbar button {
    background: transparent !important;
    background-color: transparent !important;
    color: #000000 !important;
    border: 1px solid transparent !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #000000 !important;
  }

  /* 底部按钮选中态 */
  html body.cad-viewer-page .ref-bottom-toolbar button.active,
  html body .cad-viewer .ref-bottom-toolbar button.active,
  html body .ref-bottom-toolbar button.active {
    background: rgba(22, 119, 255, 0.15) !important;
    background-color: rgba(22, 119, 255, 0.15) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
  }

  /* 柜体列表条 - 去黑背景 */
  html body.cad-viewer-page .cabinet-strip,
  html body .cad-viewer .cabinet-strip,
  html body .cabinet-strip {
    background: rgba(245, 240, 225, 0.92) !important;
    background-color: rgba(245, 240, 225, 0.92) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
  }

  /* 柜体列表按钮 - 黑字 */
  html body.cad-viewer-page .cabinet-strip button,
  html body .cad-viewer .cabinet-strip button,
  html body .cabinet-strip button {
    background: transparent !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    font-weight: 600 !important;
  }
  html body.cad-viewer-page .cabinet-strip button.active,
  html body .cad-viewer .cabinet-strip button.active,
  html body .cabinet-strip button.active {
    background: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* 板件信息面板 - 去黑背景 + 黑字 */
  html body.cad-viewer-page .board-info-panel,
  html body .cad-viewer .board-info-panel,
  html body .board-info-panel {
    background: rgba(245, 240, 225, 0.95) !important;
    background-color: rgba(245, 240, 225, 0.95) !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
  html body.cad-viewer-page .board-info-panel *,
  html body .cad-viewer .board-info-panel *,
  html body .board-info-panel * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
  }
  html body.cad-viewer-page .board-info-panel dt,
  html body .cad-viewer .board-info-panel dt,
  html body .board-info-panel dt {
    color: #555555 !important;
    -webkit-text-fill-color: #555555 !important;
  }
}

/* =========================================================
   最终版：右侧工具栏 - 白色圆形按钮 + 蓝色图标
   覆盖按钮背景、SVG图标fill、文字颜色
   ========================================================= */
@media (max-width: 768px) {
  /* 右侧工具栏容器 - 透明背景 */
  .cad-viewer .ref-side-toolbar,
  .ref-side-toolbar {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 8px !important;
    right: 10px !important;
    top: 10px !important;
  }

  /* 右侧每个按钮 - 白色圆形 */
  .cad-viewer .ref-side-toolbar button,
  .ref-side-toolbar button {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1677ff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-text-fill-color: #1677ff !important;
  }

  /* 按钮内SVG图标 - 蓝色 */
  .cad-viewer .ref-side-toolbar button .tool-icon svg,
  .ref-side-toolbar button .tool-icon svg,
  .cad-viewer .ref-side-toolbar button svg,
  .ref-side-toolbar button svg {
    fill: #1677ff !important;
    stroke: #1677ff !important;
    width: 18px !important;
    height: 18px !important;
  }
  .cad-viewer .ref-side-toolbar button .tool-icon svg path,
  .ref-side-toolbar button .tool-icon svg path,
  .cad-viewer .ref-side-toolbar button svg path,
  .ref-side-toolbar button svg path {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }

  /* 按钮内文字标签 - 蓝色 */
  .cad-viewer .ref-side-toolbar button .tool-label,
  .ref-side-toolbar button .tool-label {
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  /* 按钮选中态 - 蓝底白图标 */
  .cad-viewer .ref-side-toolbar button.active,
  .ref-side-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }
  .cad-viewer .ref-side-toolbar button.active .tool-icon svg,
  .ref-side-toolbar button.active .tool-icon svg,
  .cad-viewer .ref-side-toolbar button.active svg,
  .ref-side-toolbar button.active svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }
  .cad-viewer .ref-side-toolbar button.active .tool-icon svg path,
  .ref-side-toolbar button.active .tool-icon svg path,
  .cad-viewer .ref-side-toolbar button.active svg path,
  .ref-side-toolbar button.active svg path {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }
  .cad-viewer .ref-side-toolbar button.active .tool-label,
  .ref-side-toolbar button.active .tool-label {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* 顶部工具栏 - 同样白色按钮 + 蓝色字 */
  .cad-viewer .ref-top-toolbar,
  .ref-top-toolbar {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 6px !important;
  }
  .cad-viewer .ref-top-toolbar button,
  .ref-top-toolbar button {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 18px !important;
    padding: 6px 14px !important;
    height: 32px !important;
    min-height: 32px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }
  .cad-viewer .ref-top-toolbar button.active,
  .ref-top-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }

  /* 底部工具栏 - 白色背景 + 蓝色字 */
  .cad-viewer .ref-bottom-toolbar,
  .ref-bottom-toolbar {
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08) !important;
  }
  .cad-viewer .ref-bottom-toolbar button,
  .ref-bottom-toolbar button {
    background: transparent !important;
    background-color: transparent !important;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
  }
  .cad-viewer .ref-bottom-toolbar button.active,
  .ref-bottom-toolbar button.active {
    background: rgba(22, 119, 255, 0.12) !important;
    background-color: rgba(22, 119, 255, 0.12) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
  }

  /* 柜体列表条 - 白色背景 */
  .cad-viewer .cabinet-strip,
  .cabinet-strip {
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
  }
  .cad-viewer .cabinet-strip button,
  .cabinet-strip button {
    background: transparent !important;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
  }
  .cad-viewer .cabinet-strip button.active,
  .cabinet-strip button.active {
    background: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* 板件信息面板 - 白色背景 */
  .cad-viewer .board-info-panel,
  .board-info-panel {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    color: #333333 !important;
  }
}

/* =========================================================
   最强覆盖：所有工具栏按钮去黑背景 + 蓝色字体
   通配符 + !important 强制覆盖内联样式
   ========================================================= */
@media (max-width: 768px) {
  /* 顶部工具栏 - 强制去黑背景 + 蓝字 */
  html body .cad-viewer .ref-top-toolbar,
  html body .ref-top-toolbar,
  .ref-top-toolbar {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  html body .cad-viewer .ref-top-toolbar button,
  html body .ref-top-toolbar button,
  .ref-top-toolbar button,
  .ref-top-toolbar > button {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.2) !important;
    border-radius: 16px !important;
    padding: 5px 12px !important;
    height: 30px !important;
    min-height: 30px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08) !important;
    text-shadow: none !important;
  }
  html body .cad-viewer .ref-top-toolbar button.active,
  html body .ref-top-toolbar button.active,
  .ref-top-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }

  /* 右侧工具栏按钮 - 强制去黑背景 + 蓝图标 */
  html body .cad-viewer .ref-side-toolbar button,
  html body .ref-side-toolbar button,
  .ref-side-toolbar button,
  .ref-side-toolbar > button {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.15) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  }
  html body .cad-viewer .ref-side-toolbar button svg,
  html body .ref-side-toolbar button svg,
  .ref-side-toolbar button svg {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  html body .cad-viewer .ref-side-toolbar button svg path,
  html body .ref-side-toolbar button svg path,
  .ref-side-toolbar button svg path {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  html body .cad-viewer .ref-side-toolbar button.active,
  html body .ref-side-toolbar button.active,
  .ref-side-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }
  html body .cad-viewer .ref-side-toolbar button.active svg,
  html body .ref-side-toolbar button.active svg,
  .ref-side-toolbar button.active svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }
  html body .cad-viewer .ref-side-toolbar button.active svg path,
  html body .ref-side-toolbar button.active svg path,
  .ref-side-toolbar button.active svg path {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }

  /* 底部工具栏 - 强制去黑背景 + 蓝字 */
  html body .cad-viewer .ref-bottom-toolbar,
  html body .ref-bottom-toolbar,
  .ref-bottom-toolbar {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  html body .cad-viewer .ref-bottom-toolbar button,
  html body .ref-bottom-toolbar button,
  .ref-bottom-toolbar button,
  .ref-bottom-toolbar > button {
    background: transparent !important;
    background-color: transparent !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  html body .cad-viewer .ref-bottom-toolbar button.active,
  html body .ref-bottom-toolbar button.active,
  .ref-bottom-toolbar button.active {
    background: rgba(22, 119, 255, 0.12) !important;
    background-color: rgba(22, 119, 255, 0.12) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
  }

  /* 柜体列表条 - 强制去黑背景 */
  html body .cad-viewer .cabinet-strip,
  html body .cabinet-strip,
  .cabinet-strip {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  html body .cad-viewer .cabinet-strip button,
  html body .cabinet-strip button,
  .cabinet-strip button {
    background: transparent !important;
    background-color: transparent !important;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    border-radius: 6px !important;
  }
  html body .cad-viewer .cabinet-strip button.active,
  html body .cabinet-strip button.active,
  .cabinet-strip button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* 板件信息面板 - 强制去黑背景 */
  html body .cad-viewer .board-info-panel,
  html body .board-info-panel,
  .board-info-panel {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #333333 !important;
  }

  /* 通配符：cad-viewer内所有button去黑背景 */
  html body .cad-viewer nav button,
  html body .cad-viewer .ref-side-toolbar *,
  html body .cad-viewer .ref-top-toolbar *,
  html body .cad-viewer .ref-bottom-toolbar * {
    text-shadow: none !important;
  }
}

/* =========================================================
   theme-premium 深色主题移动端覆盖 - 全部去黑背景 + 蓝字
   选择器必须带 body.theme-premium 才能覆盖主题CSS
   ========================================================= */
@media (max-width: 768px) {
  /* 顶部工具栏容器 - 去深色背景 */
  body.theme-premium .ref-top-toolbar {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    gap: 6px !important;
  }

  /* 顶部按钮 - 白色背景 + 蓝色字（像底部选中态） */
  body.theme-premium .ref-top-toolbar button {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.2) !important;
    border-radius: 16px !important;
    padding: 5px 12px !important;
    height: 30px !important;
    min-height: 30px !important;
    min-width: auto !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08) !important;
    text-shadow: none !important;
  }

  /* 顶部按钮选中态 - 蓝底白字 */
  body.theme-premium .ref-top-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }

  /* 右侧工具栏容器 - 去深色背景 */
  body.theme-premium .ref-side-toolbar {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    gap: 8px !important;
  }

  /* 右侧按钮 - 白色圆形 + 蓝色图标 */
  body.theme-premium .ref-side-toolbar button {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.15) !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    text-shadow: none !important;
  }
  body.theme-premium .ref-side-toolbar button svg,
  body.theme-premium .ref-side-toolbar button .tool-icon svg {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  body.theme-premium .ref-side-toolbar button svg path,
  body.theme-premium .ref-side-toolbar button .tool-icon svg path {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  body.theme-premium .ref-side-toolbar button .tool-label {
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
  }

  /* 右侧按钮选中态 - 蓝底白图标 */
  body.theme-premium .ref-side-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }
  body.theme-premium .ref-side-toolbar button.active svg,
  body.theme-premium .ref-side-toolbar button.active .tool-icon svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }
  body.theme-premium .ref-side-toolbar button.active svg path,
  body.theme-premium .ref-side-toolbar button.active .tool-icon svg path {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }

  /* 底部工具栏 - 去深色背景 */
  body.theme-premium .ref-bottom-toolbar {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: none !important;
  }
  body.theme-premium .ref-bottom-toolbar button {
    background: transparent !important;
    background-color: transparent !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  body.theme-premium .ref-bottom-toolbar button.active {
    background: rgba(22, 119, 255, 0.12) !important;
    background-color: rgba(22, 119, 255, 0.12) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border-color: transparent !important;
  }

  /* 柜体列表条 - 去深色背景 */
  body.theme-premium .cabinet-strip {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: none !important;
  }
  body.theme-premium .cabinet-strip button {
    background: transparent !important;
    background-color: transparent !important;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    border: 1px solid transparent !important;
    text-shadow: none !important;
  }
  body.theme-premium .cabinet-strip button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }

  /* 板件信息面板 - 去深色背景 */
  body.theme-premium .board-info-panel,
  body.theme-premium .board-lookup-panel,
  body.theme-premium .detail-dialog {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    color: #333333 !important;
    backdrop-filter: none !important;
  }
  body.theme-premium .board-info-panel * {
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    text-shadow: none !important;
  }

  /* 3D查看器整体背景 - 去深色 */
  body.theme-premium .cad-viewer {
    background: #f5f0e1 !important;
    background-color: #f5f0e1 !important;
  }

  /* 通配：主题下所有工具栏按钮去文字阴影 */
  body.theme-premium .ref-top-toolbar *,
  body.theme-premium .ref-side-toolbar *,
  body.theme-premium .ref-bottom-toolbar * {
    text-shadow: none !important;
  }
}

/* 右侧按钮改成米黄背景 */
@media (max-width: 768px) {
  body.theme-premium .ref-side-toolbar button {
    background: #f5f0e1 !important;
    background-color: #f5f0e1 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
  }
  body.theme-premium .ref-side-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
  }
}

/* =========================================================
   移动端：板件信息面板旋转90度 - 移到底部横向显示
   ========================================================= */
@media (max-width: 768px) {
  html body .board-info-panel,
  html body.theme-premium .board-info-panel {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: 100px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 120px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    padding: 8px 10px !important;
    font-size: 10px !important;
    z-index: 20 !important;
    backdrop-filter: none !important;
  }

  /* 面板头部 - 横向排列 */
  html body .board-info-panel .board-info-header,
  html body.theme-premium .board-info-panel .board-info-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  html body .board-info-panel .board-info-header strong,
  html body.theme-premium .board-info-panel .board-info-header strong {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
  }
  html body .board-info-panel .board-info-header button,
  html body.theme-premium .board-info-panel .board-info-header button {
    background: rgba(22, 119, 255, 0.1) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.2) !important;
    font-size: 10px !important;
    min-height: 22px !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
  }

  /* 信息列表 - 横向多列排列 */
  html body .board-info-panel dl,
  html body.theme-premium .board-info-panel dl {
    display: grid !important;
    grid-template-columns: repeat(2, auto 1fr) !important;
    gap: 3px 10px !important;
    margin: 0 !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
  }
  html body .board-info-panel dt,
  html body.theme-premium .board-info-panel dt {
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
  }
  html body .board-info-panel dd,
  html body.theme-premium .board-info-panel dd {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    margin: 0 !important;
    font-weight: 600 !important;
    word-break: break-all !important;
    min-width: 0 !important;
  }

  /* 铰链信息 */
  html body .door-hinge-simple,
  html body.theme-premium .door-hinge-simple {
    margin-top: 6px !important;
    padding-top: 6px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    font-size: 10px !important;
    color: #e53935 !important;
    -webkit-text-fill-color: #e53935 !important;
  }

  /* 收起状态 */
  html body .board-info-panel.collapsed,
  html body.theme-premium .board-info-panel.collapsed {
    max-height: 40px !important;
    overflow: hidden !important;
    width: auto !important;
  }
}

/* 超小屏进一步压缩 */
@media (max-width: 380px) {
  html body .board-info-panel dl,
  html body.theme-premium .board-info-panel dl {
    grid-template-columns: auto 1fr !important;
    gap: 2px 8px !important;
    font-size: 9px !important;
  }
}

/* =========================================================
   手机3D界面终极重布局 - 最大化模型显示区域
   所有工具栏极致紧凑，适配所有手机尺寸
   ========================================================= */
@media (max-width: 768px) {
  /* 3D查看器容器 - 全屏无padding */
  html body .cad-viewer,
  html body.theme-premium .cad-viewer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  /* 3D画布区域 - 全屏 */
  html body .cad-viewer canvas,
  html body .cad-viewer .viewer-canvas,
  html body .cad-viewer #viewer-container,
  html body.theme-premium .cad-viewer canvas,
  html body.theme-premium .cad-viewer .viewer-canvas,
  html body.theme-premium .cad-viewer #viewer-container {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
  }

  /* 顶部工具栏 - 极致紧凑 */
  html body .ref-top-toolbar,
  html body.theme-premium .ref-top-toolbar {
    position: absolute !important;
    top: 6px !important;
    left: 6px !important;
    right: auto !important;
    gap: 4px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    z-index: 15 !important;
    max-width: calc(100vw - 60px) !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    flex-wrap: wrap !important;
  }
  html body .ref-top-toolbar::-webkit-scrollbar,
  html body.theme-premium .ref-top-toolbar::-webkit-scrollbar {
    display: none !important;
  }
  html body .ref-top-toolbar button,
  html body.theme-premium .ref-top-toolbar button {
    flex-shrink: 0 !important;
    min-width: auto !important;
    width: auto !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    background-color: rgba(255, 255, 255, 0.92) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.15) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
    text-shadow: none !important;
    backdrop-filter: blur(4px) !important;
  }
  html body .ref-top-toolbar button.active,
  html body.theme-premium .ref-top-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }

  /* 右侧工具栏 - 极致紧凑 */
  html body .ref-side-toolbar,
  html body.theme-premium .ref-side-toolbar {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    gap: 5px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    z-index: 15 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  html body .ref-side-toolbar button,
  html body.theme-premium .ref-side-toolbar button {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
    background: rgba(245, 240, 225, 0.92) !important;
    background-color: rgba(245, 240, 225, 0.92) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12) !important;
    text-shadow: none !important;
    backdrop-filter: blur(4px) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  html body .ref-side-toolbar button svg,
  html body.theme-premium .ref-side-toolbar button svg,
  html body .ref-side-toolbar button .tool-icon svg,
  html body.theme-premium .ref-side-toolbar button .tool-icon svg {
    width: 16px !important;
    height: 16px !important;
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  html body .ref-side-toolbar button svg path,
  html body.theme-premium .ref-side-toolbar button svg path {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  html body .ref-side-toolbar button.active,
  html body.theme-premium .ref-side-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }
  html body .ref-side-toolbar button.active svg,
  html body.theme-premium .ref-side-toolbar button.active svg,
  html body .ref-side-toolbar button.active svg path,
  html body.theme-premium .ref-side-toolbar button.active svg path {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }

  /* 底部柜体列表 - 极致紧凑 */
  html body .cabinet-strip,
  html body.theme-premium .cabinet-strip {
    position: absolute !important;
    left: 6px !important;
    right: 6px !important;
    bottom: 34px !important;
    gap: 4px !important;
    padding: 3px 6px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    background-color: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px 8px 0 0 !important;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 14 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  html body .cabinet-strip::-webkit-scrollbar,
  html body.theme-premium .cabinet-strip::-webkit-scrollbar {
    display: none !important;
  }
  html body .cabinet-strip button,
  html body.theme-premium .cabinet-strip button {
    flex-shrink: 0 !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    border: 1px solid transparent !important;
    text-shadow: none !important;
  }
  html body .cabinet-strip button.active,
  html body.theme-premium .cabinet-strip button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }

  /* 底部工具栏 - 极致紧凑 */
  html body .ref-bottom-toolbar,
  html body.theme-premium .ref-bottom-toolbar {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    gap: 2px !important;
    padding: 0 4px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 14 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    justify-content: flex-start !important;
  }
  html body .ref-bottom-toolbar::-webkit-scrollbar,
  html body.theme-premium .ref-bottom-toolbar::-webkit-scrollbar {
    display: none !important;
  }
  html body .ref-bottom-toolbar button,
  html body.theme-premium .ref-bottom-toolbar button {
    flex-shrink: 0 !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  html body .ref-bottom-toolbar button.active,
  html body.theme-premium .ref-bottom-toolbar button.active {
    background: rgba(22, 119, 255, 0.12) !important;
    background-color: rgba(22, 119, 255, 0.12) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
  }

  /* 板件信息面板 - 底部紧凑，默认收起 */
  html body .board-info-panel,
  html body.theme-premium .board-info-panel {
    position: absolute !important;
    left: 6px !important;
    right: 6px !important;
    top: auto !important;
    bottom: 62px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 28px !important;
    overflow: hidden !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.94) !important;
    background-color: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
    z-index: 13 !important;
    backdrop-filter: blur(4px) !important;
    transition: max-height 0.3s ease !important;
  }
  html body .board-info-panel:hover,
  html body.theme-premium .board-info-panel:hover,
  html body .board-info-panel.expanded,
  html body.theme-premium .board-info-panel.expanded {
    max-height: 140px !important;
    overflow-y: auto !important;
  }
  html body .board-info-panel .board-info-header,
  html body.theme-premium .board-info-panel .board-info-header {
    margin-bottom: 4px !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  }
  html body .board-info-panel .board-info-header strong,
  html body.theme-premium .board-info-panel .board-info-header strong {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
  }
  html body .board-info-panel dl,
  html body.theme-premium .board-info-panel dl {
    grid-template-columns: repeat(2, auto 1fr) !important;
    gap: 2px 8px !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  html body .board-info-panel dt,
  html body.theme-premium .board-info-panel dt {
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
  }
  html body .board-info-panel dd,
  html body.theme-premium .board-info-panel dd {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    font-weight: 600 !important;
  }

  /* 隐藏不需要的元素 */
  html body .viewer-badge,
  html body.theme-premium .viewer-badge,
  html body .render-timer,
  html body.theme-premium .render-timer {
    display: none !important;
  }

  /* 顶部返回按钮/标题 - 紧凑 */
  html body .viewer-header,
  html body.theme-premium .viewer-header,
  html body .cad-viewer-header,
  html body.theme-premium .cad-viewer-header {
    display: none !important;
  }
}

/* 超小屏手机 (<=360px) 进一步压缩 */
@media (max-width: 360px) {
  html body .ref-top-toolbar button,
  html body.theme-premium .ref-top-toolbar button {
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
  }
  html body .ref-side-toolbar button,
  html body.theme-premium .ref-side-toolbar button {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
  }
  html body .ref-bottom-toolbar,
  html body.theme-premium .ref-bottom-toolbar {
    height: 32px !important;
    min-height: 32px !important;
  }
  html body .ref-bottom-toolbar button,
  html body.theme-premium .ref-bottom-toolbar button {
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
  }
  html body .cabinet-strip,
  html body.theme-premium .cabinet-strip {
    bottom: 32px !important;
  }
  html body .board-info-panel,
  html body.theme-premium .board-info-panel {
    bottom: 58px !important;
  }
}

/* 板件信息面板 - 拉长显示全部内容 */
@media (max-width: 768px) {
  html body .board-info-panel,
  html body.theme-premium .board-info-panel {
    position: absolute !important;
    left: 6px !important;
    right: 6px !important;
    top: 40px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: calc(100vw - 50px) !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    overflow-y: visible !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    padding: 10px 12px !important;
    font-size: 11px !important;
    z-index: 20 !important;
    backdrop-filter: blur(6px) !important;
    transition: none !important;
  }

  /* 面板头部 - 完整显示 */
  html body .board-info-panel .board-info-header,
  html body.theme-premium .board-info-panel .board-info-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  html body .board-info-panel .board-info-header strong,
  html body.theme-premium .board-info-panel .board-info-header strong {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-all !important;
    min-width: 0 !important;
  }
  html body .board-info-panel .board-info-header button,
  html body.theme-premium .board-info-panel .board-info-header button {
    background: rgba(22, 119, 255, 0.1) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.2) !important;
    font-size: 11px !important;
    min-height: 24px !important;
    height: 24px !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  /* 信息列表 - 完整显示，不截断 */
  html body .board-info-panel dl,
  html body.theme-premium .board-info-panel dl {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    gap: 6px 12px !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
  }
  html body .board-info-panel dt,
  html body.theme-premium .board-info-panel dt {
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    align-self: start !important;
    padding-top: 1px !important;
  }
  html body .board-info-panel dd,
  html body.theme-premium .board-info-panel dd {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    margin: 0 !important;
    font-weight: 600 !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    min-width: 0 !important;
    line-height: 1.5 !important;
  }

  /* 铰链信息 - 完整显示 */
  html body .door-hinge-simple,
  html body.theme-premium .door-hinge-simple {
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    font-size: 12px !important;
    color: #e53935 !important;
    -webkit-text-fill-color: #e53935 !important;
    line-height: 1.5 !important;
    word-break: break-all !important;
  }

  /* 收起状态 - 也显示标题 */
  html body .board-info-panel.collapsed,
  html body.theme-premium .board-info-panel.collapsed {
    max-height: none !important;
    overflow: visible !important;
    width: auto !important;
  }

  /* 摘要信息 - 完整显示 */
  html body .board-info-summary,
  html body.theme-premium .board-info-summary {
    font-size: 11px !important;
    line-height: 1.5 !important;
    color: #555 !important;
    -webkit-text-fill-color: #555 !important;
    word-break: break-word !important;
    white-space: normal !important;
    margin-bottom: 6px !important;
  }
}

/* 超小屏适配 */
@media (max-width: 360px) {
  html body .board-info-panel,
  html body.theme-premium .board-info-panel {
    padding: 8px 10px !important;
    font-size: 10px !important;
    max-width: calc(100vw - 44px) !important;
  }
  html body .board-info-panel dl,
  html body.theme-premium .board-info-panel dl {
    font-size: 11px !important;
    gap: 4px 8px !important;
  }
  html body .board-info-panel .board-info-header strong,
  html body.theme-premium .board-info-panel .board-info-header strong {
    font-size: 13px !important;
  }
}

/* =========================================================
   板件信息面板 - 旋转90度变横排，放在顶部，不占左侧空间
   ========================================================= */
@media (max-width: 768px) {
  html body .board-info-panel,
  html body.theme-premium .board-info-panel {
    position: absolute !important;
    left: 6px !important;
    right: 6px !important;
    top: 38px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
    z-index: 20 !important;
    backdrop-filter: blur(6px) !important;
  }

  /* 面板头部 - 横排，标题+按钮在一行 */
  html body .board-info-panel .board-info-header,
  html body.theme-premium .board-info-panel .board-info-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  }
  html body .board-info-panel .board-info-header strong,
  html body.theme-premium .board-info-panel .board-info-header strong {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  html body .board-info-panel .board-info-header button,
  html body.theme-premium .board-info-panel .board-info-header button {
    background: rgba(22, 119, 255, 0.1) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.2) !important;
    font-size: 10px !important;
    min-height: 22px !important;
    height: 22px !important;
    padding: 0 8px !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
  }

  /* 信息列表 - 横排，2列网格，紧凑显示 */
  html body .board-info-panel dl,
  html body.theme-premium .board-info-panel dl {
    display: grid !important;
    grid-template-columns: repeat(2, auto 1fr) !important;
    gap: 3px 10px !important;
    margin: 0 !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
  }
  html body .board-info-panel dt,
  html body.theme-premium .board-info-panel dt {
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    align-self: start !important;
    padding-top: 1px !important;
  }
  html body .board-info-panel dd,
  html body.theme-premium .board-info-panel dd {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    margin: 0 !important;
    font-weight: 600 !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    min-width: 0 !important;
    line-height: 1.4 !important;
  }

  /* 铰链信息 - 横排紧凑 */
  html body .door-hinge-simple,
  html body.theme-premium .door-hinge-simple {
    margin-top: 4px !important;
    padding-top: 4px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    font-size: 10px !important;
    color: #e53935 !important;
    -webkit-text-fill-color: #e53935 !important;
    line-height: 1.4 !important;
    word-break: break-all !important;
  }

  /* 收起状态 - 只显示标题栏 */
  html body .board-info-panel.collapsed,
  html body.theme-premium .board-info-panel.collapsed {
    max-height: 32px !important;
    overflow: hidden !important;
    padding: 4px 8px !important;
  }
  html body .board-info-panel.collapsed .board-info-header,
  html body.theme-premium .board-info-panel.collapsed .board-info-header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
  }
  html body .board-info-panel.collapsed dl,
  html body.theme-premium .board-info-panel.collapsed dl,
  html body .board-info-panel.collapsed .door-hinge-simple,
  html body.theme-premium .board-info-panel.collapsed .door-hinge-simple {
    display: none !important;
  }

  /* 摘要信息 - 紧凑 */
  html body .board-info-summary,
  html body.theme-premium .board-info-summary {
    font-size: 10px !important;
    line-height: 1.4 !important;
    color: #555 !important;
    -webkit-text-fill-color: #555 !important;
    word-break: break-word !important;
    white-space: normal !important;
    margin-bottom: 4px !important;
  }
}

/* 超小屏适配 - 单列横排 */
@media (max-width: 360px) {
  html body .board-info-panel dl,
  html body.theme-premium .board-info-panel dl {
    grid-template-columns: auto 1fr !important;
    gap: 2px 8px !important;
    font-size: 9px !important;
  }
  html body .board-info-panel,
  html body.theme-premium .board-info-panel {
    padding: 5px 6px !important;
    font-size: 9px !important;
  }
  html body .board-info-panel .board-info-header strong,
  html body.theme-premium .board-info-panel .board-info-header strong {
    font-size: 11px !important;
  }
}

/* =========================================================
   浅色主题下3D查看器 - 确保无黑色背景
   ========================================================= */
@media (max-width: 768px) {
  /* 3D查看器背景 - 浅色 */
  body:not(.theme-premium):not(.theme-atelier) .cad-viewer {
    background: #f5f0e1 !important;
    background-color: #f5f0e1 !important;
  }

  /* 顶部工具栏 - 浅色 */
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button {
    background: rgba(255, 255, 255, 0.92) !important;
    background-color: rgba(255, 255, 255, 0.92) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(22, 119, 255, 0.15) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
    text-shadow: none !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-top-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* 右侧工具栏 - 浅色米黄圆形 */
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button {
    background: rgba(245, 240, 225, 0.95) !important;
    background-color: rgba(245, 240, 225, 0.95) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
    text-shadow: none !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button svg,
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button svg path {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button.active {
    background: #1677ff !important;
    background-color: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button.active svg,
  body:not(.theme-premium):not(.theme-atelier) .ref-side-toolbar button.active svg path {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }

  /* 底部工具栏 - 浅色 */
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar {
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.06) !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button {
    background: transparent !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    text-shadow: none !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .ref-bottom-toolbar button.active {
    background: rgba(22, 119, 255, 0.12) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
  }

  /* 柜体列表 - 浅色 */
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip {
    background: rgba(255, 255, 255, 0.92) !important;
    background-color: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button {
    background: transparent !important;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    text-shadow: none !important;
  }
  body:not(.theme-premium):not(.theme-atelier) .cabinet-strip button.active {
    background: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* 板件信息面板 - 浅色 */
  body:not(.theme-premium):not(.theme-atelier) .board-info-panel {
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #333333 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  }

  /* 隐藏主题切换按钮 */
  .theme-toggle-btn {
    display: none !important;
  }
}

/* 全局隐藏主题切换按钮 */
.theme-toggle-btn {
  display: none !important;
}

/* ============================================
   手机端顶部工具栏强制横向滚动 - 确保所有按钮完整显示
   ============================================ */
@media (max-width: 900px) {
  .ref-top-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-width: calc(100vw - 50px) !important;
    width: auto !important;
    padding: 4px 6px !important;
    gap: 6px !important;
    left: 8px !important;
    top: 8px !important;
  }
  .ref-top-toolbar::-webkit-scrollbar {
    display: none !important;
  }
  .ref-top-toolbar button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-width: auto !important;
    width: auto !important;
    height: 30px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    line-height: 30px !important;
    border-radius: 6px !important;
  }
}

@media (max-width: 480px) {
  .ref-top-toolbar {
    max-width: calc(100vw - 45px) !important;
    width: calc(100vw - 45px) !important;
    gap: 5px !important;
  }
  .ref-top-toolbar button {
    height: 28px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    line-height: 28px !important;
  }
}

/* ============================================
   
/* ============================================
   
/* 安装动画（"装"）按钮：所有端显示在右侧"隐"按钮下方；底部对应按钮全局隐藏 */
.ref-side-toolbar button.side-install {
  display: flex !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  align-items: center;
  justify-content: center;
}
.ref-bottom-toolbar button[data-bottom="install"] {
  display: none !important;
}


/* 进度条文字：缩小一半 + 红色 */
.upload-progress-percent {
  font-size: 40px !important;
  font-weight: 700 !important;
  color: #ff0000 !important;
}

