/* ============================================
   CAD 3D 扫码看图系统 - 高级灰主题
   设计风格：极简 · 高级灰 · 柔和 · 不刺眼
   ============================================ */

/* ---------- 主题变量 ---------- */
body.theme-premium {
  /* 背景层级 - 青色系 */
  --bg-primary: #0a1628;
  --bg-secondary: #0f1f35;
  --bg-tertiary: #152a45;
  --bg-elevated: #1c3556;

  /* 面板 - 毛玻璃 */
  --panel-bg: rgba(15, 31, 53, 0.88);
  --panel-solid: #0f1f35;
  --panel-hover: rgba(28, 53, 86, 0.92);
  --panel-active: rgba(36, 71, 110, 0.95);

  /* 文字 - 白色为主 */
  --text-primary: #f0f6fc;
  --text-secondary: #8ba4c0;
  --text-muted: #5a7391;
  --text-inverse: #0a1628;

  /* 强调色 - 青色 */
  --accent: #00d4ff;
  --accent-hover: #4de2ff;
  --accent-soft: rgba(0, 212, 255, 0.12);
  --accent-border: rgba(0, 212, 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, 212, 255, 0.1);
  --border-hover: rgba(0, 212, 255, 0.25);
  --border-strong: rgba(0, 212, 255, 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: var(--bg-primary);
  color: var(--text-primary);
}

/* 全局背景 - 青色渐变 */
body.theme-premium::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.theme-premium > * {
  position: relative;
  z-index: 1;
}

/* ---------- 滚动条 ---------- */
body.theme-premium ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
body.theme-premium ::-webkit-scrollbar-track {
  background: transparent;
}
body.theme-premium ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
body.theme-premium ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ---------- 通用面板 ---------- */
body.theme-premium .workspace-shell,
body.theme-premium .console-shell,
body.theme-premium .upload-command-card,
body.theme-premium .project-operations-card,
body.theme-premium .material-library-shell,
body.theme-premium .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.theme-premium .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.theme-premium .brand-mark {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* ---------- 按钮 ---------- */
body.theme-premium button,
body.theme-premium .ghost,
body.theme-premium .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.theme-premium button:hover,
body.theme-premium .ghost:hover,
body.theme-premium .link-button:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

body.theme-premium button:active,
body.theme-premium .ghost:active {
  background: var(--panel-active);
  transform: scale(0.98);
}

body.theme-premium .primary,
body.theme-premium button.primary {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

body.theme-premium .primary:hover,
body.theme-premium button.primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

body.theme-premium .primary:active {
  transform: translateY(0);
}

body.theme-premium .danger,
body.theme-premium button.danger {
  background: var(--danger-soft);
  border-color: rgba(255, 69, 58, 0.25);
  color: var(--danger);
}

body.theme-premium .danger:hover {
  background: rgba(255, 69, 58, 0.2);
  border-color: var(--danger);
  color: var(--danger);
}

/* ---------- 输入框 ---------- */
body.theme-premium input,
body.theme-premium textarea,
body.theme-premium select {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

body.theme-premium input::placeholder,
body.theme-premium textarea::placeholder {
  color: var(--text-muted);
}

body.theme-premium input:focus,
body.theme-premium textarea:focus,
body.theme-premium select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-secondary);
}

/* ---------- 项目列表 ---------- */
body.theme-premium .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.theme-premium .project-item,
body.theme-premium .project-table-row {
  border-top: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

body.theme-premium .project-item:hover,
body.theme-premium .project-table-row:hover {
  background: var(--panel-hover);
}

/* ---------- 状态标签 ---------- */
body.theme-premium .status-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

body.theme-premium .status-pill.status-success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(48, 209, 88, 0.25);
}

body.theme-premium .status-pill.status-warning {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid rgba(255, 159, 10, 0.25);
}

body.theme-premium .status-pill.status-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(255, 69, 58, 0.25);
}

body.theme-premium .status-pill.status-neutral {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ---------- 卡片 ---------- */
body.theme-premium .card,
body.theme-premium .stat-card,
body.theme-premium .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.theme-premium .card:hover,
body.theme-premium .stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

/* ---------- 标签/徽章 ---------- */
body.theme-premium .badge,
body.theme-premium .tag,
body.theme-premium .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.theme-premium hr,
body.theme-premium .divider {
  border: none;
  border-top: 1px solid var(--border-color);
}

/* ---------- 表格 ---------- */
body.theme-premium table {
  border-collapse: collapse;
}

body.theme-premium 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.theme-premium td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

body.theme-premium tr:hover td {
  background: var(--panel-hover);
}

/* ---------- 模态框/弹窗 ---------- */
body.theme-premium .modal,
body.theme-premium .dialog,
body.theme-premium .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.theme-premium .modal-header,
body.theme-premium .dialog-header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
}

body.theme-premium .modal-footer,
body.theme-premium .dialog-footer {
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
}

/* ---------- 下拉菜单 ---------- */
body.theme-premium .dropdown,
body.theme-premium .menu,
body.theme-premium .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.theme-premium .dropdown-item,
body.theme-premium .menu-item {
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  transition: background var(--transition-fast);
}

body.theme-premium .dropdown-item:hover,
body.theme-premium .menu-item:hover {
  background: var(--panel-hover);
}

/* ---------- 进度条 ---------- */
body.theme-premium .progress,
body.theme-premium .progress-bar {
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
}

body.theme-premium .progress-fill,
body.theme-premium .progress-bar-fill {
  background: var(--accent);
  border-radius: 4px;
  height: 100%;
  transition: width var(--transition-slow);
}

/* ---------- 提示/通知 ---------- */
body.theme-premium .toast,
body.theme-premium .notification,
body.theme-premium .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.theme-premium .alert-success {
  border-left: 3px solid var(--success);
  background: var(--success-soft);
}

body.theme-premium .alert-warning {
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
}

body.theme-premium .alert-danger {
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
}

/* ---------- 标签页 ---------- */
body.theme-premium .tabs,
body.theme-premium .tab-list {
  border-bottom: 1px solid var(--border-color);
}

body.theme-premium .tab,
body.theme-premium .tab-item {
  padding: 10px 16px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
}

body.theme-premium .tab:hover,
body.theme-premium .tab-item:hover {
  color: var(--text-primary);
}

body.theme-premium .tab.active,
body.theme-premium .tab-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- 开关 ---------- */
body.theme-premium .switch,
body.theme-premium .toggle {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  transition: all var(--transition-base);
}

body.theme-premium .switch.active,
body.theme-premium .toggle.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- 复选框/单选 ---------- */
body.theme-premium input[type="checkbox"],
body.theme-premium input[type="radio"] {
  accent-color: var(--accent);
}

/* ---------- 上传区域 ---------- */
body.theme-premium .dropzone {
  background: var(--bg-primary);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

body.theme-premium .dropzone:hover,
body.theme-premium .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* ---------- 3D查看器区域 ---------- */
body.theme-premium .cad-viewer,
body.theme-premium .viewer-container,
body.theme-premium .viewer-stage {
  background: var(--bg-primary);
}

/* 查看器顶部工具栏 */
body.theme-premium .viewer-toolbar,
body.theme-premium .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.theme-premium .viewer-controls,
body.theme-premium .viewer-bottom-bar,
body.theme-premium .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.theme-premium .cabinet-tab,
body.theme-premium .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.theme-premium .cabinet-tab:hover,
body.theme-premium .cabinet-button:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

body.theme-premium .cabinet-tab.active,
body.theme-premium .cabinet-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* 右侧工具栏 */
body.theme-premium .viewer-side-panel,
body.theme-premium .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.theme-premium .viewer-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

body.theme-premium .viewer-tool-btn:hover {
  background: var(--panel-hover);
  color: var(--text-primary);
}

body.theme-premium .viewer-tool-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* 信息面板 */
body.theme-premium .info-panel,
body.theme-premium .board-info-panel,
body.theme-premium .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.theme-premium .login-shell {
  background: var(--bg-primary);
}

body.theme-premium .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.theme-premium .login-card {
  background: var(--panel-solid);
  color: var(--text-primary);
  border-left: 1px solid var(--border-color);
}

body.theme-premium .login-hero h1 {
  color: var(--text-primary);
}

body.theme-premium .login-hero p {
  color: var(--text-secondary);
}

body.theme-premium .eyebrow {
  color: var(--accent);
}

body.theme-premium .login-stats span {
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

body.theme-premium .login-stats strong {
  color: var(--text-primary);
}

/* ---------- 管理后台 ---------- */
body.theme-premium .admin-shell {
  background: var(--bg-primary);
}

body.theme-premium .admin-sidebar {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-right: 1px solid var(--border-color);
}

body.theme-premium .admin-sidebar .muted {
  color: var(--text-muted);
}

body.theme-premium .admin-nav a,
body.theme-premium .admin-nav button {
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

body.theme-premium .admin-nav a:hover,
body.theme-premium .admin-nav button:hover {
  background: var(--panel-hover);
  color: var(--text-primary);
}

body.theme-premium .admin-nav a.active,
body.theme-premium .admin-nav button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

body.theme-premium .admin-content {
  background: var(--bg-primary);
}

/* ---------- 控制台/工作台 ---------- */
body.theme-premium .console-panel {
  background: var(--panel-solid);
}

body.theme-premium .auth-bar {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

body.theme-premium .auth-user {
  color: var(--text-primary);
}

/* ---------- 统计卡片 ---------- */
body.theme-premium .stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

body.theme-premium .stat-card .stat-value {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
}

body.theme-premium .stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ---------- 项目卡片 ---------- */
body.theme-premium .project-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

body.theme-premium .project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

body.theme-premium .project-card-title {
  color: var(--text-primary);
  font-weight: 600;
}

body.theme-premium .project-card-meta {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ---------- 空状态 ---------- */
body.theme-premium .empty-state,
body.theme-premium .no-data {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 20px;
}

/* ---------- 加载中 ---------- */
body.theme-premium .loading,
body.theme-premium .spinner {
  color: var(--accent);
}

/* ---------- 链接 ---------- */
body.theme-premium a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

body.theme-premium a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ---------- 标题层级 ---------- */
body.theme-premium h1,
body.theme-premium h2,
body.theme-premium h3,
body.theme-premium h4,
body.theme-premium h5,
body.theme-premium h6 {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- 段落/文本 ---------- */
body.theme-premium p,
body.theme-premium span,
body.theme-premium div {
  color: inherit;
}

body.theme-premium .text-muted,
body.theme-premium .muted {
  color: var(--text-muted) !important;
}

body.theme-premium .text-secondary {
  color: var(--text-secondary) !important;
}

body.theme-premium .text-primary {
  color: var(--text-primary) !important;
}

/* ---------- 代码块 ---------- */
body.theme-premium code,
body.theme-premium pre {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: "Consolas", "Monaco", monospace;
}

/* ---------- 引用块 ---------- */
body.theme-premium 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.theme-premium ul,
body.theme-premium ol {
  color: var(--text-primary);
}

body.theme-premium li::marker {
  color: var(--text-secondary);
}

/* ---------- 表单标签 ---------- */
body.theme-premium label,
body.theme-premium .form-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
}

/* ---------- 禁用状态 ---------- */
body.theme-premium button:disabled,
body.theme-premium input:disabled,
body.theme-premium select:disabled,
body.theme-premium textarea:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- 选中状态 ---------- */
body.theme-premium ::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* ---------- 焦点轮廓 ---------- */
body.theme-premium :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================
   基础样式覆盖 - 覆盖styles.css中的硬编码颜色
   ============================================ */

/* 根变量覆盖 */
body.theme-premium {
  color: var(--text-primary);
  background: var(--bg-primary);
  --line: var(--border-color);
  --muted: var(--text-muted);
  --panel: var(--panel-solid);
  --dark: var(--bg-elevated);
}

/* 面板 */
body.theme-premium .panel {
  background: var(--panel-solid);
  border-right: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* 输入框 */
body.theme-premium .field input[type="text"],
body.theme-premium .field input[type="password"],
body.theme-premium .field input[type="datetime-local"],
body.theme-premium .field input[type="number"] {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

body.theme-premium .field input:-webkit-autofill {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-primary) inset;
}

/* 上传区域 */
body.theme-premium .dropzone {
  border: 2px dashed var(--border-strong);
  background: var(--bg-primary);
  color: var(--text-secondary);
}

body.theme-premium .dropzone strong {
  color: var(--text-primary);
}

/* 结果/项目列表/通知 */
body.theme-premium .result,
body.theme-premium .project-list,
body.theme-premium .notice {
  border: 1px solid var(--border-color);
  background: var(--panel-solid);
  color: var(--text-primary);
}

body.theme-premium .notice {
  background: var(--bg-tertiary);
}

/* 分享行 */
body.theme-premium .share-row input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

body.theme-premium .share-row button {
  background: var(--accent);
  color: #fff;
  border: none;
}

/* 二维码 */
body.theme-premium .qr {
  border: 1px solid var(--border-color);
  background: #fff;
}

/* 项目项 */
body.theme-premium .project-item {
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* ghost按钮 */
body.theme-premium .ghost {
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body.theme-premium .ghost.danger {
  color: var(--danger);
  border-color: rgba(255, 69, 58, 0.25);
  background: var(--danger-soft);
}

/* 登录卡片 */
body.theme-premium .login-card {
  background: var(--panel-solid);
  color: var(--text-primary);
  border-left: 1px solid var(--border-color);
}

body.theme-premium .login-card .brand-mark,
body.theme-premium .console-panel .brand-mark,
body.theme-premium .admin-sidebar .brand-mark {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

body.theme-premium .login-card h1,
body.theme-premium .login-card h2 {
  color: var(--text-primary);
}

/* 登录错误 */
body.theme-premium .login-error {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(255, 69, 58, 0.25);
}

/* 控制台面板 */
body.theme-premium .console-panel {
  background: var(--panel-solid);
}

/* 认证栏 */
body.theme-premium .auth-bar {
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
}

body.theme-premium .auth-user {
  color: var(--text-primary);
}

/* 舞台/3D区域 */
body.theme-premium .stage {
  background: var(--bg-primary);
}

/* 管理后台 */
body.theme-premium .admin-shell {
  background: var(--bg-primary);
}

body.theme-premium .admin-sidebar {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-right: 1px solid var(--border-color);
}

body.theme-premium .admin-sidebar h1 {
  color: var(--text-primary);
}

body.theme-premium .admin-sidebar .muted {
  color: var(--text-muted);
}

/* 品牌标记 */
body.theme-premium .brand-mark {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* 主按钮 */
body.theme-premium .primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

body.theme-premium .primary:disabled {
  background: var(--text-muted);
  color: rgba(255, 255, 255, 0.6);
}

/* 链接按钮 */
body.theme-premium .link-button {
  color: var(--text-primary);
}

/* 字段标签 */
body.theme-premium .field span {
  color: var(--text-secondary);
}

/* 标题 */
body.theme-premium h1 {
  color: var(--text-primary);
}

/* 静音文本 */
body.theme-premium .muted {
  color: var(--text-muted);
}

/* 项目列表头部 */
body.theme-premium .project-list-head {
  color: var(--text-secondary);
}

/* 项目链接 */
body.theme-premium .project-link {
  color: var(--text-primary);
}

body.theme-premium .project-item strong {
  color: var(--text-primary);
}

/* 登录视觉区 */
body.theme-premium .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.theme-premium .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.theme-premium .login-hero h1 {
  color: var(--text-primary);
}

body.theme-premium .login-hero p {
  color: var(--text-secondary);
}

body.theme-premium .eyebrow {
  color: var(--accent);
}

body.theme-premium .login-stats span {
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

body.theme-premium .login-stats strong {
  color: var(--text-primary);
}

/* 首页/控制台布局 */
body.theme-premium .home,
body.theme-premium .console-shell {
  background: var(--bg-primary);
}

/* 所有div默认继承文字颜色 */
body.theme-premium div,
body.theme-premium span,
body.theme-premium p,
body.theme-premium li,
body.theme-premium td,
body.theme-premium th {
  color: inherit;
}

/* 确保白色背景的元素在深色主题下可见 */
body.theme-premium [style*="background: #fff"],
body.theme-premium [style*="background: #ffffff"],
body.theme-premium [style*="background-color: #fff"],
body.theme-premium [style*="background-color: #ffffff"] {
  background: var(--panel-solid) !important;
  color: var(--text-primary) !important;
}

/* ---------- 主题切换按钮 ---------- */
body.theme-premium .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.theme-premium .theme-toggle-btn:hover {
  background: var(--panel-hover);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

/* ---------- 备案信息 ---------- */
body.theme-premium .site-beian a {
  color: var(--text-muted);
  background: transparent;
}

body.theme-premium.viewer-page .site-beian a {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- 尺寸标注线 ---------- */
body.theme-premium .measurement-line {
  stroke: var(--accent);
}

/* ---------- 五金件标记 ---------- */
body.theme-premium .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.theme-premium .animation-control {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ---------- 房间场景 ---------- */
body.theme-premium .room-scene {
  background: var(--bg-secondary);
}

/* ---------- 材质库 ---------- */
body.theme-premium .material-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

body.theme-premium .material-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

body.theme-premium .material-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- 板件信息 ---------- */
body.theme-premium .board-info-row {
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
}

body.theme-premium .board-info-row:last-child {
  border-bottom: none;
}

body.theme-premium .board-info-label {
  color: var(--text-secondary);
  font-size: 12px;
}

body.theme-premium .board-info-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* ---------- 铰链信息 ---------- */
body.theme-premium .hinge-info {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

body.theme-premium .hinge-position {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  body.theme-premium .home,
  body.theme-premium .console-shell {
    grid-template-columns: 1fr;
  }

  body.theme-premium .admin-shell {
    grid-template-columns: 1fr;
  }

  body.theme-premium .login-shell {
    grid-template-columns: 1fr;
  }
}

/* ---------- 打印样式 ---------- */
@media print {
  body.theme-premium {
    background: #fff;
    color: #000;
  }
}

/* ============================================
   管理后台样式覆盖 - 青色系
   ============================================ */

/* 顶部Hero区域 */
body.theme-premium .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.theme-premium .ops-hero h1 {
  color: var(--text-primary);
}

body.theme-premium .ops-hero p {
  color: var(--text-secondary);
}

body.theme-premium .ops-hero-status {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

body.theme-premium .ops-hero-status span {
  color: var(--text-secondary);
}

body.theme-premium .ops-hero-status strong {
  color: var(--accent);
}

/* 统计指标卡片 */
body.theme-premium .ops-metrics,
body.theme-premium .admin-metrics {
  gap: 12px;
}

body.theme-premium .ops-metrics article,
body.theme-premium .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.theme-premium .ops-metrics article:hover,
body.theme-premium .admin-metrics article:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

body.theme-premium .ops-metrics article span,
body.theme-premium .admin-metrics article span {
  color: var(--text-secondary);
  font-size: 13px;
}

body.theme-premium .ops-metrics article strong,
body.theme-premium .admin-metrics article strong {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
}

body.theme-premium .ops-metrics article small,
body.theme-premium .admin-metrics article small {
  color: var(--text-muted);
  font-size: 11px;
}

/* 存储指标特殊状态 */
body.theme-premium .storage-metric[data-storage-state="ok"] {
  border-color: rgba(0, 230, 118, 0.25);
}

body.theme-premium .storage-metric[data-storage-state="warning"] {
  border-color: rgba(255, 171, 0, 0.3);
}

body.theme-premium .storage-metric[data-storage-state="danger"] {
  border-color: rgba(255, 82, 82, 0.3);
}

/* 提示条区域 */
body.theme-premium .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.theme-premium .ops-alert-strip > span {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

body.theme-premium .ops-alert-strip strong {
  color: var(--accent);
}

body.theme-premium .ops-alert-strip em {
  color: var(--text-secondary);
  font-style: normal;
}

/* 存储健康提示 */
body.theme-premium .storage-health-notice {
  background: var(--success-soft) !important;
  border-color: rgba(0, 230, 118, 0.25) !important;
}

body.theme-premium .storage-health-notice[data-storage-state="warning"] {
  background: var(--warning-soft) !important;
  border-color: rgba(255, 171, 0, 0.3) !important;
}

body.theme-premium .storage-health-notice[data-storage-state="danger"] {
  background: var(--danger-soft) !important;
  border-color: rgba(255, 82, 82, 0.3) !important;
}

body.theme-premium .storage-health-notice strong {
  color: var(--success) !important;
}

body.theme-premium .storage-health-notice[data-storage-state="warning"] strong {
  color: var(--warning) !important;
}

body.theme-premium .storage-health-notice[data-storage-state="danger"] strong {
  color: var(--danger) !important;
}

/* 缓存维护控制 */
body.theme-premium .storage-maintenance-control {
  background: var(--bg-tertiary) !important;
}

/* 内容区域 */
body.theme-premium .ops-section,
body.theme-premium .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.theme-premium .ops-section-head {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

body.theme-premium .ops-section-head strong {
  color: var(--text-primary);
  font-size: 18px;
}

body.theme-premium .ops-section-head .muted {
  color: var(--text-muted) !important;
}

/* 新建账号抽屉 */
body.theme-premium .admin-create-drawer {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

body.theme-premium .admin-create-drawer summary {
  color: var(--text-primary);
  cursor: pointer;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

body.theme-premium .admin-create-drawer summary:hover {
  background: var(--panel-hover);
}

body.theme-premium .admin-create-form {
  border-top: 1px solid var(--border-color);
  padding: 16px;
}

body.theme-premium .admin-form-grid {
  gap: 16px;
}

/* 表格容器 */
body.theme-premium .admin-table-shell {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* 表格头部 */
body.theme-premium .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.theme-premium .admin-table-head span {
  color: var(--text-secondary);
}

/* 列表 */
body.theme-premium .admin-list {
  background: var(--bg-primary);
  color: var(--text-primary);
}

body.theme-premium .admin-list .muted {
  color: var(--text-muted) !important;
}

/* 账号列表项 */
body.theme-premium .admin-user-item,
body.theme-premium .admin-account-row,
body.theme-premium .admin-list > div {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: background var(--transition-fast);
}

body.theme-premium .admin-user-item:hover,
body.theme-premium .admin-account-row:hover,
body.theme-premium .admin-list > div:hover {
  background: var(--panel-hover);
}

/* 项目筛选 */
body.theme-premium .admin-project-filter {
  color: var(--text-secondary);
}

body.theme-premium .admin-project-filter select {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

/* 状态标签 */
body.theme-premium .admin-status-badge,
body.theme-premium .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.theme-premium .admin-status-badge[data-status="disabled"],
body.theme-premium .user-status-badge[data-status="disabled"] {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-color: var(--border-color);
}

body.theme-premium .admin-status-badge[data-status="expired"],
body.theme-premium .user-status-badge[data-status="expired"] {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 82, 82, 0.25);
}

/* 管理后台侧边栏 */
body.theme-premium .admin-sidebar-nav,
body.theme-premium .ops-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  color: var(--text-primary);
}

body.theme-premium .admin-sidebar-nav a,
body.theme-premium .ops-sidebar a,
body.theme-premium .admin-sidebar-nav button,
body.theme-premium .ops-sidebar button {
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

body.theme-premium .admin-sidebar-nav a:hover,
body.theme-premium .ops-sidebar a:hover,
body.theme-premium .admin-sidebar-nav button:hover,
body.theme-premium .ops-sidebar button:hover {
  background: var(--panel-hover);
  color: var(--text-primary);
}

body.theme-premium .admin-sidebar-nav a.active,
body.theme-premium .ops-sidebar a.active,
body.theme-premium .admin-sidebar-nav button.active,
body.theme-premium .ops-sidebar button.active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

/* 管理后台主内容区 */
body.theme-premium .admin-main,
body.theme-premium .ops-content {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* 公开分享规则区域 */
body.theme-premium .public-share-rules,
body.theme-premium .share-rules-box {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

/* 确保所有article元素在深色主题下不使用白色背景 */
body.theme-premium article {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* 确保所有section元素在深色主题下不使用白色背景 */
body.theme-premium section {
  color: var(--text-primary);
}

/* 通用白色背景覆盖 - 最后兜底 */
body.theme-premium [class*="card"]:not([class*="stat-card"]):not([class*="metric-card"]),
body.theme-premium [class*="box"],
body.theme-premium [class*="tile"],
body.theme-premium [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.theme-premium .home,
body.theme-premium .console-shell,
body.theme-premium .admin-shell,
body.theme-premium .login-shell,
body.theme-premium .workspace-shell {
  justify-content: flex-start;
  align-items: flex-start;
}

/* 主内容区左对齐 */
body.theme-premium main,
body.theme-premium .main-content,
body.theme-premium .content-area,
body.theme-premium .console-content,
body.theme-premium .admin-content,
body.theme-premium .admin-main,
body.theme-premium .ops-content {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: 0;
  margin-right: auto;
}

/* 所有section左对齐 */
body.theme-premium section {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 所有div默认左对齐 */
body.theme-premium div {
  text-align: left;
}

/* 标题左对齐 */
body.theme-premium h1,
body.theme-premium h2,
body.theme-premium h3,
body.theme-premium h4,
body.theme-premium h5,
body.theme-premium h6 {
  text-align: left;
}

/* 段落左对齐 */
body.theme-premium p,
body.theme-premium span,
body.theme-premium label {
  text-align: left;
}

/* 列表左对齐 */
body.theme-premium ul,
body.theme-premium ol,
body.theme-premium li {
  text-align: left;
}

/* 表格左对齐 */
body.theme-premium table,
body.theme-premium th,
body.theme-premium td {
  text-align: left;
}

/* 表单左对齐 */
body.theme-premium form,
body.theme-premium .field,
body.theme-premium .form-group {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 卡片内容左对齐 */
body.theme-premium .card,
body.theme-premium .stat-card,
body.theme-premium .metric-card,
body.theme-premium .info-card {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 统计卡片内部左对齐 */
body.theme-premium .stat-value,
body.theme-premium .stat-label,
body.theme-premium .metric-value,
body.theme-premium .metric-label {
  text-align: left;
}

/* 管理后台指标左对齐 */
body.theme-premium .ops-metrics article,
body.theme-premium .admin-metrics article {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body.theme-premium .ops-metrics article span,
body.theme-premium .admin-metrics article span,
body.theme-premium .ops-metrics article strong,
body.theme-premium .admin-metrics article strong,
body.theme-premium .ops-metrics article small,
body.theme-premium .admin-metrics article small {
  text-align: left;
}

/* Hero区域左对齐 */
body.theme-premium .ops-hero {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body.theme-premium .ops-hero > div {
  text-align: left;
}

/* 区域头部左对齐 */
body.theme-premium .ops-section-head,
body.theme-premium .section-head,
body.theme-premium .sub-section-head {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 项目列表左对齐 */
body.theme-premium .project-list,
body.theme-premium .sub-project-list,
body.theme-premium .admin-list,
body.theme-premium .admin-project-list {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body.theme-premium .project-item,
body.theme-premium .project-link,
body.theme-premium .admin-user-item,
body.theme-premium .admin-account-row {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 表格左对齐 */
body.theme-premium .admin-table-head,
body.theme-premium .admin-table-shell,
body.theme-premium .project-table-head,
body.theme-premium .project-table-row {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body.theme-premium .admin-table-head span,
body.theme-premium .project-table-head span {
  text-align: left;
}

/* 提示条左对齐 */
body.theme-premium .ops-alert-strip,
body.theme-premium .alert,
body.theme-premium .notice,
body.theme-premium .notification {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 登录页左对齐 */
body.theme-premium .login-card,
body.theme-premium .login-hero {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: 0;
  margin-right: auto;
}

body.theme-premium .login-hero h1,
body.theme-premium .login-hero p {
  text-align: left;
}

/* 上传区域左对齐 */
body.theme-premium .dropzone {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 品牌区域左对齐 */
body.theme-premium .brand {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 工具栏左对齐 */
body.theme-premium .toolbar,
body.theme-premium .viewer-toolbar,
body.theme-premium .viewer-top-bar,
body.theme-premium .viewer-controls,
body.theme-premium .viewer-bottom-bar,
body.theme-premium .cabinet-tabs-bar {
  text-align: left;
  justify-content: flex-start;
  align-items: center;
}

/* 按钮组左对齐 */
body.theme-premium .button-group,
body.theme-premium .btn-group,
body.theme-premium .actions,
body.theme-premium .auth-actions,
body.theme-premium .admin-user-actions,
body.theme-premium .project-row-actions,
body.theme-premium .sub-project-toolbar,
body.theme-premium .project-sort-buttons {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 侧边栏左对齐 */
body.theme-premium .admin-sidebar,
body.theme-premium .ops-sidebar,
body.theme-premium .sidebar,
body.theme-premium .panel {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body.theme-premium .admin-nav,
body.theme-premium .sidebar-nav {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body.theme-premium .admin-nav a,
body.theme-premium .admin-nav button,
body.theme-premium .sidebar-nav a,
body.theme-premium .sidebar-nav button {
  text-align: left;
  justify-content: flex-start;
  align-items: center;
}

/* 网格布局左对齐 */
body.theme-premium .sub-stats-grid,
body.theme-premium .stats-grid,
body.theme-premium .metrics-grid,
body.theme-premium .card-grid,
body.theme-premium .admin-form-grid,
body.theme-premium .form-grid {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
}

/* 登录统计左对齐 */
body.theme-premium .login-stats {
  justify-content: flex-start;
  text-align: left;
}

body.theme-premium .login-stats span {
  text-align: left;
}

/* 认证栏左对齐 */
body.theme-premium .auth-bar {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 项目列表头部左对齐 */
body.theme-premium .project-list-head,
body.theme-premium .sub-section-head {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 抽屉左对齐 */
body.theme-premium .admin-create-drawer,
body.theme-premium .drawer,
body.theme-premium details {
  text-align: left;
}

body.theme-premium .admin-create-drawer summary,
body.theme-premium details summary {
  text-align: left;
}

/* 模态框左对齐 */
body.theme-premium .modal,
body.theme-premium .dialog,
body.theme-premium .popup {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body.theme-premium .modal-header,
body.theme-premium .dialog-header,
body.theme-premium .modal-body,
body.theme-premium .dialog-body,
body.theme-premium .modal-footer,
body.theme-premium .dialog-footer {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

/* 下拉菜单左对齐 */
body.theme-premium .dropdown,
body.theme-premium .menu,
body.theme-premium .popover {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

body.theme-premium .dropdown-item,
body.theme-premium .menu-item {
  text-align: left;
  justify-content: flex-start;
  align-items: center;
}

/* 标签页左对齐 */
body.theme-premium .tabs,
body.theme-premium .tab-list {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

/* 页脚左对齐 */
body.theme-premium footer,
body.theme-premium .sub-console-footer,
body.theme-premium .site-beian {
  text-align: left;
  justify-content: flex-start;
  align-items: center;
}

body.theme-premium .sub-console-footer p {
  text-align: left;
}

/* 搜索框左对齐 */
body.theme-premium .project-search-input,
body.theme-premium input[type="search"],
body.theme-premium input[type="text"],
body.theme-premium input[type="password"],
body.theme-premium input[type="number"],
body.theme-premium input[type="datetime-local"],
body.theme-premium textarea,
body.theme-premium select {
  text-align: left;
}

/* 错误提示左对齐 */
body.theme-premium .login-error,
body.theme-premium .error,
body.theme-premium .error-message {
  text-align: left;
}

/* 结果区域左对齐 */
body.theme-premium .result,
body.theme-premium .workspace-result {
  text-align: left;
}

/* 分享行左对齐 */
body.theme-premium .share-row {
  justify-content: flex-start;
  text-align: left;
}

/* 保留按钮内部文字居中（不影响布局） */
body.theme-premium button,
body.theme-premium .primary,
body.theme-premium .ghost,
body.theme-premium .link-button,
body.theme-premium .sort-btn,
body.theme-premium .cabinet-tab,
body.theme-premium .cabinet-button,
body.theme-premium .viewer-tool-btn {
  text-align: center;
  justify-content: center;
  align-items: center;
}

/* 保留图标居中 */
body.theme-premium .brand-mark,
body.theme-premium .icon,
body.theme-premium .avatar {
  text-align: center;
  justify-content: center;
  align-items: center;
}

/* 保留状态标签居中 */
body.theme-premium .status-pill,
body.theme-premium .badge,
body.theme-premium .tag,
body.theme-premium .chip,
body.theme-premium .admin-status-badge,
body.theme-premium .user-status-badge {
  text-align: center;
  justify-content: center;
  align-items: center;
}

/* ============================================
   舒适布局优化 - 呼吸感 · 层次 · 节奏
   ============================================ */

/* ---------- 全局间距与排版 ---------- */
body.theme-premium {
  /* 舒适间距系统 */
  --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.theme-premium .home,
body.theme-premium .console-shell {
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
}

body.theme-premium .admin-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
}

/* 左侧面板舒适内边距 */
body.theme-premium .panel {
  padding: var(--space-2xl) var(--space-xl);
  gap: var(--space-lg);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

/* 主内容区舒适内边距 */
body.theme-premium .console-content,
body.theme-premium .admin-content,
body.theme-premium .admin-main,
body.theme-premium .ops-content,
body.theme-premium main {
  padding: var(--space-2xl);
  overflow-y: auto;
  max-width: 100%;
}

/* ---------- 品牌区域舒适布局 ---------- */
body.theme-premium .brand {
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

body.theme-premium .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 700;
}

body.theme-premium h1 {
  font-size: var(--font-2xl);
  font-weight: 700;
  line-height: var(--line-tight);
  letter-spacing: -0.01em;
}

/* ---------- 标题层级舒适节奏 ---------- */
body.theme-premium h2 {
  font-size: var(--font-xl);
  font-weight: 600;
  line-height: var(--line-tight);
  letter-spacing: -0.005em;
}

body.theme-premium h3 {
  font-size: var(--font-lg);
  font-weight: 600;
  line-height: var(--line-tight);
}

body.theme-premium h4 {
  font-size: var(--font-md);
  font-weight: 600;
  line-height: var(--line-tight);
}

body.theme-premium p {
  font-size: var(--font-base);
  line-height: var(--line-relaxed);
  color: var(--text-secondary);
}

/* ---------- 统计卡片舒适布局 ---------- */
body.theme-premium .sub-stats-grid,
body.theme-premium .stats-grid,
body.theme-premium .metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

body.theme-premium .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.theme-premium .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

body.theme-premium .stat-value {
  font-size: var(--font-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--line-tight);
  letter-spacing: -0.02em;
}

body.theme-premium .stat-label {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---------- 管理后台指标舒适布局 ---------- */
body.theme-premium .ops-metrics,
body.theme-premium .admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

body.theme-premium .ops-metrics article,
body.theme-premium .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.theme-premium .ops-metrics article:hover,
body.theme-premium .admin-metrics article:hover {
  transform: translateY(-2px);
}

body.theme-premium .ops-metrics article span,
body.theme-premium .admin-metrics article span {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

body.theme-premium .ops-metrics article strong,
body.theme-premium .admin-metrics article strong {
  font-size: var(--font-2xl);
  font-weight: 700;
  line-height: var(--line-tight);
  letter-spacing: -0.01em;
}

body.theme-premium .ops-metrics article small,
body.theme-premium .admin-metrics article small {
  font-size: var(--font-xs);
  line-height: var(--line-normal);
}

/* ---------- Hero区域舒适布局 ---------- */
body.theme-premium .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.theme-premium .ops-hero > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

body.theme-premium .ops-hero .eyebrow {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

body.theme-premium .ops-hero h1 {
  font-size: var(--font-2xl);
  margin-bottom: var(--space-xs);
}

body.theme-premium .ops-hero p {
  font-size: var(--font-sm);
  max-width: 640px;
}

body.theme-premium .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.theme-premium .ops-hero-status span {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

body.theme-premium .ops-hero-status strong {
  font-size: var(--font-xl);
  font-weight: 700;
}

/* ---------- 提示条舒适布局 ---------- */
body.theme-premium .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.theme-premium .ops-alert-strip > span {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

body.theme-premium .ops-alert-strip strong {
  font-size: var(--font-sm);
  font-weight: 700;
  margin-bottom: 2px;
}

body.theme-premium .ops-alert-strip em {
  font-size: var(--font-xs);
  line-height: var(--line-normal);
}

/* ---------- 内容区域舒适布局 ---------- */
body.theme-premium .ops-section,
body.theme-premium .admin-section {
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

body.theme-premium .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.theme-premium .ops-section-head > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

body.theme-premium .ops-section-head .eyebrow {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

body.theme-premium .ops-section-head strong {
  font-size: var(--font-xl);
  font-weight: 700;
}

body.theme-premium .ops-section-head .muted {
  font-size: var(--font-sm);
  max-width: 400px;
}

/* ---------- 新建抽屉舒适布局 ---------- */
body.theme-premium .admin-create-drawer {
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

body.theme-premium .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.theme-premium .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.theme-premium .admin-create-drawer[open] summary::before {
  content: "−";
}

body.theme-premium .admin-create-form {
  padding: var(--space-lg);
}

body.theme-premium .admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

body.theme-premium .admin-form-grid .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

body.theme-premium .admin-form-grid .field span {
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- 表格舒适布局 ---------- */
body.theme-premium .admin-table-shell {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

body.theme-premium .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.theme-premium .admin-list {
  padding: 0;
}

body.theme-premium .admin-list > div,
body.theme-premium .admin-user-item,
body.theme-premium .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.theme-premium .admin-list > div:hover,
body.theme-premium .admin-user-item:hover,
body.theme-premium .admin-account-row:hover {
  background: var(--panel-hover);
}

/* ---------- 项目列表舒适布局 ---------- */
body.theme-premium .sub-projects-section {
  margin-bottom: var(--space-xl);
}

body.theme-premium .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.theme-premium .sub-section-head h2 {
  font-size: var(--font-xl);
  font-weight: 700;
}

body.theme-premium .sub-project-toolbar {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

body.theme-premium .project-search-input {
  min-width: 200px;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
}

body.theme-premium .project-sort-buttons {
  display: flex;
  gap: 4px;
}

body.theme-premium .sort-btn {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

body.theme-premium .sort-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

body.theme-premium .sub-project-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

body.theme-premium .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.theme-premium .project-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

body.theme-premium .project-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body.theme-premium .project-item strong {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-primary);
}

body.theme-premium .project-item .muted {
  font-size: var(--font-xs);
  color: var(--text-muted) !important;
}

body.theme-premium .project-row-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- 按钮舒适尺寸 ---------- */
body.theme-premium button,
body.theme-premium .ghost,
body.theme-premium .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.theme-premium .primary,
body.theme-premium 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.theme-premium .link-button {
  padding: var(--space-xs) var(--space-md);
  min-height: 32px;
  font-size: var(--font-xs);
}

/* ---------- 输入框舒适尺寸 ---------- */
body.theme-premium input,
body.theme-premium textarea,
body.theme-premium 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.theme-premium input:focus,
body.theme-premium textarea:focus,
body.theme-premium select:focus {
  padding: var(--space-sm) var(--space-md);
}

body.theme-premium .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

body.theme-premium .field span {
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- 上传区域舒适布局 ---------- */
body.theme-premium .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.theme-premium .dropzone:hover,
body.theme-premium .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

body.theme-premium .dropzone strong {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text-primary);
}

body.theme-premium .dropzone p,
body.theme-premium .dropzone span {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  text-align: center;
}

/* ---------- 登录页舒适布局 ---------- */
body.theme-premium .login-shell {
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 460px);
}

body.theme-premium .login-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
}

body.theme-premium .login-hero {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

body.theme-premium .login-hero .eyebrow {
  font-size: var(--font-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 800;
}

body.theme-premium .login-hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body.theme-premium .login-hero p {
  font-size: var(--font-md);
  line-height: var(--line-relaxed);
  max-width: 440px;
}

body.theme-premium .login-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

body.theme-premium .login-stats span {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.theme-premium .login-stats strong {
  font-size: var(--font-xl);
  font-weight: 700;
}

body.theme-premium .login-card {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-lg);
  overflow-y: auto;
}

body.theme-premium .login-card h1,
body.theme-premium .login-card h2 {
  font-size: var(--font-2xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

body.theme-premium .login-card .field {
  gap: var(--space-xs);
}

body.theme-premium .login-error {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
}

/* ---------- 侧边栏舒适布局 ---------- */
body.theme-premium .admin-sidebar,
body.theme-premium .ops-sidebar,
body.theme-premium .sidebar {
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  overflow-y: auto;
}

body.theme-premium .admin-sidebar .brand {
  margin-bottom: var(--space-md);
}

body.theme-premium .admin-sidebar h1 {
  font-size: var(--font-lg);
  font-weight: 700;
}

body.theme-premium .admin-sidebar .muted {
  font-size: var(--font-xs);
}

body.theme-premium .admin-nav,
body.theme-premium .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.theme-premium .admin-nav a,
body.theme-premium .admin-nav button,
body.theme-premium .sidebar-nav a,
body.theme-premium .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.theme-premium .admin-nav a:hover,
body.theme-premium .admin-nav button:hover,
body.theme-premium .sidebar-nav a:hover,
body.theme-premium .sidebar-nav button:hover {
  background: var(--panel-hover);
}

body.theme-premium .admin-nav a.active,
body.theme-premium .admin-nav button.active,
body.theme-premium .sidebar-nav a.active,
body.theme-premium .sidebar-nav button.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ---------- 认证栏舒适布局 ---------- */
body.theme-premium .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.theme-premium .auth-user {
  font-size: var(--font-sm);
  font-weight: 600;
}

body.theme-premium .auth-actions,
body.theme-premium .admin-user-actions {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

/* ---------- 页脚舒适布局 ---------- */
body.theme-premium .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.theme-premium .sub-console-footer p {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

/* ---------- 结果区域舒适布局 ---------- */
body.theme-premium .result,
body.theme-premium .workspace-result {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
}

body.theme-premium .result strong {
  font-size: var(--font-md);
  font-weight: 700;
  display: block;
  margin-bottom: var(--space-sm);
}

body.theme-premium .share-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

body.theme-premium .share-row input {
  min-width: 0;
}

body.theme-premium .qr {
  margin-top: var(--space-md);
  border-radius: var(--radius-md);
}

/* ---------- 响应式舒适布局 ---------- */
@media (max-width: 1024px) {
  body.theme-premium .home,
  body.theme-premium .console-shell {
    grid-template-columns: 1fr;
  }

  body.theme-premium .panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 50vh;
  }

  body.theme-premium .admin-shell {
    grid-template-columns: 1fr;
  }

  body.theme-premium .admin-sidebar,
  body.theme-premium .ops-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 40vh;
  }

  body.theme-premium .login-shell {
    grid-template-columns: 1fr;
  }

  body.theme-premium .login-visual {
    display: none;
  }
}

@media (max-width: 640px) {
  body.theme-premium {
    --space-2xl: 32px;
    --space-xl: 24px;
    --space-lg: 16px;
  }

  body.theme-premium .console-content,
  body.theme-premium .admin-content,
  body.theme-premium .admin-main,
  body.theme-premium .ops-content,
  body.theme-premium main {
    padding: var(--space-lg);
  }

  body.theme-premium .ops-hero {
    flex-direction: column;
  }

  body.theme-premium .ops-section-head {
    flex-direction: column;
  }

  body.theme-premium .sub-stats-grid,
  body.theme-premium .stats-grid,
  body.theme-premium .metrics-grid,
  body.theme-premium .ops-metrics,
  body.theme-premium .admin-metrics {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   舒适布局优化 - 呼吸感 · 层次 · 节奏
   ============================================ */

body.theme-premium {
  --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.theme-premium .home, body.theme-premium .console-shell { grid-template-columns: 380px minmax(0, 1fr); }
body.theme-premium .admin-shell { grid-template-columns: 260px minmax(0, 1fr); }
body.theme-premium .panel { padding: var(--space-2xl) var(--space-xl); gap: var(--space-lg); }
body.theme-premium .console-content, body.theme-premium .admin-content, body.theme-premium .admin-main, body.theme-premium .ops-content, body.theme-premium main { padding: var(--space-2xl); }

body.theme-premium .brand { gap: var(--space-md); }
body.theme-premium .brand-mark { width: 48px; height: 48px; border-radius: var(--radius-md); font-size: 18px; }
body.theme-premium h1 { font-size: var(--font-2xl); font-weight: 700; line-height: var(--line-tight); letter-spacing: -0.01em; }
body.theme-premium h2 { font-size: var(--font-xl); font-weight: 600; }
body.theme-premium h3 { font-size: var(--font-lg); font-weight: 600; }
body.theme-premium p { font-size: var(--font-base); line-height: var(--line-relaxed); color: var(--text-secondary); }

body.theme-premium .sub-stats-grid, body.theme-premium .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-xl); }
body.theme-premium .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.theme-premium .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
body.theme-premium .stat-value { font-size: var(--font-3xl); font-weight: 700; line-height: var(--line-tight); letter-spacing: -0.02em; }
body.theme-premium .stat-label { font-size: var(--font-sm); font-weight: 500; }

body.theme-premium .ops-metrics, body.theme-premium .admin-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-lg); }
body.theme-premium .ops-metrics article, body.theme-premium .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.theme-premium .ops-metrics article:hover { transform: translateY(-2px); }
body.theme-premium .ops-metrics article span { font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
body.theme-premium .ops-metrics article strong { font-size: var(--font-2xl); font-weight: 700; line-height: var(--line-tight); }
body.theme-premium .ops-metrics article small { font-size: var(--font-xs); line-height: var(--line-normal); }

body.theme-premium .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.theme-premium .ops-hero > div { flex: 1; display: flex; flex-direction: column; gap: var(--space-sm); }
body.theme-premium .ops-hero .eyebrow { font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
body.theme-premium .ops-hero h1 { font-size: var(--font-2xl); margin-bottom: var(--space-xs); }
body.theme-premium .ops-hero p { font-size: var(--font-sm); max-width: 640px; }
body.theme-premium .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.theme-premium .ops-hero-status span { font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
body.theme-premium .ops-hero-status strong { font-size: var(--font-xl); font-weight: 700; }

body.theme-premium .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.theme-premium .ops-alert-strip > span { padding: var(--space-md); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: var(--space-xs); }
body.theme-premium .ops-alert-strip strong { font-size: var(--font-sm); font-weight: 700; margin-bottom: 2px; }
body.theme-premium .ops-alert-strip em { font-size: var(--font-xs); line-height: var(--line-normal); font-style: normal; }

body.theme-premium .ops-section, body.theme-premium .admin-section { padding: var(--space-xl); margin-bottom: var(--space-lg); }
body.theme-premium .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.theme-premium .ops-section-head > div { display: flex; flex-direction: column; gap: var(--space-xs); }
body.theme-premium .ops-section-head .eyebrow { font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
body.theme-premium .ops-section-head strong { font-size: var(--font-xl); font-weight: 700; }
body.theme-premium .ops-section-head .muted { font-size: var(--font-sm); max-width: 400px; }

body.theme-premium .admin-create-drawer { margin-bottom: var(--space-lg); border-radius: var(--radius-lg); overflow: hidden; }
body.theme-premium .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.theme-premium .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.theme-premium .admin-create-drawer[open] summary::before { content: "−"; }
body.theme-premium .admin-create-form { padding: var(--space-lg); }
body.theme-premium .admin-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-lg); }
body.theme-premium .admin-form-grid .field { display: flex; flex-direction: column; gap: var(--space-xs); }
body.theme-premium .admin-form-grid .field span { font-size: var(--font-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }

body.theme-premium .admin-table-shell { border-radius: var(--radius-lg); overflow: hidden; }
body.theme-premium .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.theme-premium .admin-list > div, body.theme-premium .admin-user-item, body.theme-premium .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.theme-premium .admin-list > div:hover { background: var(--panel-hover); }

body.theme-premium .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.theme-premium .sub-section-head h2 { font-size: var(--font-xl); font-weight: 700; }
body.theme-premium .sub-project-toolbar { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; }
body.theme-premium .project-search-input { min-width: 200px; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); font-size: var(--font-sm); }
body.theme-premium .project-sort-buttons { display: flex; gap: 4px; }
body.theme-premium .sort-btn { padding: var(--space-xs) var(--space-md); font-size: var(--font-xs); font-weight: 600; border-radius: var(--radius-sm); }
body.theme-premium .sort-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
body.theme-premium .sub-project-list { display: flex; flex-direction: column; gap: var(--space-sm); }
body.theme-premium .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.theme-premium .project-item:hover { border-color: var(--border-hover); transform: translateX(4px); box-shadow: var(--shadow-sm); }
body.theme-premium .project-link { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body.theme-premium .project-item strong { font-size: var(--font-md); font-weight: 600; color: var(--text-primary); }
body.theme-premium .project-item .muted { font-size: var(--font-xs); color: var(--text-muted) !important; }
body.theme-premium .project-row-actions { display: flex; gap: var(--space-xs); align-items: center; flex-wrap: wrap; }

body.theme-premium button, body.theme-premium .ghost, body.theme-premium .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.theme-premium .primary, body.theme-premium 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.theme-premium .link-button { padding: var(--space-xs) var(--space-md); min-height: 32px; font-size: var(--font-xs); }

body.theme-premium input, body.theme-premium textarea, body.theme-premium 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.theme-premium .field { display: flex; flex-direction: column; gap: var(--space-xs); }
body.theme-premium .field span { font-size: var(--font-xs); font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }

body.theme-premium .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.theme-premium .dropzone:hover, body.theme-premium .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
body.theme-premium .dropzone strong { font-size: var(--font-lg); font-weight: 700; color: var(--text-primary); }
body.theme-premium .dropzone p, body.theme-premium .dropzone span { font-size: var(--font-sm); color: var(--text-secondary); text-align: center; }

body.theme-premium .login-shell { grid-template-columns: minmax(0, 1.2fr) minmax(380px, 460px); }
body.theme-premium .login-visual { display: flex; align-items: center; justify-content: center; padding: var(--space-2xl); }
body.theme-premium .login-hero { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: var(--space-lg); }
body.theme-premium .login-hero .eyebrow { font-size: var(--font-sm); text-transform: uppercase; letter-spacing: 0.15em; font-weight: 800; }
body.theme-premium .login-hero h1 { font-size: 42px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
body.theme-premium .login-hero p { font-size: var(--font-md); line-height: var(--line-relaxed); max-width: 440px; }
body.theme-premium .login-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); margin-top: var(--space-md); }
body.theme-premium .login-stats span { padding: var(--space-md); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 4px; }
body.theme-premium .login-stats strong { font-size: var(--font-xl); font-weight: 700; }
body.theme-premium .login-card { padding: var(--space-2xl); display: flex; flex-direction: column; justify-content: center; gap: var(--space-lg); overflow-y: auto; }
body.theme-premium .login-card h1, body.theme-premium .login-card h2 { font-size: var(--font-2xl); font-weight: 700; margin-bottom: var(--space-xs); }
body.theme-premium .login-error { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); font-size: var(--font-sm); font-weight: 500; }

body.theme-premium .admin-sidebar, body.theme-premium .ops-sidebar, body.theme-premium .sidebar { padding: var(--space-xl) var(--space-lg); display: flex; flex-direction: column; gap: var(--space-lg); overflow-y: auto; }
body.theme-premium .admin-sidebar h1 { font-size: var(--font-lg); font-weight: 700; }
body.theme-premium .admin-sidebar .muted { font-size: var(--font-xs); }
body.theme-premium .admin-nav, body.theme-premium .sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
body.theme-premium .admin-nav a, body.theme-premium .admin-nav button, body.theme-premium .sidebar-nav a, body.theme-premium .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.theme-premium .admin-nav a:hover, body.theme-premium .admin-nav button:hover { background: var(--panel-hover); }
body.theme-premium .admin-nav a.active, body.theme-premium .admin-nav button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

body.theme-premium .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.theme-premium .auth-user { font-size: var(--font-sm); font-weight: 600; }
body.theme-premium .auth-actions, body.theme-premium .admin-user-actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; }

body.theme-premium .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.theme-premium .sub-console-footer p { font-size: var(--font-xs); color: var(--text-muted); }

body.theme-premium .result, body.theme-premium .workspace-result { padding: var(--space-lg); border-radius: var(--radius-lg); margin-top: var(--space-lg); }
body.theme-premium .result strong { font-size: var(--font-md); font-weight: 700; display: block; margin-bottom: var(--space-sm); }
body.theme-premium .share-row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-sm); margin-top: var(--space-sm); }
body.theme-premium .qr { margin-top: var(--space-md); border-radius: var(--radius-md); }

@media (max-width: 1024px) {
  body.theme-premium .home, body.theme-premium .console-shell { grid-template-columns: 1fr; }
  body.theme-premium .panel { border-right: none; border-bottom: 1px solid var(--border-color); max-height: 50vh; }
  body.theme-premium .admin-shell { grid-template-columns: 1fr; }
  body.theme-premium .admin-sidebar, body.theme-premium .ops-sidebar { border-right: none; border-bottom: 1px solid var(--border-color); max-height: 40vh; }
  body.theme-premium .login-shell { grid-template-columns: 1fr; }
  body.theme-premium .login-visual { display: none; }
}
@media (max-width: 640px) {
  body.theme-premium { --space-2xl: 32px; --space-xl: 24px; --space-lg: 16px; }
  body.theme-premium .console-content, body.theme-premium .admin-content, body.theme-premium main { padding: var(--space-lg); }
  body.theme-premium .ops-hero { flex-direction: column; }
  body.theme-premium .ops-section-head { flex-direction: column; }
  body.theme-premium .sub-stats-grid, body.theme-premium .ops-metrics, body.theme-premium .admin-metrics { grid-template-columns: 1fr; }
}

/* ============================================
   工作台账号信息条 - 青色背景白色字体
   ============================================ */
body.theme-premium .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.theme-premium .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.theme-premium .workspace-status-strip span:hover {
  background: var(--panel-hover);
}

body.theme-premium .workspace-status-strip strong {
  color: var(--text-primary);
  font-size: var(--font-lg);
  font-weight: 700;
  line-height: var(--line-tight);
}

/* 统计卡片和主网格对齐 */
body.theme-premium .stats-grid,
body.theme-premium .sub-stats-grid {
  width: min(1320px, calc(100% - 40px));
  margin: 20px auto 0;
}

body.theme-premium .workspace-main-grid {
  width: min(1320px, calc(100% - 40px));
  margin: 20px auto 40px;
}

/* 上传卡片和侧边栏卡片青色背景 */
body.theme-premium .upload-primary-panel,
body.theme-premium .workspace-rail > section,
body.theme-premium .project-operations-card,
body.theme-premium .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.theme-premium .upload-primary-panel {
  padding: 28px;
  gap: 20px;
}

body.theme-premium .section-heading {
  gap: 10px;
}

body.theme-premium .section-heading h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
}

body.theme-premium .card-kicker {
  color: var(--accent);
  font-size: var(--font-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* 账号到期卡片 */
body.theme-premium .account-expiry-card {
  padding: 24px;
  gap: 12px;
  align-content: start;
  color: var(--text-primary);
  background: var(--panel-bg);
}

body.theme-premium .account-expiry-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

body.theme-premium .account-expiry-card p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

body.theme-premium .account-expiry-card span {
  color: var(--text-secondary);
  line-height: 1.65;
}

/* 修改密码卡片 */
body.theme-premium .password-change-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

body.theme-premium .password-change-card summary {
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}

body.theme-premium .password-change-card summary:hover {
  color: var(--accent);
}

/* 项目列表卡片 */
body.theme-premium .project-operations-card {
  padding: 24px;
}

body.theme-premium .project-operations-card .project-list-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

body.theme-premium .project-operations-card .project-item {
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
}

body.theme-premium .project-operations-card .project-item:first-child {
  border-top: none;
}

/* 项目列表工具栏 */
body.theme-premium .project-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

body.theme-premium .project-list-toolbar .project-search-input {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

/* 上传表单 */
body.theme-premium .upload-form-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.theme-premium .upload-form-layout .field span {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

body.theme-premium .upload-form-layout input[type="text"] {
  width: 100%;
}

/* 上传区域加大 */
body.theme-premium .upload-form-layout .dropzone {
  min-height: 200px;
  padding: 32px;
}

body.theme-premium .upload-form-layout .dropzone strong {
  font-size: var(--font-xl);
  font-weight: 700;
}

/* 上传按钮加大 */
body.theme-premium .upload-form-layout .primary {
  padding: 14px 32px;
  font-size: var(--font-md);
  font-weight: 700;
  min-height: 48px;
}

/* 工作台头部 */
body.theme-premium .workspace-header {
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  border-bottom: 1px solid var(--border-color);
}

body.theme-premium .workspace-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

body.theme-premium .workspace-title > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.theme-premium .workspace-title .eyebrow {
  color: var(--accent);
  font-size: var(--font-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

body.theme-premium .workspace-title h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

body.theme-premium .workspace-title p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  max-width: 560px;
}

body.theme-premium .workspace-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 响应式 */
@media (max-width: 1024px) {
  body.theme-premium .workspace-header {
    flex-direction: column;
    padding: 24px;
  }
  body.theme-premium .workspace-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  body.theme-premium .workspace-status-strip {
    grid-template-columns: 1fr;
  }
  body.theme-premium .workspace-title {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   3D查看器工具栏统一颜色 - 青色系
   ============================================ */
body.theme-premium .ref-top-toolbar,
body.theme-premium .ref-bottom-toolbar,
body.theme-premium .ref-side-toolbar,
body.theme-premium .cabinet-strip {
  background: var(--panel-solid);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
}

body.theme-premium .ref-top-toolbar {
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: var(--shadow-md);
}

body.theme-premium .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.theme-premium .ref-side-toolbar {
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: var(--shadow-md);
}

body.theme-premium .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.theme-premium .ref-top-toolbar button,
body.theme-premium .ref-bottom-toolbar button,
body.theme-premium .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.theme-premium .ref-top-toolbar button:hover,
body.theme-premium .ref-bottom-toolbar button:hover,
body.theme-premium .ref-side-toolbar button:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

body.theme-premium .ref-top-toolbar button.active,
body.theme-premium .ref-bottom-toolbar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* 柜体标签按钮统一颜色 */
body.theme-premium .cabinet-strip button {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

body.theme-premium .cabinet-strip button:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

body.theme-premium .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.theme-premium .cad-viewer,
body.theme-premium .viewer-container,
body.theme-premium .viewer-stage {
  background: var(--bg-primary);
}

/* 浮动菜单 */
body.theme-premium .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.theme-premium .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.theme-premium .floating-menu button:hover {
  background: var(--panel-hover);
}

/* 底部弹出面板 */
body.theme-premium .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.theme-premium .ref-bottom-sheet header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.theme-premium .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.theme-premium .board-info-panel,
body.theme-premium .board-lookup-panel,
body.theme-premium .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.theme-premium .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.theme-premium .empty-card h2 {
  color: var(--text-primary);
  font-size: 22px;
  margin-bottom: 12px;
}

body.theme-premium .empty-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* 项目信息标签 */
body.theme-premium .viewer-project-info,
body.theme-premium .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.theme-premium .viewer-quality-risk,
body.theme-premium .viewer-quality-pending,
body.theme-premium .viewer-quality-ok {
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

body.theme-premium .viewer-quality-ok {
  background: var(--success-soft);
  border-color: rgba(0, 230, 118, 0.3);
  color: var(--success);
}

body.theme-premium .viewer-quality-risk {
  background: var(--warning-soft);
  border-color: rgba(255, 171, 0, 0.3);
  color: var(--warning);
}

body.theme-premium .viewer-quality-pending {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

/* ============================================
   工作台右侧账号区域 - 对齐放大
   ============================================ */
body.theme-premium .workspace-main-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: stretch;
}

body.theme-premium .workspace-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

body.theme-premium .workspace-rail > section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 账号到期卡片放大 */
body.theme-premium .account-expiry-card {
  padding: 28px 24px;
  gap: 16px;
  align-content: start;
}

body.theme-premium .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.theme-premium .account-expiry-card h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

body.theme-premium .account-expiry-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

body.theme-premium .account-expiry-card span {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

body.theme-premium .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.theme-premium .password-change-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

body.theme-premium .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.theme-premium .password-change-card summary::before {
  content: "▸";
  font-size: 14px;
  color: var(--accent);
  transition: transform var(--transition-fast);
}

body.theme-premium .password-change-card[open] summary::before {
  transform: rotate(90deg);
}

body.theme-premium .password-change-card summary:hover {
  color: var(--accent);
}

body.theme-premium .password-change-form {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.theme-premium .password-change-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.theme-premium .password-change-form .field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

body.theme-premium .password-change-form input {
  width: 100%;
}

body.theme-premium .password-change-form .ghost {
  align-self: flex-start;
  margin-top: 4px;
}

/* 上传卡片和右侧卡片等高对齐 */
body.theme-premium .upload-primary-panel {
  min-height: 100%;
}

/* 统计卡片加大 */
body.theme-premium .stats-grid .stat-card,
body.theme-premium .sub-stats-grid .stat-card {
  padding: 24px;
  min-height: 110px;
}

body.theme-premium .stat-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body.theme-premium .stat-label {
  font-size: 14px;
  font-weight: 500;
  margin-top: 4px;
}

/* 账号信息条加大 */
body.theme-premium .workspace-status-strip span {
  min-height: 90px;
  padding: 20px 24px;
  gap: 8px;
}

body.theme-premium .workspace-status-strip strong {
  font-size: 20px;
  font-weight: 800;
}

body.theme-premium .workspace-status-strip span {
  font-size: 13px;
}

/* 项目列表卡片加大 */
body.theme-premium .project-operations-card {
  padding: 28px;
}

body.theme-premium .project-operations-card .project-item {
  padding: 20px 0;
}

body.theme-premium .project-item strong {
  font-size: 17px;
  font-weight: 700;
}

body.theme-premium .project-item .muted {
  font-size: 13px;
  margin-top: 4px;
}

/* 上传区域加大 */
body.theme-premium .upload-form-layout .dropzone {
  min-height: 240px;
  padding: 40px;
}

body.theme-premium .upload-form-layout .dropzone strong {
  font-size: 22px;
  font-weight: 800;
}

body.theme-premium .upload-form-layout .dropzone p,
body.theme-premium .upload-form-layout .dropzone span {
  font-size: 15px;
}

/* 上传按钮加大 */
body.theme-premium .upload-form-layout .primary {
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 800;
  min-height: 52px;
  border-radius: var(--radius-md);
}

/* 上传标题加大 */
body.theme-premium .section-heading h2 {
  font-size: 30px;
  font-weight: 800;
}

body.theme-premium .section-heading .card-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* 项目名称输入框加大 */
body.theme-premium .upload-form-layout .field span {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

body.theme-premium .upload-form-layout input[type="text"] {
  height: 48px;
  font-size: 15px;
  padding: 0 16px;
}

/* 项目搜索和排序加大 */
body.theme-premium .project-list-toolbar {
  margin-bottom: 20px;
}

body.theme-premium .project-search-input {
  height: 44px;
  font-size: 14px;
  padding: 0 16px;
}

body.theme-premium .sort-btn {
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 700;
}

/* 项目操作按钮加大 */
body.theme-premium .project-row-actions .ghost,
body.theme-premium .project-row-actions .link-button {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
}

/* ============================================
   右侧两个卡片 - 上下左右对齐平分
   ============================================ */
body.theme-premium .workspace-rail {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  height: 100%;
}

body.theme-premium .workspace-rail > section {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 当前账号卡片 - 内容垂直分布 */
body.theme-premium .account-expiry-card {
  justify-content: space-between;
  padding: 28px 24px;
}

body.theme-premium .account-expiry-card > * {
  width: 100%;
}

body.theme-premium .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.theme-premium .account-expiry-card h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 12px;
}

body.theme-premium .account-expiry-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: auto;
}

body.theme-premium .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.theme-premium .password-change-card {
  justify-content: flex-start;
  padding: 28px 24px;
}

body.theme-premium .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.theme-premium .password-change-card summary::before {
  content: "▸";
  font-size: 16px;
  color: var(--accent);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

body.theme-premium .password-change-card[open] summary::before {
  transform: rotate(90deg);
}

body.theme-premium .password-change-card summary:hover {
  color: var(--accent);
}

body.theme-premium .password-change-form {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

body.theme-premium .password-change-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.theme-premium .password-change-form .field span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.theme-premium .password-change-form input {
  width: 100%;
  height: 44px;
  font-size: 14px;
}

body.theme-premium .password-change-form .login-error {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

body.theme-premium .password-change-form .ghost {
  align-self: flex-start;
  margin-top: auto;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  height: 44px;
}

/* 未展开时修改密码卡片显示提示文字 */
body.theme-premium .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.theme-premium .password-change-card:not([open]):hover::after {
  border-color: var(--accent-border);
  color: var(--text-secondary);
  background: var(--accent-soft);
}

/* 确保主网格等高 */
body.theme-premium .workspace-main-grid {
  align-items: stretch;
}

body.theme-premium .upload-primary-panel {
  height: 100%;
  min-height: 100%;
}

/* ============================================
   上传区域优化 - 居中 隐藏 放大
   ============================================ */

/* 1. 标题文字居中 */
body.theme-premium .upload-primary-panel .section-heading {
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.theme-premium .upload-primary-panel .section-heading h2 {
  text-align: center;
  font-size: 32px;
  font-weight: 800;
}

body.theme-premium .upload-primary-panel .section-heading .card-kicker {
  text-align: center;
}

/* 2. 隐藏项目名称输入框 */
body.theme-premium .upload-form-layout > .field:first-child {
  display: none !important;
}

/* 3. 上传区域居中放大 */
body.theme-premium .upload-form-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex: 1;
}

body.theme-premium .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.theme-premium .upload-form-layout .dropzone strong {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
}

body.theme-premium .upload-form-layout .dropzone p,
body.theme-premium .upload-form-layout .dropzone span {
  font-size: 16px;
  text-align: center;
  max-width: 360px;
}

/* 上传按钮居中放大 */
body.theme-premium .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.theme-premium .upload-primary-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 32px;
}

body.theme-premium .upload-primary-panel .section-heading {
  flex-shrink: 0;
}

body.theme-premium .upload-primary-panel .upload-form-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ============================================
   上传区域放大填满 - 去掉宽度限制
   ============================================ */
body.theme-premium .upload-form-layout .dropzone {
  width: 100%;
  max-width: 100% !important;
  min-height: 380px;
  padding: 60px 48px;
}

body.theme-premium .upload-form-layout .dropzone strong {
  font-size: 32px;
  font-weight: 800;
}

body.theme-premium .upload-form-layout .dropzone p,
body.theme-premium .upload-form-layout .dropzone span {
  font-size: 18px;
  max-width: 100%;
}

/* 上传按钮放大填满 */
body.theme-premium .upload-form-layout .primary {
  width: 100%;
  max-width: 100% !important;
  padding: 20px 48px;
  font-size: 20px;
  font-weight: 800;
  min-height: 64px;
}

/* 标题放大 */
body.theme-premium .upload-primary-panel .section-heading h2 {
  font-size: 38px;
  font-weight: 800;
}

body.theme-premium .upload-primary-panel .section-heading .card-kicker {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

/* ============================================
   项目列表左右对齐
   ============================================ */
body.theme-premium .project-item,
body.theme-premium .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.theme-premium .project-link {
  min-width: 0;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
}

body.theme-premium .project-link-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-width: 0;
}

body.theme-premium .project-link strong {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #000 !important;
}

body.theme-premium .project-link .muted {
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #94a3b8 !important;
}

body.theme-premium .project-cover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

body.theme-premium .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.theme-premium .account-expiry-banner.urgent,
body.theme-premium .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.theme-premium .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.theme-premium .project-row-meta .project-upload-time {
  font-size: 13px !important;
  color: var(--text-secondary) !important;
}

body.theme-premium .project-row-meta .status-pill {
  font-size: 13px !important;
  padding: 4px 14px !important;
}

body.theme-premium .project-row-meta > span:last-child {
  font-size: 12px !important;
  color: var(--text-muted) !important;
}

body.theme-premium .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.theme-premium .project-table-head,
body.theme-premium .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.theme-premium .project-table-head span,
body.theme-premium .project-list-head span {
  text-align: left !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

body.theme-premium .project-table-head span:nth-child(2),
body.theme-premium .project-list-head span:nth-child(2) {
  text-align: center !important;
}

body.theme-premium .project-table-head span:nth-child(3),
body.theme-premium .project-list-head span:nth-child(3) {
  text-align: right !important;
}

/* ============================================
   上传区域强制往右拉长填满
   ============================================ */
body.theme-premium .upload-form-layout {
  width: 100% !important;
  max-width: 100% !important;
}

body.theme-premium .upload-form-layout .dropzone {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  box-sizing: border-box !important;
}

body.theme-premium .upload-form-layout .dropzone > div {
  width: 100% !important;
  text-align: center !important;
}

body.theme-premium .upload-form-layout .primary {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ============================================
   项目列表操作按钮往右拉长到边距
   ============================================ */
body.theme-premium .project-item,
body.theme-premium .project-table-row {
  grid-template-columns: 32px minmax(0, 1fr) auto minmax(0, 1fr) !important;
}

body.theme-premium .project-row-actions {
  justify-content: flex-end !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* 表头同步对齐 */
body.theme-premium .project-table-head,
body.theme-premium .project-list-head {
  grid-template-columns: 32px minmax(0, 1fr) auto minmax(0, 1fr) !important;
}

/* 批量操作栏 */
body.theme-premium .project-bulk-bar {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

body.theme-premium .project-select-all {
  color: #cbd5e1 !important;
}

body.theme-premium #projectSelectionStatus {
  color: #94a3b8 !important;
}

body.theme-premium .project-table-head span:nth-child(3),
body.theme-premium .project-list-head span:nth-child(3) {
  text-align: right !important;
  width: 100% !important;
}

/* ============================================
   上传标题强制居中
   ============================================ */
body.theme-premium .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.theme-premium .upload-primary-panel .section-heading .card-kicker {
  text-align: center !important;
  width: 100% !important;
}

body.theme-premium .upload-primary-panel .section-heading h2 {
  text-align: center !important;
  width: 100% !important;
  margin: 0 auto !important;
}

/* ============================================
   顶部头部区域左右内边距调整
   ============================================ */
body.theme-premium .workspace-header {
  padding-left: 60px !important;
  padding-right: 60px !important;
  padding-top: 28px !important;
  padding-bottom: 28px !important;
}

body.theme-premium .workspace-title {
  margin-left: 0 !important;
}

body.theme-premium .workspace-actions {
  margin-right: 0 !important;
}

/* ============================================
   顶部头部背景颜色统一为青色
   ============================================ */
body.theme-premium .workspace-header {
  background: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  backdrop-filter: none !important;
}

/* ============================================
   顶部头部宽度和下面内容对齐
   ============================================ */
body.theme-premium .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.theme-premium .workspace-actions {
  align-items: center !important;
  display: flex !important;
  gap: 12px !important;
}

body.theme-premium .workspace-actions button,
body.theme-premium .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.theme-premium .viewer-badge {
  display: none !important;
}

/* ============================================
   管理后台顶部头部背景统一为青色 + 对齐
   ============================================ */
body.theme-premium .ops-topbar,
body.theme-premium .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.theme-premium .ops-topbar .eyebrow,
body.theme-premium .admin-topbar .eyebrow {
  color: var(--accent) !important;
}

body.theme-premium .ops-topbar h2,
body.theme-premium .admin-topbar h2 {
  color: var(--text-primary) !important;
}

body.theme-premium .ops-topbar .auth-actions button,
body.theme-premium .admin-topbar .auth-actions button {
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  background: var(--bg-tertiary) !important;
}

/* ============================================
   板件信息面板往左移动对齐工具栏
   ============================================ */
body.theme-premium .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.theme-premium .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.theme-premium .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.theme-premium .admin-create-drawer summary::-webkit-details-marker {
  display: none !important;
}

body.theme-premium .admin-create-form {
  background: transparent !important;
  padding-top: 16px !important;
}

body.theme-premium .admin-create-form .field span {
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body.theme-premium .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.theme-premium .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.theme-premium .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.theme-premium.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.theme-premium.viewer-page .ref-side-toolbar button {
  background: rgba(0, 0, 0, 0.9) !important;
  color: #ffffff !important;
}

/* =========================================================
   移动端覆盖 - 去黑背景 + 米黄按钮 + 蓝色图标
   写在主题CSS末尾，确保最高优先级
   ========================================================= */
@media (max-width: 768px) {
  /* 顶部工具栏 */
  .ref-top-toolbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    gap: 6px !important;
  }
  .ref-top-toolbar button {
    background: #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;
  }
  .ref-top-toolbar button.active {
    background: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }

  /* 右侧工具栏 - 米黄圆形按钮 */
  .ref-side-toolbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    gap: 8px !important;
  }
  .ref-side-toolbar button {
    background: #f5f0e1 !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !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;
  }
  .ref-side-toolbar button svg,
  .ref-side-toolbar button .tool-icon svg {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  .ref-side-toolbar button svg path,
  .ref-side-toolbar button .tool-icon svg path {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  .ref-side-toolbar button .tool-label {
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
  }
  .ref-side-toolbar button.active {
    background: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #1677ff !important;
  }
  .ref-side-toolbar button.active svg,
  .ref-side-toolbar button.active .tool-icon svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }
  .ref-side-toolbar button.active svg path,
  .ref-side-toolbar button.active .tool-icon svg path {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }

  /* 底部工具栏 */
  .ref-bottom-toolbar {
    background: 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;
  }
  .ref-bottom-toolbar button {
    background: transparent !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  .ref-bottom-toolbar button.active {
    background: rgba(22, 119, 255, 0.12) !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
  }

  /* 柜体列表条 */
  .cabinet-strip {
    background: 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;
  }
  .cabinet-strip button {
    background: transparent !important;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    border: 1px solid transparent !important;
    text-shadow: none !important;
  }
  .cabinet-strip button.active {
    background: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* 板件信息面板 */
  .board-info-panel,
  .board-lookup-panel,
  .detail-dialog {
    background: 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;
  }
  .board-info-panel * {
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    text-shadow: none !important;
  }

  /* 3D查看器背景 */
  .cad-viewer {
    background: #f5f0e1 !important;
  }

  /* 去文字阴影 */
  .ref-top-toolbar *,
  .ref-side-toolbar *,
  .ref-bottom-toolbar * {
    text-shadow: none !important;
  }
}

/* =========================================================
   终极覆盖 - body.theme-premium 前缀 + !important
   写在主题CSS最末尾，特异性最高
   ========================================================= */
@media (max-width: 768px) {
  html body.theme-premium .ref-top-toolbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  html 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;
    text-shadow: none !important;
  }
  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;
  }

  html body.theme-premium .ref-side-toolbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  html body.theme-premium .ref-side-toolbar button {
    background: #f5f0e1 !important;
    background-color: #f5f0e1 !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important;
    text-shadow: none !important;
  }
  html body.theme-premium .ref-side-toolbar button svg,
  html body.theme-premium .ref-side-toolbar button svg path {
    fill: #1677ff !important;
    stroke: #1677ff !important;
  }
  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;
  }
  html body.theme-premium .ref-side-toolbar button.active svg,
  html body.theme-premium .ref-side-toolbar button.active svg path {
    fill: #ffffff !important;
    stroke: #ffffff !important;
  }

  html body.theme-premium .ref-bottom-toolbar {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: none !important;
  }
  html body.theme-premium .ref-bottom-toolbar button {
    background: transparent !important;
    background-color: transparent !important;
    color: #1677ff !important;
    -webkit-text-fill-color: #1677ff !important;
    text-shadow: none !important;
  }
  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.theme-premium .cabinet-strip {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: none !important;
  }
  html body.theme-premium .cabinet-strip button {
    background: transparent !important;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    text-shadow: none !important;
  }
  html body.theme-premium .cabinet-strip button.active {
    background: #1677ff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  html body.theme-premium .board-info-panel,
  html body.theme-premium .board-lookup-panel,
  html body.theme-premium .detail-dialog {
    background: rgba(255, 255, 255, 0.96) !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    color: #333333 !important;
    backdrop-filter: none !important;
  }

  html body.theme-premium .cad-viewer {
    background: #f5f0e1 !important;
    background-color: #f5f0e1 !important;
  }

  html body.theme-premium {
    background: #f5f0e1 !important;
    background-color: #f5f0e1 !important;
  }
}
