/* 管理后台独立样式（不参与主 styles.css 版本链） */
.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e8e0d2;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.admin-tab {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  color: #8d8271;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}
.admin-tab:hover { color: #3b2f1f; }
.admin-tab.active {
  color: #8a5a2b;
  border-bottom-color: #8a5a2b;
  font-weight: 600;
}
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.admin-toolbar .button.active {
  background: #8a5a2b;
  color: #fff;
  border-color: #8a5a2b;
}
.admin-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6d6252;
}
.admin-filter select {
  font-family: inherit;
  font-size: 13px;
  color: #3b2f1f;
  background: #fff;
  border: 1px solid #d8cfbd;
  border-radius: 8px;
  padding: 6px 10px;
  max-width: 220px;
}
.admin-filter select:focus {
  outline: none;
  border-color: #8a5a2b;
}
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid #ece5d8;
  border-radius: 10px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  background: #f8f4ec;
  text-align: left;
  padding: 10px 12px;
  color: #6d6252;
  font-weight: 600;
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px;
  border-top: 1px solid #f0eadf;
  color: #3b2f1f;
  vertical-align: middle;
}
.admin-table tbody tr:hover { background: #fdfaf4; }
.admin-empty {
  text-align: center;
  color: #a99e8c;
  padding: 26px 12px;
}
.admin-code {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 1px;
}
.admin-search {
  font-family: inherit;
  font-size: 13px;
  color: #3b2f1f;
  background: #fff;
  border: 1px solid #d8cfbd;
  border-radius: 8px;
  padding: 6px 10px;
  width: 280px;
}
.admin-search:focus {
  outline: none;
  border-color: #8a5a2b;
}
.admin-actions { white-space: nowrap; }
.admin-actions .button { margin-right: 6px; padding: 5px 10px; font-size: 12px; }
.admin-dim { color: #b5aa97; font-size: 12px; }
.admin-form {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-form-message {
  font-size: 13px;
  color: #8d8271;
  line-height: 1.6;
  margin: 0;
}
.admin-form-message.error { color: #b3382c; }
.admin-form-message.ok { color: #2f7d4f; }

/* ── 用量三层树（用户 → 日期 → 功能） ── */
.usage-row[data-key] { cursor: pointer; }
.usage-level-0 { background: #fbf7ef; }
.usage-level-1 { background: #fdfaf4; }
.usage-row:hover,
.usage-row[data-key]:hover { background: #f6efe3; }
.usage-name { white-space: nowrap; }
.usage-level-0 > .usage-name { font-weight: 600; color: #3b2f1f; }
.usage-level-1 > .usage-name { color: #5d5242; }
.usage-caret {
  display: inline-block;
  width: 16px;
  font-size: 11px;
  color: #b5aa97;
  text-align: center;
  user-select: none;
}
.usage-caret-empty { visibility: hidden; }
.usage-meta { white-space: nowrap; color: #6d6252; }
.usage-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── 模型单价表（服务设置） ── */
#priceRows td { white-space: nowrap; }
.price-provider,
.price-model,
.price-input {
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  color: #3b2f1f;
  background: #fff;
  border: 1px solid #d8cfbd;
  border-radius: 6px;
}
.price-provider { width: 108px; }
.price-model { width: 220px; }
.price-input { width: 84px; }
.price-input-fold { width: 60px; }
.price-input:focus,
.price-model:focus,
.price-provider:focus { outline: none; border-color: #8a5a2b; }
.price-remove {
  background: none;
  border: none;
  color: #b3382c;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 4px;
}

/* ── 用量清理面板 ── */
.button-danger {
  background: #b3382c;
  border-color: #b3382c;
  color: #fff;
}
.button-danger:hover { background: #962a20; border-color: #962a20; }
.admin-clear {
  border-top: 1px dashed #e0d7c6;
  margin-top: 14px;
  padding-top: 12px;
}
.admin-clear-hint {
  font-size: 12px;
  color: #8d8271;
  line-height: 1.7;
  margin: 0 0 4px;
}
