/* ========================================
   黑金简约风格 - Black & Gold Minimal
   ======================================== */

:root {
  /* 基础黑色系 */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1a1a1a;
  --bg-input: #0d0d0d;

  /* 金色系 */
  --gold-light: #ffd700;
  --gold-primary: #d4af37;
  --gold-dark: #b8860b;
  --gold-muted: rgba(212, 175, 55, 0.6);
  --gold-subtle: rgba(212, 175, 55, 0.15);
  --gold-glow: rgba(212, 175, 55, 0.4);

  /* 文字颜色 */
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --text-gold: #d4af37;

  /* 边框 */
  --border-subtle: rgba(212, 175, 55, 0.12);
  --border-gold: rgba(212, 175, 55, 0.3);
  --border-gold-hover: rgba(212, 175, 55, 0.5);

  /* 功能色 */
  --danger: #e74c3c;
  --danger-subtle: rgba(231, 76, 60, 0.15);
  --success: #2ecc71;
  --success-subtle: rgba(46, 204, 113, 0.15);

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.15);
  --shadow-gold-hover: 0 8px 30px rgba(212, 175, 55, 0.25);

  /* 过渡 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 背景渐变装饰 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      ellipse 80% 50% at 20% -10%,
      rgba(212, 175, 55, 0.08),
      transparent 50%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 100%,
      rgba(212, 175, 55, 0.05),
      transparent 50%
    ),
    radial-gradient(
      ellipse 100% 60% at 50% 50%,
      rgba(212, 175, 55, 0.02),
      transparent 70%
    );
  pointer-events: none;
  z-index: -1;
}

/* ========================================
   登录页面样式
   ======================================== */

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.login-screen::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 480px;
}

.auth-tab {
  flex: 1;
  padding: 14px 24px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition-normal);
  border-radius: var(--radius-md);
}

.auth-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

.auth-tab.is-active {
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.2),
    rgba(212, 175, 55, 0.05)
  );
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
}

.login-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold-primary),
    var(--gold-light),
    var(--gold-primary),
    transparent
  );
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand .brand__title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

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

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* ========================================
   表单元素
   ======================================== */

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

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 15px;
  transition: all var(--transition-fast);
  outline: none;
}

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

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--border-gold);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.field textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.field--span2 {
  grid-column: 1 / -1;
}

/* ========================================
   按钮
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  outline: none;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  border-color: var(--gold-primary);
  color: #0a0a0a;
  box-shadow: var(--shadow-gold);
  letter-spacing: 0.5px;
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  border-color: var(--gold-light);
  box-shadow: var(--shadow-gold-hover);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-gold);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn--danger {
  background: var(--danger-subtle);
  border-color: rgba(231, 76, 60, 0.3);
  color: var(--danger);
}

.btn--danger:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: var(--danger);
}

/* ========================================
   应用外壳
   ======================================== */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========================================
   顶部导航栏
   ======================================== */

.dataset-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 16px 32px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.dataset-topbar__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.dataset-topbar__title {
  flex: 0 1 auto;
  min-width: 0;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}

.dataset-topbar__tabs {
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: stretch;
  justify-content: stretch;
  min-width: 0;
  box-sizing: border-box;
}

.dataset-topbar__tabs .nav-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.dataset-topbar__tabs .nav-btn:hover {
  border-color: var(--border-gold);
  color: var(--text-primary);
  background: rgba(212, 175, 55, 0.05);
}

.dataset-topbar__tabs .nav-btn.is-active {
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.15),
    rgba(212, 175, 55, 0.05)
  );
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
}

.dataset-topbar__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
}

/* ========================================
   主内容区
   ======================================== */

.main {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ========================================
   面板卡片
   ======================================== */

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.panel:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-lg);
}

.panel__head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(212, 175, 55, 0.02);
}

.panel__head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.panel__subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.panel__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ========================================
   表单网格
   ======================================== */

.form-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
}

/* ========================================
   表格
   ======================================== */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 0 16px;
}

/* 与「数据列表」同宽，避免 flex 子项默认 min-width:auto 撑破父级 */
.panel--table {
  min-width: 0;
  max-width: 100%;
}

.table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  /* 固定为容器宽度，详情 colspan 与列表同宽，长文本在格内换行 */
  table-layout: fixed;
  font-size: 14px;
}

.table thead th {
  text-align: left;
  padding: 14px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(212, 175, 55, 0.02);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.table tbody td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  min-width: 0;
}

.table tbody tr {
  transition: background var(--transition-fast);
}

.table tbody tr.table-row-main:hover {
  background: rgba(212, 175, 55, 0.03);
}

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

/* 固定数据行高度：内容在 .table-cell-scroll 内滚动 */
.table tbody tr.table-row-main td {
  vertical-align: top;
}

.table tbody tr.table-row-main td.table-td-detail,
.table tbody tr.table-row-main td.table-td-actions {
  vertical-align: middle;
  white-space: nowrap;
}

.table thead th:last-child {
  width: 4.75rem;
  min-width: 4.75rem;
  max-width: 5.5rem;
  text-align: center;
  vertical-align: middle;
  padding-left: 8px;
  padding-right: 14px;
}

.table tbody td.table-td-actions {
  width: 4.75rem;
  min-width: 4.75rem;
  max-width: 5.5rem;
  text-align: center;
  vertical-align: middle;
  padding-left: 8px;
  padding-right: 14px;
  box-sizing: border-box;
}

.table tbody td.table-td-actions .btn--danger {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 10px;
  transform: none;
}

.table tbody td.table-td-actions .btn--danger:hover {
  transform: translateY(-1px);
}

.table tbody td.table-td-actions .btn--danger:active {
  transform: translateY(0);
}

/* 指定关键列占比（按不同表分别控制） */
/* 问题模型：问题ID 10%，具体问题 25% */
.table[data-table-key="kb_question"] thead th.col-id,
.table[data-table-key="kb_question"] tbody td.col-id {
  width: 10%;
  min-width: 10%;
  max-width: 10%;
}

/* 表头全局 nowrap+ellipsis 会在窄列把「问题ID」裁成「问题…」，此处允许换行完整显示 */
.table[data-table-key="kb_question"] thead th.col-id {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  hyphens: none;
}

.table[data-table-key="kb_question"] thead th.col-content,
.table[data-table-key="kb_question"] tbody td.col-content {
  width: 25%;
  min-width: 25%;
  max-width: 25%;
}

/* 答案模型：ID 10%，问题 20%，具体答案 20% */
.table[data-table-key="kb_answer"] thead th.col-id,
.table[data-table-key="kb_answer"] tbody td.col-id {
  width: 10%;
  min-width: 10%;
  max-width: 10%;
}

.table[data-table-key="kb_answer"] thead th.col-question_id,
.table[data-table-key="kb_answer"] tbody td.col-question_id {
  width: 20%;
  min-width: 20%;
  max-width: 20%;
}

.table[data-table-key="kb_answer"] thead th.col-content,
.table[data-table-key="kb_answer"] tbody td.col-content {
  width: 20%;
  min-width: 20%;
  max-width: 20%;
}

/* 价值取向模型：价值取向描述 20% */
.table[data-table-key="kb_value_orientation"] thead th.col-description,
.table[data-table-key="kb_value_orientation"] tbody td.col-description {
  width: 20%;
  min-width: 20%;
  max-width: 20%;
}

.table-th-detail,
.table-td-detail {
  width: 4.25rem;
  min-width: 4.25rem;
  max-width: 5rem;
  text-align: center;
}

.btn--table-detail {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.td--scroll {
  padding-top: 12px;
  padding-bottom: 12px;
}

.table-cell-scroll {
  max-height: 4.5rem;
  min-height: 2.75rem;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding-right: 4px;
}

.table-cell-scroll:focus {
  outline: 1px solid rgba(212, 175, 55, 0.35);
  outline-offset: 2px;
}

.table-row-detail td.table-detail-cell {
  padding: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.28);
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  contain: layout;
}

.table-detail-grid {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
  gap: 10px 20px;
  padding: 16px 18px 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.table-detail-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  align-self: start;
  min-width: 0;
}

.table-detail-value {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

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

.truncate {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* 表格单元格上的 .truncate：禁止 display:block 破坏表格布局，改为可换行展示 */
.table tbody td.truncate {
  display: table-cell;
  max-width: min(32rem, 70vw);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  overflow-wrap: break-word;
  vertical-align: top;
}

/* ========================================
   布尔值药丸
   ======================================== */

.bool-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
}

.bool-pill.is-true {
  background: var(--success-subtle);
  border-color: rgba(46, 204, 113, 0.3);
  color: var(--success);
}

.bool-pill.is-false {
  background: var(--danger-subtle);
  border-color: rgba(231, 76, 60, 0.3);
  color: var(--danger);
}

.bool-pill--toggle {
  cursor: pointer;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.bool-pill--toggle:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.35);
  outline-offset: 2px;
}

.bool-pill--toggle:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ========================================
   搜索框
   ======================================== */
.search-bar {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-bar__input {
  height: 38px;
  padding: 0 36px 0 14px;
  border: 1px solid rgba(233, 238, 245, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(233, 238, 245, 0.9);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
  width: 200px;
}

.search-bar__input::placeholder {
  color: rgba(233, 238, 245, 0.35);
}

.search-bar__input:focus {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.search-bar__clear {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(233, 238, 245, 0.5);
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
}

.search-bar__clear:hover {
  color: rgba(233, 238, 245, 0.9);
  background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   分页
   ======================================== */

.pagination {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
}

.pagination__info {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
}

/* ========================================
   药丸选择器
   ======================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
}

.pill__select {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

/* ========================================
   提示和错误框
   ======================================== */

.hint {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  padding: 16px;
}

.error-box {
  background: var(--danger-subtle);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.error-box__title {
  font-weight: 700;
  color: var(--danger);
  font-size: 14px;
}

.error-box__pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 0;
  color: rgba(231, 76, 60, 0.8);
  font-size: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
}

.success-box {
  background: var(--success-subtle);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-top: 16px;
}

.success-box__title {
  font-weight: 700;
  color: var(--success);
  font-size: 14px;
}

.success-box__sub {
  margin-top: 6px;
  color: rgba(46, 204, 113, 0.8);
  font-size: 13px;
}

/* ========================================
   权限不足提示
   ======================================== */

.no-permission-box {
  width: 100%;
  max-width: 480px;
  border: 1px solid rgba(231, 76, 60, 0.3);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.no-permission-icon {
  font-size: 56px;
  margin-bottom: 20px;
  filter: grayscale(1);
  opacity: 0.8;
}

.no-permission-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 12px;
}

.no-permission-message {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.no-permission-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ========================================
   品牌标识
   ======================================== */

.brand {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
}

.brand__title {
  font-weight: 700;
  font-size: 18px;
  color: var(--gold-primary);
  letter-spacing: 1px;
}

.brand__sub {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ========================================
   水印
   ======================================== */

.watermark-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  background: transparent;
  font-size: 12px;
}

/* ========================================
   侧边栏 (兼容旧样式)
   ======================================== */

.sidebar {
  width: 100%;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(17, 17, 17, 0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}

.sidebar__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 320px;
  min-width: 280px;
  border: 1px solid var(--border-subtle);
  background: rgba(22, 22, 22, 0.5);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.sidebar__section-title {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar__footer {
  flex: 1 1 280px;
  min-width: 280px;
  align-self: end;
}

.token-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: rgba(22, 22, 22, 0.5);
}

.token-card__label {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 500;
}

.token-card__input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.token-card__input:focus {
  border-color: var(--gold-primary);
}

.token-card__row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.token-card__help {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1024px) {
  .main {
    padding: 24px 20px;
  }

  .dataset-topbar {
    padding: 16px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .dataset-topbar__head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .dataset-topbar__title {
    text-align: center;
  }

  .dataset-topbar__tabs {
    flex-wrap: wrap;
  }

  .dataset-topbar__tabs .nav-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: min(140px, 100%);
  }

  .dataset-topbar__actions {
    justify-content: center;
  }

  .login-card {
    padding: 32px 24px;
  }

  .main {
    padding: 20px 16px;
  }

  .table {
    font-size: 13px;
  }

  .table thead th,
  .table tbody td {
    padding: 12px 10px;
  }
}

@media (max-width: 480px) {
  .auth-tabs {
    flex-direction: column;
  }

  .dataset-topbar__tabs .nav-btn {
    flex: 1 1 100%;
    padding: 8px 12px;
    font-size: 13px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 13px;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ========================================
   滚动条美化
   ======================================== */

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.4);
}

/* ========================================
   选中文本样式
   ======================================== */

::selection {
  background: rgba(212, 175, 55, 0.3);
  color: var(--text-primary);
}

/* ========================================
   焦点状态 (无障碍)
   ======================================== */

:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}
