/* ========== 全局变量与基础样式 ========== */
:root {
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f2f5;
  --bg-card: #ffffff;
  --bg-input: #f5f7fa;
  --bg-hover: #e8f5ee;

  --green-primary: #21b573;
  --green-light: #3cc98a;
  --green-dark: #1a9e5e;
  --green-glow: rgba(33, 181, 115, 0.12);

  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;

  --border-color: #e5e7eb;
  --border-light: #f0f2f5;

  --success: #21b573;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--green-primary);
  text-decoration: none;
}

a:hover {
  color: var(--green-light);
}

/* ========== 登录页 ========== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #e8f5ee 0%, #f5f7fa 50%, #e0f2e9 100%);
}

.login-container {
  width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow);
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  margin-bottom: 16px;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.login-form input:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.login-form input::placeholder {
  color: var(--text-muted);
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
}

.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--green-primary), var(--green-dark));
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 4px;
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--green-light), var(--green-primary));
  box-shadow: 0 4px 15px var(--green-glow);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== 验证码 ========== */
.captcha-group {
  margin-bottom: 20px;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-row input {
  flex: 1;
  width: auto;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.captcha-row input:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.captcha-img {
  flex-shrink: 0;
  width: 120px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: #f0f4ff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-img:hover {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 2px var(--green-glow);
}

.captcha-img svg {
  display: block;
  width: 100%;
  height: 100%;
}

.captcha-refresh {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.captcha-refresh:hover {
  color: var(--green-primary);
  border-color: var(--green-primary);
  background: var(--green-glow);
}

/* ========== 主应用框架 ========== */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* 顶部导航栏 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  z-index: 100;
}

.top-bar-left {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.top-bar-left .logo-icon {
  width: auto;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.top-bar-left .logo-icon img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.logo-sub {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 8px;
  border-left: 1px solid var(--border-color);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-link {
  background: none;
  border: none;
  color: var(--green-primary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-link:hover {
  color: var(--green-light);
  background: var(--green-glow);
}

.btn-logout {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

/* 通知铃铛 */
.notification-bell {
  position: relative;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}
.notification-bell:hover { color: var(--green-primary); }
.notification-bell .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 100;
  display: none;
}
.notification-dropdown.show { display: block; }
.notification-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: default;
  font-size: 13px;
}
.notification-item:hover { background: var(--bg-tertiary); }
.notification-item .notif-title { font-weight: 500; color: var(--text-primary); }
.notification-item .notif-msg { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.notification-item .notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notification-item.unread { background: rgba(33, 181, 115, 0.06); }
.notification-item.unread .notif-title { color: var(--green-primary); }
.notification-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.notification-header { padding: 10px 14px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.notification-header .mark-read { color: var(--green-primary); cursor: pointer; font-size: 12px; }

/* 主体区域 */
.main-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 左侧导航 */
.sidebar {
  width: 220px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-tabs {
  flex: 1;
  padding: 12px 0;
}

.sidebar-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  font-size: 14px;
}

.sidebar-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-tab.active {
  background: var(--green-glow);
  color: var(--green-primary);
  border-left-color: var(--green-primary);
}

.sidebar-tab svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 20px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

/* 内容区域 */
.content-area {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  padding: 32px 40px;
  background: var(--bg-primary);
  min-width: 0;
}

.content-panel {
  display: none;
}

.content-panel.active {
  display: block;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.panel-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0;
}

.panel-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========== 表单样式 ========== */
.partner-form {
  max-width: 820px;
}

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--green-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  flex-shrink: 0;
}

.section-title h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.required {
  color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 2px var(--green-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* 文件上传区域 */
.upload-area {
  margin-top: 8px;
}

.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-input);
}

.upload-zone:hover {
  border-color: var(--green-primary);
  background: var(--green-glow);
}

.upload-zone svg {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.upload-zone p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.upload-zone span {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.upload-item-name {
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-item-name svg {
  color: var(--green-primary);
  flex-shrink: 0;
}

.upload-item-size {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
}

.upload-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.upload-item-remove:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* 提交按钮区域 */
.form-actions {
  text-align: center;
  padding: 24px 0;
}

.form-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border-left: 3px solid var(--green-primary);
}

.form-notice svg {
  margin-top: 2px;
  flex-shrink: 0;
}

.btn-submit {
  padding: 14px 60px;
  background: linear-gradient(135deg, var(--green-primary), var(--green-dark));
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 4px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--green-light), var(--green-primary));
  box-shadow: 0 6px 25px var(--green-glow);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ========== 权限查询 ========== */
.query-area {
  max-width: 700px;
}

.query-form {
  margin-bottom: 28px;
}

.query-input-group {
  display: flex;
  gap: 12px;
}

.query-input {
  flex: 1;
  padding: 13px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 15px;
  transition: var(--transition);
}

.query-input:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 2px var(--green-glow);
}

.query-input::placeholder {
  color: var(--text-muted);
}

.btn-query {
  padding: 13px 28px;
  background: var(--green-primary);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 2px;
  white-space: nowrap;
}

.btn-query:hover {
  background: var(--green-light);
}

.btn-primary {
  padding: 8px 18px;
  background: var(--green-primary);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--green-light);
}

.btn-cancel {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-cancel:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* 查询结果卡片 */
.query-result {
  margin-top: 20px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.result-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.result-header h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.result-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.result-body {
  padding: 24px;
}

.rights-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.right-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.right-item.granted {
  border-color: var(--green-primary);
  background: rgba(33, 181, 115, 0.06);
}

.right-item-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.right-item-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.right-item-status.granted {
  color: var(--success);
}

.right-item-status.not-granted {
  color: var(--text-muted);
}

.right-item-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 12px;
}

.no-result {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.no-result svg {
  margin-bottom: 12px;
  opacity: 0.4;
}

.no-result p {
  font-size: 14px;
}

/* ========== 数据表格 ========== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table th {
  text-align: center;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  text-align: center;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

/* ID列左对齐 */
.data-table th:first-child,
.data-table td:first-child {
  text-align: left !important;
  white-space: nowrap;
}
.data-table td:nth-child(2) { text-align: center; }

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background: var(--green-glow);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: rgba(33, 181, 115, 0.12);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.badge-info {
  background: rgba(59, 130, 246, 0.12);
  color: var(--info);
}

.badge-muted {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  margin-right: 6px;
  transition: var(--transition);
}

.btn-sm:hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
}

.btn-sm-success {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--success);
  border-radius: 4px;
  background: rgba(33, 181, 115, 0.08);
  color: var(--success);
  cursor: pointer;
  margin-right: 6px;
  transition: var(--transition);
}

.btn-sm-success:hover {
  background: rgba(33, 181, 115, 0.15);
}

.btn-sm-danger {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--danger);
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  cursor: pointer;
  margin-right: 6px;
  transition: var(--transition);
}

.btn-sm-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* ========== 弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

#certModal .modal-box {
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-box .form-group {
  margin-bottom: 16px;
}

.modal-box .form-group label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

.modal-box .form-group input,
.modal-box .form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
}

.modal-box .form-group input:focus,
.modal-box .form-group select:focus {
  outline: none;
  border-color: var(--green-primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.modal-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
}

/* ========== 确认弹窗 ========== */
.modal-confirm {
  width: 400px;
}

.modal-body {
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.8;
}

.modal-body strong {
  color: var(--green-primary);
}

.btn-danger {
  padding: 8px 18px;
  background: var(--danger);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover {
  background: #f87171;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 2000;
  animation: toastIn 0.3s ease;
  box-shadow: var(--shadow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-success {
  background: rgba(33, 181, 115, 0.9);
  color: #fff;
}

.toast-error {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.toast-info {
  background: rgba(59, 130, 246, 0.9);
  color: #fff;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ========== 手机端卡片列表组件 (默认隐藏) ========== */
.mobile-card-list { display: none; }
.mobile-card-item {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: var(--transition);
}
.mobile-card-item:active { transform: scale(0.98); }
.mobile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  gap: 8px;
}
.mobile-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-card-body {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.mobile-card-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-card-field.full-width {
  grid-column: 1 / -1;
}
.mobile-card-label {
  font-size: 11px;
  color: var(--text-muted);
}
.mobile-card-value {
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.4;
}
.mobile-card-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-tertiary);
}
.mobile-card-footer button,
.mobile-card-footer a {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
  text-align: center;
}
.mobile-card-footer .btn-edit {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.mobile-card-footer .btn-edit:active { background: var(--bg-tertiary); }
.mobile-card-footer .btn-delete {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.mobile-card-footer .btn-delete:active { background: rgba(239, 68, 68, 0.15); }
.mobile-card-footer .btn-primary-m {
  background: var(--green-primary);
  color: #fff;
}
.mobile-card-footer .btn-primary-m:active { background: var(--green-dark); }

/* 手机端空状态 */
.mobile-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 手机端底部导航栏 */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}
.mobile-bottom-nav-item.active {
  color: var(--green-primary);
}
.mobile-bottom-nav-item svg {
  width: 22px;
  height: 22px;
}

/* 手机端顶部标题栏 */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}
.mobile-header-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 手机端菜单遮罩 */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}
.mobile-menu-overlay.show { display: block; }
.mobile-menu-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: var(--bg-card);
  padding: 16px 0;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.mobile-menu-overlay.show .mobile-menu-panel {
  transform: translateX(0);
}
.mobile-menu-header {
  padding: 8px 16px 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}
.mobile-menu-header .logo-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
}
.mobile-menu-header .logo-text {
  font-size: 15px;
  font-weight: 600;
}
.mobile-menu-header .logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  border-left: none;
  padding-left: 0;
  display: block;
  margin-top: 2px;
}
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.mobile-menu-item:hover,
.mobile-menu-item.active {
  background: var(--green-glow);
  color: var(--green-primary);
  border-left-color: var(--green-primary);
}
.mobile-menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.mobile-menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 8px 16px;
}
.mobile-menu-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== 产品多选区域 ========== */
.product-checkbox-group {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-input);
  max-height: 240px;
  overflow-y: auto;
}
.product-category-block {
  margin-bottom: 12px;
}
.product-category-block:last-child {
  margin-bottom: 0;
}
.product-category-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-primary);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}
.product-checkbox-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}
@media (min-width: 640px) {
  .product-checkbox-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
.product-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  transition: var(--transition);
  min-height: 36px;
  line-height: 1.4;
}
.product-checkbox-item:hover {
  background: var(--green-glow);
}
.product-checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: var(--green-primary);
  cursor: pointer;
  margin: 0;
}
.product-checkbox-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 表格售卖产品列 */
.opp-products-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
  line-height: 1.5;
  text-align: left;
}
@media (max-width: 1024px) {
  .opp-products-cell {
    max-width: 120px;
  }
}

/* 移动端卡片售卖产品 */
.mobile-card-value.opp-products {
  word-break: break-word;
  line-height: 1.5;
}
.mobile-search-bar {
  display: none;
  margin-bottom: 12px;
}
.mobile-search-bar .search-bar {
  margin-bottom: 0;
}
.mobile-search-bar .search-bar input {
  max-width: 100%;
  font-size: 14px;
  padding: 10px 12px;
}
.mobile-search-bar .search-bar button {
  padding: 10px 16px;
  font-size: 14px;
  min-height: 44px;
}

/* 手机端分页 */
.mobile-pagination {
  display: none;
  margin-top: 12px;
}
.mobile-pagination .pagination-bar {
  justify-content: center;
  gap: 8px;
}
.mobile-pagination .pagination-bar button {
  padding: 8px 16px;
  font-size: 13px;
  min-height: 44px;
  min-width: 44px;
}
.mobile-pagination .page-info {
  width: 100%;
  text-align: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* 手机端操作栏 */
.mobile-actions-bar {
  display: none;
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  z-index: 90;
  gap: 8px;
}
.mobile-actions-bar button,
.mobile-actions-bar a {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

/* 手机端状态徽章 */
.mobile-card-header .badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* 手机端表单优化 */
@media (max-width: 768px) {
  .app-container { min-height: 100dvh; height: auto; padding-bottom: 60px; overflow: visible; }
  .top-bar { display: none; }
  .mobile-header { display: flex; }
  .sidebar { display: none; }
  .main-body { flex-direction: column; overflow: visible; }
  .content-area { padding: 12px; overflow-x: hidden; overflow-y: auto; min-width: 0; }
  .content-panel { width: 100%; }

  .panel-header { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
  .panel-header > div { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px !important; width: 100%; }
  .panel-header h2 { font-size: 18px; }
  .panel-header p { font-size: 12px; line-height: 1.4; }
  .panel-header .btn-primary,
  .panel-header .btn-cancel { flex: 1; min-width: 100px; font-size: 13px; padding: 10px 14px; min-height: 44px; }

  .data-table { display: none; }
  .mobile-card-list { display: block; }
  .mobile-search-bar { display: block; }
  .mobile-pagination { display: block; }
  .mobile-bottom-nav { display: flex; }
  .mobile-actions-bar { display: flex; }

  .form-section { padding: 16px; margin-bottom: 16px; border-radius: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .partner-form { max-width: 100%; }
  .section-title h3 { font-size: 15px; }
  .form-group input,
  .form-group select,
  .form-group textarea { font-size: 16px; padding: 12px 14px; }
  .form-actions { padding: 16px 0; }
  .btn-submit { width: 100%; padding: 14px; font-size: 16px; letter-spacing: 2px; }
  .form-notice { font-size: 12px; }

  .query-input-group { flex-direction: column; gap: 8px; }
  .query-input { width: 100%; font-size: 16px; padding: 12px; }
  .btn-query { width: 100%; padding: 12px; font-size: 16px; }

  .modal-box { width: 96vw; max-width: 96vw; max-height: 90dvh; margin: 0 auto; padding: 20px; border-radius: 16px; overflow-y: auto; }
  .modal-header h3 { font-size: 17px; }
  .modal-actions { flex-wrap: nowrap; gap: 10px; margin-top: 16px; }
  .modal-actions button { flex: 1; padding: 12px; font-size: 15px; min-height: 44px; }
  .modal-box .form-group input,
  .modal-box .form-group select { font-size: 16px; padding: 12px 14px; }

  .login-container { width: 90vw; padding: 28px 20px; }
  .login-header h1 { font-size: 18px; }
  .login-subtitle { font-size: 12px; }
  .btn-login { padding: 14px; font-size: 15px; letter-spacing: 2px; }
  .captcha-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .captcha-img { width: 100%; height: 50px; }

  .toast { left: 5%; right: 5%; max-width: 90vw; font-size: 14px; padding: 12px 20px; white-space: normal; text-align: center; }

  .backup-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .backup-item-actions { width: 100%; justify-content: flex-end; }
  .backup-sections { flex-direction: column; }

  .sub-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .sub-tabs::-webkit-scrollbar { display: none; }
  .sub-tab-card { flex-shrink: 0; padding: 10px 16px; font-size: 13px; }

  .product-auth-grid { grid-template-columns: 1fr; }
  .product-cat-block { margin-bottom: 8px; }
  .right-item { flex-direction: column; align-items: flex-start; gap: 4px; }

  .perm-card { padding: 12px !important; }
  .perm-card .section-title { margin-bottom: 8px; padding-bottom: 6px; }
  .perm-card > div:last-child { flex-direction: column; gap: 8px; }
  #permModules { grid-template-columns: 1fr !important; }
  #rolePermModules { grid-template-columns: 1fr !important; }
  #roleDataPerms { grid-template-columns: 1fr !important; }

  .search-bar { margin-bottom: 12px; }
  .search-bar input { max-width: 100%; flex: 1; font-size: 14px; padding: 10px 12px; }
  .search-bar button { padding: 10px 16px; font-size: 14px; min-height: 44px; }
  .pagination-bar { justify-content: center; gap: 8px; }
  .pagination-bar button { padding: 8px 14px; font-size: 13px; min-height: 44px; min-width: 44px; }
  .pagination-bar .page-info { width: 100%; text-align: center; margin-bottom: 8px; margin-right: 0; }

  #rightsSummary { margin-bottom: 12px; }
  #rightsSummaryBody { width: 100%; table-layout: fixed; }
  #rightsSummaryBody td:first-child { width: 100px; min-width: 100px; white-space: nowrap; }
  #rightsSummaryBody td:last-child { white-space: normal; }
  .cat-header { font-size: 12px !important; padding: 8px 12px !important; }
  #rightsTable td { padding: 8px 4px; }

  /* 弹窗全屏优化 */
  #certModal .modal-box { flex-direction: column !important; gap: 12px; }
  #certModal .modal-box > div:first-child { flex: none !important; width: 100% !important; }
  #certModal .modal-box > div:last-child { flex: none !important; width: 100% !important; }
  #certModalPreview { width: 100% !important; max-width: 320px; }
  #certModalPreview img { width: 100%; height: auto; }

  /* 通知下拉 */
  .notification-dropdown { width: 94vw; right: 3vw; left: 3vw; max-height: 70vh; }

  /* 按钮通用优化 */
  .btn-sm, .btn-sm-success, .btn-sm-danger, .btn-primary, .btn-cancel, .btn-danger {
    min-height: 36px;
    padding: 8px 14px;
  }
  .btn-sm, .btn-sm-success, .btn-sm-danger { font-size: 13px; }
}

/* 超小屏手机优化 */
@media (max-width: 380px) {
  .mobile-card-body { grid-template-columns: 1fr; }
  .mobile-card-footer button { font-size: 13px; padding: 8px 12px; }
  .mobile-bottom-nav-item { font-size: 9px; }
  .mobile-bottom-nav-item svg { width: 20px; height: 20px; }
  .panel-header h2 { font-size: 16px; }
  .mobile-header-title { font-size: 15px; }
}

/* 平板竖屏及以下 */
@media (max-width: 1024px) {
  .main-body { flex-direction: column; }
  .sidebar { width: 100%; flex-shrink: 0; padding: 12px; }
  .sidebar-tabs { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .sidebar-tab { flex-direction: column; gap: 4px; width: auto; padding: 10px 14px; font-size: 12px; border-radius: var(--radius); }
  .sidebar-tab span { font-size: 11px; }
  .sidebar-footer { display: none; }
  .content-area { padding: 16px; }
  .panel-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .panel-header>div { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .panel-header h2 { font-size: 18px; }
  .panel-header p { font-size: 12px; }
  .partner-form { max-width: 100%; }
  .form-section { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .data-table { font-size: 11px; }
  .data-table th, .data-table td { padding: 6px 8px; }
  .btn-sm, .btn-sm-success, .btn-sm-danger { padding: 3px 8px; font-size: 10px; }
  .query-input-group { flex-direction: column; }
  .query-input { width: 100%; }
  .backup-sections { flex-direction: column; }
  .result-card { padding: 12px; }
  .rights-list { gap: 8px; }
  .right-item { padding: 10px; }
  .perm-controls { flex-direction: column; align-items: flex-start !important; }
  #permModules { grid-template-columns: 1fr !important; }
}

/* 手机竖屏 */
@media (max-width: 640px) {
  .app-container { min-height: 100dvh; }
  .top-bar { flex-direction: column; gap: 8px; padding: 12px 16px; }
  .top-bar-left { gap: 8px; }
  .top-bar-left .logo-icon { width: 28px; height: 28px; }
  .top-bar-left .logo-text { font-size: 14px; }
  .top-bar-left .logo-sub { display: none; }
  .top-bar-right { flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .top-bar-right .btn-link, .top-bar-right .btn-logout { font-size: 12px; padding: 4px 8px; }
  .user-info { font-size: 12px; }

  .main-body { flex-direction: column; }
  .sidebar { width: 100%; padding: 8px; }
  .sidebar-tabs { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .sidebar-tab { flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; width: auto; min-width: 60px; border-radius: var(--radius); }
  .sidebar-tab svg { width: 16px; height: 16px; }
  .sidebar-tab span { font-size: 10px; display: block; text-align: center; }

  .content-area { padding: 12px; }
  .content-panel { width: 100%; }

  .panel-header { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 16px; }
  .panel-header > div { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px !important; }
  .panel-header h2 { font-size: 16px; }
  .panel-header p { font-size: 11px; line-height: 1.4; }

  .form-section { padding: 12px; margin-bottom: 12px; }
  .section-title { gap: 8px; margin-bottom: 12px; padding-bottom: 8px; }
  .section-title h3 { font-size: 14px; }
  .section-number { width: 24px; height: 24px; font-size: 12px; }
  .form-group label { font-size: 12px; }
  .form-group input, .form-group select, .form-group textarea { font-size: 14px; padding: 8px 10px; }
  .form-actions { padding: 12px; }
  .btn-submit { width: 100%; padding: 12px; font-size: 14px; }
  .form-notice { font-size: 11px; }
  .partner-form { max-width: 100%; }

  .query-input-group { flex-direction: column; gap: 8px; }
  .query-input { width: 100%; font-size: 14px; padding: 10px; }
  .btn-query { width: 100%; padding: 10px; }

  .data-table { width: 100%; font-size: 10px; -webkit-overflow-scrolling: touch; }
  .data-table th, .data-table td { padding: 4px 6px; min-width: 50px; }
  .content-panel { overflow-x: auto; }
  #rightsSummaryBody { width: 100%; table-layout: fixed; }
#rightsSummaryBody td:first-child { width: 120px; min-width: 120px; white-space: nowrap; }
#rightsSummaryBody td:last-child { white-space: normal; }

  .modal-box { width: 95vw; max-width: 95vw; max-height: 90dvh; margin: 20px; padding: 16px; }
  #certModal .modal-box { max-height: 90vh; overflow-y: auto; }
  .modal-header h3 { font-size: 16px; }
  .modal-actions { flex-wrap: wrap; gap: 8px; }
  .modal-actions button { flex: 1; min-width: 100px; }

  .login-box { width: 90vw; padding: 24px 20px; }
  .login-logo h1 { font-size: 18px; }
  .login-logo p { font-size: 11px; }
  .captcha-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .captcha-svg { width: 100%; }
  .captcha-svg img, .captcha-svg svg { max-width: 100%; height: auto; }

  .backup-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .backup-item-actions { width: 100%; justify-content: flex-end; }

  .result-header { flex-direction: column; gap: 6px; }
  .right-item { flex-direction: column; align-items: flex-start; gap: 4px; }

  .perm-card { padding: 12px !important; }
  .perm-card .section-title { margin-bottom: 8px; padding-bottom: 6px; }
  .perm-card>div:last-child { flex-direction: column; gap: 8px; }

  .toast { left: 5%; right: 5%; max-width: 90vw; font-size: 12px; padding: 10px 16px; }
  .btn-primary, .btn-danger, .btn-cancel { font-size: 13px; padding: 8px 16px; }
  .cat-header { font-size: 11px !important; padding: 6px 4px !important; }
  #rightsTable td { padding: 8px 4px; }
}

/* ========== 搜索栏 ========== */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.search-bar input {
  flex: 1;
  max-width: 320px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--green-primary);
}

/* ========== 分页栏 ========== */
.pagination-bar {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.pagination-bar .page-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 8px;
}
.pagination-bar button {
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
}
.pagination-bar button:hover:not(:disabled) {
  border-color: var(--green-primary);
  color: var(--green-primary);
}
.pagination-bar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 授权徽章交互动效 */
.auth-badge { transition: all 0.2s ease; }
.auth-badge:hover { transform: scale(1.08); opacity: 0.85; }
.cat-header { position: relative; cursor: help; }
.cat-tip { display:inline-block;width:14px;height:14px;line-height:14px;border-radius:50%;background:var(--green-primary);color:#fff;font-size:10px;text-align:center;cursor:help;margin-left:2px;vertical-align:middle; }
.cat-tip:hover { background:var(--green-dark); }

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ========== 备份管理 ========== */
.backup-sections {
  max-width: 820px;
}

.backup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.backup-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.backup-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backup-item-name {
  font-size: 13px;
  color: var(--text-primary);
  font-family: monospace;
}

.backup-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

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

/* 备份管理 */
.backup-sections {
  max-width: 820px;
}

.backup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.backup-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.backup-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backup-item-name {
  font-size: 13px;
  color: var(--text-primary);
  font-family: monospace;
}

.backup-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.backup-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.backup-item-actions button {
  white-space: nowrap;
  flex-shrink: 0;
}
.product-cat-block {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.product-cat-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-primary);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}
.product-item {
  transition: background 0.15s;
}
.product-item:hover {
  background: var(--bg-hover);
  border-radius: 3px;
}
