/* OPC 工作台 · 公共样式 · PC/移动自适应 */
:root {
  --opc-bg0: #0c1220;
  --opc-bg1: #141c2e;
  --opc-bg2: #1a2438;
  --opc-line: rgba(255,255,255,0.08);
  --opc-text: #e8eef8;
  --opc-muted: #8b9bb4;
  --opc-accent: #3d9cfd;
  --opc-accent2: #1ec8a5;
  --opc-warn: #f5a524;
  --opc-danger: #f07178;
  --opc-radius: 12px;
  --opc-font: "DIN Alternate", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --opc-display: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --opc-top-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--opc-font);
  color: var(--opc-text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61,156,253,0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(30,200,165,0.12), transparent 55%),
    linear-gradient(180deg, var(--opc-bg0), var(--opc-bg1) 40%, #0a101c);
  line-height: 1.6;
}
a { color: var(--opc-accent); text-decoration: none; }
a:hover { color: #6db4ff; }
img { max-width: 100%; height: auto; }

.opc-top {
  position: sticky; top: 0; z-index: 100;
  height: var(--opc-top-h);
  backdrop-filter: blur(14px);
  background: rgba(12,18,32,0.82);
  border-bottom: 1px solid var(--opc-line);
  overflow: visible;
}
.opc-top-inner {
  position: relative;
  max-width: 1120px; margin: 0 auto; height: 100%;
  padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  overflow: visible;
}
.opc-logo {
  display: flex; align-items: center; gap: 10px; color: var(--opc-text); flex-shrink: 0;
  z-index: 2;
}
.opc-logo:hover { color: #fff; }
.opc-logo-img {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #2a6fdb, #1ec8a5);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.opc-logo-img img { width: 100%; height: 100%; object-fit: contain; }
.opc-logo-fallback { font-weight: 800; font-size: 13px; letter-spacing: 0.5px; }
.opc-logo-text { font-family: var(--opc-display); font-weight: 700; font-size: 17px; letter-spacing: 0.3px; }

.opc-nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.opc-nav-panel {
  display: contents;
}
.opc-nav-main {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  flex-wrap: nowrap;
}
.opc-nav-side {
  margin-left: auto;
  flex-shrink: 0;
  z-index: 2;
  justify-content: flex-end;
}
.opc-nav a {
  color: var(--opc-muted); font-size: 14px; padding: 6px 4px;
}
.opc-nav a:hover { color: #fff; }
.opc-nav a.opc-nav-cta {
  padding: 7px 19px;
  margin-left: 2px;
  border: none;
  border-bottom: none;
  box-shadow: none;
}
.opc-nav a.opc-nav-cta:hover {
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(47,127,255,0.28);
}
.opc-nav-user { display: inline-flex; align-items: center; gap: 6px; }
.opc-nav-user-sep {
  margin: 0 6px;
  color: rgba(125, 146, 171, 0.55);
  font-weight: 400;
}

/* ── 工作台下拉菜单 ── */
.opc-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--opc-top-h);
  z-index: 5;
}
.opc-nav-dropdown:hover > .opc-nav-dropdown-menu,
.opc-nav-dropdown:focus-within > .opc-nav-dropdown-menu {
  display: flex;
}
.opc-nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  height: 100%;
}
.opc-nav-dropdown-menu {
  display: none;
  position: fixed;
  top: calc(var(--opc-top-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(1084px, calc(100vw - 36px));
  background: #141c2e;
  border: 1px solid rgba(160,190,230,0.15);
  border-radius: 14px;
  padding: 18px 20px 20px;
  margin-top: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 300;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}
/* 展开时相对视口水平居中（header 为 sticky 顶部，菜单固定在 header 下方） */
/* 向上延伸一块透明热区，盖住按钮与菜单之间的空隙 */
.opc-nav-dropdown::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -14px;
  width: 140px;
  height: 14px;
  background: transparent;
  z-index: 299;
}
.opc-nav-dropdown-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
  background: transparent;
}
/* 小三角 */
.opc-nav-dropdown-menu::after {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: #141c2e;
  border-top: none;
  pointer-events: none;
}

/* 分组标题 */
.opc-nav-dropdown-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #8fa3c4;
  letter-spacing: 0.5px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(160,190,230,0.1);
  margin-bottom: 2px;
}
.opc-nav-dropdown-section-title .dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.dot-green { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.dot-orange { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.5); }

/* 卡片网格 */
.opc-nav-card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

/* 卡片 */
/* 必须用 .opc-nav a.opc-nav-card：.opc-nav a 的 padding:6px 4px 会盖掉单类名选择器 */
.opc-nav a.opc-nav-card {
  display: flex;
  flex-direction: column;
  padding: 12px 14px 12px 14px;
  background: rgba(160,190,230,0.04);
  border: 1px solid rgba(160,190,230,0.1);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all .18s ease;
  position: relative;
  overflow: hidden;
}
.opc-nav a.opc-nav-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #3d9cfd, #6366f1);
  opacity: 0;
  transition: opacity .18s;
}
.opc-nav a.opc-nav-card:hover {
  background: rgba(61,156,253,0.08);
  border-color: rgba(61,156,253,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  color: inherit;
}
.opc-nav a.opc-nav-card:hover::before { opacity: 1; }

/* 卡片头部 */
.opc-nav-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.opc-nav-card-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  font-size: 11px;
  font-weight: 700;
  color: #5a6a84;
  background: rgba(160,190,230,0.1);
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.opc-nav-card-no.vip {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 2px 8px rgba(139,92,246,0.4);
}
.opc-nav-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #e8eef8;
  line-height: 1.3;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opc-nav-card-desc {
  font-size: 12px;
  color: #7d92ab;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* 开发中卡片样式 */
.opc-nav a.opc-nav-card-beta {
  background: rgba(245,158,11,0.05);
  border-color: rgba(245,158,11,0.15);
}
.opc-nav a.opc-nav-card-beta:hover {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.4);
}
.opc-nav a.opc-nav-card-beta::before {
  background: linear-gradient(180deg, #f59e0b, #ef4444);
}
.opc-nav a.opc-nav-card-beta .opc-nav-card-no {
  background: rgba(245,158,11,0.12);
  color: #d97706;
}

/* 小屏适配 */
@media (max-width: 1200px) {
  .opc-nav-card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 900px) {
  .opc-nav-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .opc-nav-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .opc-nav-dropdown-menu {
    position: static !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    transform: none !important;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .opc-nav-dropdown-menu::after { display: none; }
}

/* 兼容旧样式 */
.opc-nav-dropdown-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.opc-nav-dropdown-section {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 11px;
  color: #5a6a84;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  background: rgba(160,190,230,0.06);
  border: 1px solid rgba(160,190,230,0.1);
  border-radius: 6px;
  white-space: nowrap;
  margin: 2px 0;
}
.opc-nav-dropdown-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.opc-nav-dropdown-items > a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(160,190,230,0.06);
  border: 1px solid rgba(160,190,230,0.1);
  border-radius: 8px;
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s, transform .12s;
  line-height: 1;
}
.opc-nav-dropdown-items > a:hover {
  background: rgba(61,156,253,0.15);
  color: #fff !important;
  border-color: rgba(61,156,253,0.5);
  transform: translateY(-1px);
}
.opc-nav-dropdown-menu > a:not(.opc-nav-dropdown-items > a):not(.opc-nav-card) {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: #cbd5e1;
  border: none;
  border-radius: 0;
  transition: background .12s, color .12s;
}
.opc-nav-dropdown-menu > a:hover {
  background: rgba(61,156,253,0.12);
  color: #fff !important;
}
.opc-vip-tag {
  font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: linear-gradient(90deg, #f5a524, #f07178); color: #1a1208; font-weight: 700;
}
.opc-nav-toggle {
  display: none; background: transparent; border: 1px solid var(--opc-line);
  color: var(--opc-text); width: 40px; height: 36px; border-radius: 8px; font-size: 18px; cursor: pointer;
}

.opc-main { min-height: calc(100vh - var(--opc-top-h) - 120px); }

.opc-foot {
  border-top: 1px solid var(--opc-line);
  padding: 40px 18px 28px;
  margin-top: 48px;
  background: rgba(0,0,0,0.28);
}
.page-home .opc-foot { margin-top: 0; }
.page-app .opc-foot { margin-top: 0; }
.opc-foot-inner { max-width: 1120px; margin: 0 auto; }
.opc-foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 28px 32px;
  margin-bottom: 28px;
}
.opc-foot-col h3,
.opc-foot-col h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.opc-foot-col h3 { font-size: 18px; }
.opc-foot-col p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.65;
  color: #8fa3bb;
}
.opc-foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.opc-foot-col li { margin: 0 0 8px; }
.opc-foot-col a {
  color: #8fa3bb;
  font-size: 13px;
}
.opc-foot-col a:hover { color: #fff; }
.opc-foot-bottom {
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.opc-foot-bottom p {
  margin: 0;
  color: #6a7a94;
  font-size: 12px;
}
.opc-foot-bottom a { color: #6a7a94; }
.opc-foot-bottom a:hover { color: #8fa3bb; }

@media (max-width: 900px) {
  .opc-foot-grid {
    display: none;
  }
  .opc-foot {
    padding: 20px 18px 24px;
  }
  .opc-foot-bottom {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
}

.legal-page { padding-top: 40px; padding-bottom: 64px; max-width: 720px; }
.legal-article h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.legal-meta {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--opc-muted);
}
.legal-article h2 {
  margin: 28px 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.legal-article p,
.legal-article li {
  font-size: 14px;
  line-height: 1.75;
  color: #93a7c0;
}
.legal-article p { margin: 0 0 12px; }
.legal-article ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}
.legal-article a { color: var(--opc-accent); }
.legal-article a:hover { color: #fff; }

.opc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
  background: linear-gradient(135deg, #2f7fff, #1ec8a5);
  color: #fff !important; transition: transform .15s, box-shadow .15s, opacity .15s;
}
.opc-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(47,127,255,0.28); color: #fff !important; }
.opc-btn:active { transform: none; }
.opc-btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.opc-btn-ghost {
  background: transparent; border: 1px solid rgba(255,255,255,0.18); color: var(--opc-text) !important;
}
.opc-btn-ghost:hover { border-color: var(--opc-accent); color: #fff !important; box-shadow: none; }
.opc-btn-block { width: 100%; }
.opc-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.opc-container { max-width: 1120px; margin: 0 auto; padding: 24px 18px; }
.opc-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--opc-line);
  border-radius: var(--opc-radius);
  padding: 20px;
}
.opc-muted { color: var(--opc-muted); }
.opc-error { color: var(--opc-danger); font-size: 13px; margin-top: 8px; }
.opc-ok { color: var(--opc-accent2); font-size: 13px; margin-top: 8px; }

.opc-form { max-width: 400px; margin: 0 auto; }
.opc-form label { display: block; font-size: 13px; color: var(--opc-muted); margin-bottom: 6px; }
.opc-form .field { margin-bottom: 16px; }
.opc-form input, .opc-form select, .opc-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--opc-line); background: rgba(0,0,0,0.28);
  color: var(--opc-text); font-size: 15px; font-family: inherit; outline: none;
}
.opc-form input:focus, .opc-form select:focus, .opc-form textarea:focus {
  border-color: var(--opc-accent); box-shadow: 0 0 0 3px rgba(61,156,253,0.15);
}
.opc-form .row-code { display: flex; gap: 10px; }
.opc-form .row-code input { flex: 1; }
.opc-form .hint { font-size: 12px; color: var(--opc-muted); margin-top: 6px; }
.opc-form .links { margin-top: 16px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; }
.reg-legal {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--opc-muted);
  line-height: 1.6;
  text-align: center;
}
.reg-legal a { color: #8fa3bb; text-decoration: underline; text-underline-offset: 2px; }
.reg-legal a:hover { color: #fff; }

.opc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.opc-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.opc-table th, .opc-table td {
  padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--opc-line);
}
.opc-table th { color: var(--opc-muted); font-weight: 600; white-space: nowrap; }
.opc-table td { vertical-align: middle; }

.opc-pager {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  margin-top: 20px; font-size: 13px;
}
.opc-pager a, .opc-pager span {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--opc-line);
  color: var(--opc-muted);
}
.opc-pager a:hover { color: #fff; border-color: var(--opc-accent); }
.opc-pager .cur { background: rgba(61,156,253,0.2); color: #fff; border-color: var(--opc-accent); }

.opc-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px;
  background: rgba(255,255,255,0.08);
}
.opc-badge-ok { background: rgba(30,200,165,0.18); color: #5ee4c5; }
.opc-badge-wait { background: rgba(245,165,36,0.18); color: #f5c15a; }
.opc-badge-off { background: rgba(255,255,255,0.06); color: var(--opc-muted); }

.opc-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #1e2a40; color: #fff; padding: 12px 18px; border-radius: 10px;
  border: 1px solid var(--opc-line); box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 9999; font-size: 14px; max-width: 90vw;
}
.opc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) {
  .opc-nav-toggle { display: inline-flex; align-items: center; justify-content: center; z-index: 2; margin-left: auto; }
  .opc-nav-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--opc-top-h);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(12,18,32,0.96);
    border-bottom: 1px solid var(--opc-line);
    padding: 8px 12px 16px;
    z-index: 150;
  }
  .opc-nav-panel.open { display: flex; }
  .opc-nav-main,
  .opc-nav-side {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    margin-left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    flex-wrap: wrap;
  }
  .opc-nav a { padding: 12px 10px; border-bottom: 1px solid var(--opc-line); }
  .opc-nav a.opc-nav-cta {
    margin: 8px 0 4px;
    padding: 10px 19px;
    border-bottom: none;
    justify-content: center;
  }
  .opc-nav-dropdown {
    display: none;
  }
  .opc-logo-text { font-size: 15px; }
}
