/**
 * OPC 独立系统 · AI-Native 立体视觉层
 * 黑金配色不变；玻璃分层 + Z 轴阴影 + 科技网格氛围
 * 适用：我的方案 / 我的算力 / 订阅 / 我的订单 / 创意对话
 */

html[data-opc-theme='official'],
body[data-opc-theme='official'] {
  --opc-ai-blur: 16px;
  --opc-ai-glass-bg: linear-gradient(
    155deg,
    rgba(32, 28, 24, 0.94) 0%,
    rgba(14, 12, 10, 0.9) 45%,
    rgba(6, 6, 6, 0.96) 100%
  );
  --opc-ai-glass-border: rgba(232, 195, 140, 0.24);
  --opc-ai-inner-tile-bg: linear-gradient(
    165deg,
    rgba(24, 22, 20, 0.98) 0%,
    rgba(10, 10, 10, 0.92) 100%
  );
  --opc-ai-inset-depth:
    inset 0 0 0 1px rgba(232, 195, 140, 0.2),
    inset 0 2px 20px rgba(0, 0, 0, 0.42),
    inset 0 -1px 0 rgba(255, 248, 230, 0.07);
  --opc-ai-elevated-shadow:
    inset 0 0 0 1px rgb(232, 195, 140),
    inset 0 1px 0 rgba(255, 248, 230, 0.14),
    0 4px 0 rgba(0, 0, 0, 0.35),
    0 16px 48px rgba(0, 0, 0, 0.58),
    0 0 56px rgba(232, 195, 140, 0.16);
  --opc-ai-elevated-shadow-hover:
    inset 0 0 0 1px rgb(245, 220, 180),
    inset 0 1px 0 rgba(255, 248, 230, 0.18),
    0 6px 0 rgba(0, 0, 0, 0.38),
    0 20px 56px rgba(0, 0, 0, 0.62),
    0 0 68px rgba(232, 195, 140, 0.24);
  --opc-ai-stat-glow: 0 0 28px rgba(232, 195, 140, 0.22);
}

/* —— 会员业务页：科技网格 + 顶光氛围 —— */
body[data-opc-theme='official'] .opc-theme-page--plans,
body[data-opc-theme='official'] .opc-theme-page--compute,
body[data-opc-theme='official'] .opc-theme-page--subscription,
body[data-opc-theme='official'] .opc-theme-page--orders,
body[data-opc-theme='official'] .opc-theme-page--conversation {
  position: relative;
  isolation: isolate;
}

body[data-opc-theme='official'] .opc-theme-page--plans::before,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-theme-page--compute::before,
body[data-opc-theme='official'] .opc-theme-page--subscription::before,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-theme-page--orders::before,
body[data-opc-theme='official'] .opc-theme-page--conversation::before {
  content: '';
  position: absolute;
  inset: -12px 0 0;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 88% 72% at 50% 28%, #000 12%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 88% 72% at 50% 28%, #000 12%, transparent 78%);
}

body[data-opc-theme='official'] .opc-theme-page--plans > *,
body[data-opc-theme='official'] .opc-theme-page--compute > *,
body[data-opc-theme='official'] .opc-theme-page--subscription > *,
body[data-opc-theme='official'] .opc-theme-page--orders > *,
body[data-opc-theme='official'] .opc-theme-page--conversation > * {
  position: relative;
  z-index: 1;
}

/* —— 大块外框：顶/底金光 —— */
body[data-opc-theme='official'] .opc-plans-panel::before,
body[data-opc-theme='official'] .opc-plans-panel::after,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-compute-logs-section::before,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-compute-logs-section::after,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-marketing::before,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-marketing::after,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-top::before,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-top::after,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-sub-stack::before,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-sub-stack::after,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-panel::before,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-panel::after,
body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-theme-page--orders
  .opc-orders-filters::before,
body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-theme-page--orders
  .opc-orders-filters::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  height: 1px;
  pointer-events: none;
  z-index: 3;
}

body[data-opc-theme='official'] .opc-plans-panel::before,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-compute-logs-section::before,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-marketing::before,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-top::before,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-sub-stack::before,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-panel::before,
body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-theme-page--orders
  .opc-orders-filters::before {
  top: 0;
}

body[data-opc-theme='official'] .opc-plans-panel::after,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-compute-logs-section::after,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-marketing::after,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-top::after,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-sub-stack::after,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-panel::after,
body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-theme-page--orders
  .opc-orders-filters::after {
  bottom: 0;
  left: 6%;
  right: 6%;
  height: 2px;
}

/* 大块面板立体外框 */
body[data-opc-theme='official'] .opc-plans-panel,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-compute-logs-section,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-marketing,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-subscription-top,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-sub-stack,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: none;
  border-radius: var(--opc-fig1-radius, 24px);
  -webkit-backdrop-filter: none;
}

/* 创意页：历史对话 / 使用说明（与方案卡同一套图1 外框） */
body[data-opc-theme='official'] .opc-conv-sidebar--official:not(.opc-workbench-sidebar),
body[data-opc-theme='official'] .opc-conv-guide {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: none;
  border-radius: var(--opc-fig1-radius, 24px);
  background: var(--opc-fig1-bg);
  box-shadow: var(--opc-fig1-frame-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 图1 外框：与方案卡 / tools .tools-fig1-outer-frame 同一套描边 + 光晕 */
body[data-opc-theme='official'] .opc-fig1-outer-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: none;
  border-radius: var(--opc-fig1-radius, 24px);
  background: var(--opc-fig1-bg);
  box-shadow: var(--opc-fig1-frame-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-opc-theme='official'] .opc-fig1-outer-frame::before,
body[data-opc-theme='official'] .opc-fig1-outer-frame::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  height: 1px;
  pointer-events: none;
  z-index: 2;
  background: var(--opc-fig1-edge-glow);
}

body[data-opc-theme='official'] .opc-fig1-outer-frame::before {
  top: 0;
  box-shadow: var(
    --opc-fig1-edge-glow-bloom,
    0 0 20px 3px color-mix(in srgb, var(--opc-ui-color-accent, #d1a054) 32%, transparent)
  );
}

body[data-opc-theme='official'] .opc-fig1-outer-frame::after {
  bottom: 0;
  left: 8%;
  right: 8%;
  height: 2px;
  opacity: 0.92;
  box-shadow: var(
    --opc-fig1-edge-glow-bloom-strong,
    0 0 28px 5px color-mix(in srgb, var(--opc-ui-color-accent, #d1a054) 26%, transparent)
  );
}

body[data-opc-theme='official'] .opc-fig1-outer-frame > * {
  position: relative;
  z-index: 1;
}

/* 订单筛选与表格共享紧凑圆角；主题仅通过语义色 token 切换。 */
body[data-opc-theme='official'] .opc-theme-page--orders .opc-orders-filters,
body[data-opc-theme='official'] .opc-theme-page--orders .opc-orders-table-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--opc-ui-color-border);
  border-radius: var(--opc-ui-radius-sm);
  background: var(--opc-ui-color-surface);
  -webkit-backdrop-filter: none;
}

body[data-opc-theme='official'] .opc-theme-page--orders .opc-orders-table-scroll,
body[data-opc-theme='official'] .opc-compute-logs-section .opc-member-table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  border-radius: inherit;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y pinch-zoom;
}

body[data-opc-theme='official'] .opc-compute-logs-section .opc-power-table-wrap.opc-member-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

/* 浅色订单与算力流水统一使用当前蓝色强调色，深色保留原有滚动条。 */
body[data-opc-theme='official'][data-opc-color-scheme='light'] :is(
  .opc-theme-page--orders .opc-orders-table-scroll,
  .opc-compute-logs-section .opc-member-table-scroll
) {
  scrollbar-width: thin;
  scrollbar-color: var(--opc-ui-color-accent) var(--opc-ui-color-surface-subtle);
}

body[data-opc-theme='official'][data-opc-color-scheme='light'] :is(
  .opc-theme-page--orders .opc-orders-table-scroll,
  .opc-compute-logs-section .opc-member-table-scroll
)::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body[data-opc-theme='official'][data-opc-color-scheme='light'] :is(
  .opc-theme-page--orders .opc-orders-table-scroll,
  .opc-compute-logs-section .opc-member-table-scroll
)::-webkit-scrollbar-track {
  background: var(--opc-ui-color-surface-subtle);
}

body[data-opc-theme='official'][data-opc-color-scheme='light'] :is(
  .opc-theme-page--orders .opc-orders-table-scroll,
  .opc-compute-logs-section .opc-member-table-scroll
)::-webkit-scrollbar-thumb {
  border-radius: var(--opc-ui-radius-pill);
  background: var(--opc-ui-color-accent);
}

/* 算力流水：与独立系统一致，表格/表头铺满容器 */
body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table .opc-compute-logs-col-time {
  width: 16%;
}

body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table .opc-compute-logs-col-delta,
body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table .opc-compute-logs-col-balance {
  width: 10%;
}

body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-compute-logs-section
  .opc-compute-logs-table
  thead
  th {}

body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table .opc-compute-table-desc {
  word-break: break-word;
}

@media (max-width: 768px) {
  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-table-scroll,
  body[data-opc-theme='official'] .opc-compute-logs-section .opc-power-table-wrap.opc-compute-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y pinch-zoom;
  }

  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table {
    width: max-content;
    min-width: 38rem;
    table-layout: auto;
  }

  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table .opc-compute-logs-col-time {
    width: 10.5rem;
    min-width: 10.5rem;
  }

  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table .opc-compute-logs-col-delta {
    width: 5rem;
    min-width: 5rem;
  }

  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table .opc-compute-logs-col-balance {
    width: 5.5rem;
    min-width: 5.5rem;
  }

  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table .opc-compute-logs-col-desc {
    width: 14rem;
    min-width: 14rem;
  }

  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table th:nth-child(1),
  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table td:nth-child(1),
  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table th:nth-child(2),
  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table td:nth-child(2),
  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table th:nth-child(3),
  body[data-opc-theme='official'] .opc-compute-logs-section .opc-compute-logs-table td:nth-child(3) {
    white-space: nowrap;
  }
}

/* 表头加高；时间列距左 10px；圆角与面板外框对齐 */
body[data-opc-theme='official'] .opc-orders-table-panel table {
  border-collapse: separate;
  border-spacing: 0;
  background: var(--opc-ui-color-surface);
}

body[data-opc-theme='official'] .opc-orders-table-panel thead th {
  padding-top: 16px;
  padding-bottom: 16px;
  padding-right: 12px;
  vertical-align: middle;
}

body[data-opc-theme='official'] .opc-orders-table-panel thead tr {
  background: var(--opc-ui-color-surface-subtle);
}

body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-orders-table-panel
  thead
  th {}

body[data-opc-theme='official'] .opc-orders-table-panel thead th.opc-orders-col-time,
body[data-opc-theme='official'] .opc-orders-table-panel tbody td.opc-orders-col-time {
  padding-left: 10px;
}

body[data-opc-theme='official'] .opc-orders-table-panel thead th:first-child {
  border-top-left-radius: var(--opc-ui-radius-sm);
}

body[data-opc-theme='official'] .opc-orders-table-panel thead th:last-child {
  border-top-right-radius: var(--opc-ui-radius-sm);
}

/* 订单顶栏 Tab：外扩描边，无内 inset / 无顶底伪元素，hover 不互相盖住 */
body[data-opc-theme='official'] .opc-theme-page--orders .opc-orders-page-head .opc-member-nav {
  overflow: visible;
  padding: 6px 8px 8px;
}

body[data-opc-theme='official'] .opc-theme-page--orders .opc-orders-nav-link {
  position: relative;
  z-index: 1;
  overflow: visible;
  border-radius: var(--opc-radius-md, 18px);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-theme-page--orders
  .opc-orders-nav-link {}

body[data-opc-theme='official'] .opc-theme-page--orders .opc-orders-nav-link::before,
body[data-opc-theme='official'] .opc-theme-page--orders .opc-orders-nav-link::after {
  display: none;
  content: none;
}

body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-theme-page--orders
  .opc-orders-nav-link:hover {
  z-index: 2;
  transform: none;
}

body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-theme-page--orders
  .opc-orders-nav-link.opc-member-nav-link--active {
  z-index: 2;
  transform: none;
}

/* 内嵌模块 */
body[data-opc-theme='official'] .opc-module-panel,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-version-col,
body[data-opc-theme='official'] .opc-theme-page--subscription .opc-account-card,
body[data-opc-theme='official']:not([data-opc-color-scheme='light'])
  .opc-compute-logs-section
  .opc-power-table-wrap {
  position: relative;
  border-radius: var(--opc-fig1-radius-inner, 14px);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

body[data-opc-theme='official'] .opc-theme-page--subscription .opc-version-col:hover {
  border-color: rgba(245, 220, 180, 0.45);
  box-shadow:
    var(--opc-ai-inset-depth),
    0 0 32px rgba(232, 195, 140, 0.12);
  transform: translateY(-2px);
}

/* 算力统计格 */
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-stat,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-total,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-arrears {
  border-radius: 16px;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-stat:hover,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-power-total:hover {}

/* 方案卡 */
body[data-opc-theme='official'] .opc-theme-page--plans .opc-plan-card {
  box-shadow: var(--opc-ai-elevated-shadow);
}

body[data-opc-theme='official'] .opc-theme-page--plans .opc-plan-card:hover {
  box-shadow: var(--opc-ai-elevated-shadow-hover);
}

/* 对话消息区 */
body[data-opc-theme='official'] .opc-theme-page--conversation .opc-conv-chat-scroll--official,
body[data-opc-theme='official'] .opc-conv-shell--tools-embed .opc-conv-chat-scroll--tools-embed {
  box-shadow: none;
}

/* 会员导航高亮 */
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-member-nav-link--active {}

/* 算力购买区 */
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-official-purchase-body,
body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-official-pkg-line {
  border-radius: 16px;
}

body[data-opc-theme='official']:not([data-opc-color-scheme='light']) .opc-official-pkg-line:hover {}

/*
 * 登录、注册和找回密码的 paint 归 auth-pages.css 所有；官网仅继承
 * data-opc-ui-mode 的语义色。这里不再以更高特异性叠加黑金渐变、金边或阴影。
 */
