/* /public/assets/theme.css —— 金融终端深色主题（前台全部样式都在这一个文件） */
:root {
  --bg: #0b0f16; --panel: #121824; --line: #1e2635; --text: #dfe6f0; --dim: #7a869a;
  --primary: #5B8FF9; --up: #ef5350; --down: #26a69a; --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }
.topbar { display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #0e131c;
  position: relative; z-index: 50; }                 /* 顶栏永远在遮罩之上，头像/个人中心/退出一律可点 */
.brand b { color: var(--primary); font-size: 18px; margin-right: 8px; }
.brand span { color: var(--dim); font-size: 13px; }
.auth-widget { position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#5B8FF9,#61DDAA);
  color: #06121f; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dropdown { position: absolute; right: 0; top: 42px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px; min-width: 130px; z-index: 20; }
.dropdown a { display: block; padding: 8px 10px; color: var(--text); text-decoration: none; border-radius: 6px; font-size: 13px; }
.dropdown a:hover { background: #1b2333; }
.app { max-width: 1440px; margin: 0 auto; padding: 14px 18px; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.filters select, .filters input { background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; margin-right: 8px; font-size: 13px; }
/* 品种/合约悬浮拖拽面板：固定在图表上方，按住标题条可任意拖动，位置记忆到本地 */
.flt-dock { position: fixed; left: 16px; top: 76px; z-index: 60; background: rgba(20,26,38,.92);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  backdrop-filter: blur(6px); user-select: none; max-width: calc(100vw - 24px); }
.flt-dock .flt-bar { display: flex; align-items: center; gap: 8px; cursor: move; padding: 2px 2px 6px;
  color: var(--dim); font-size: 12px; }
.flt-dock .flt-bar .dot { width: 6px; height: 6px; border-radius: 50%; background: #61DDAA; }
.flt-dock .flt-bar b { color: var(--text); font-size: 12px; font-weight: 600; }
.flt-dock .flt-hide { margin-left: auto; cursor: pointer; color: var(--dim); font-size: 12px; }
.flt-dock[hidden] { display: none !important; }
.meta { color: var(--dim); font-size: 12px; margin-left: auto; }
/* 统一 hidden 语义：CSS 里的 display 不能覆盖 hidden 属性（否则遮罩永远盖着） */
[hidden] { display: none !important; }

.chart-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px;
  position: relative; overflow: hidden; }
.chart { width: 100%; height: calc(100vh - 190px); min-height: 420px; }
/* 锁定层：只盖图表区，不再全屏锁死整站 */
.lock-mask { position: absolute; inset: 0; background: rgba(6,10,18,.55); backdrop-filter: blur(2px); display: flex;
  align-items: center; justify-content: center; z-index: 20; }
.lock-card { background: #111a29; border: 1px solid rgba(91,143,249,.55); border-radius: 14px;
  padding: 26px 32px; text-align: center; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lock-card h3 { margin: 0 0 10px; font-size: 19px; color: #7fb0ff; }
.lock-card p { color: #c8d6ea; font-size: 13.5px; line-height: 1.8; margin: 0 0 16px; }
.lock-card .lk-act { display: flex; gap: 10px; justify-content: center; }
.lock-card .lk-bal { color: #9fb3cc; font-size: 12.5px; margin: -6px 0 14px; }
.btn { background: #1b2333; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; font-size: 13px; }
.btn:hover { border-color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #06121f; font-weight: 600; }
.modal { position: fixed; inset: 0; background: rgba(4,8,14,.8); display: flex; align-items: center;
  justify-content: center; z-index: 95; }           /* 高于顶栏与锁定层：个人中心/订阅永不被盖 */
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: 520px;
  max-width: 92vw; max-height: 86vh; overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.modal-card h3 { margin: 0; padding: 16px 20px 10px; border-bottom: 1px solid var(--line); font-size: 16px; }
.modal-body { overflow: auto; padding: 14px 20px; flex: 1 1 auto; font-size: 13px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px 14px;
  border-top: 1px solid var(--line); flex: 0 0 auto; }   /* 关闭按钮永远可见 */
.form { display: grid; gap: 10px; }
.form label { display: grid; gap: 4px; color: var(--dim); font-size: 12px; }
.form input, .row2 input { background: #0e131c; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 9px 10px; font-size: 13px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.kv > div { background: #0e131c; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.kv span { color: var(--dim); font-size: 12px; display: block; }
.mini { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini th, .mini td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; color: var(--dim); }
.pkgs { display: grid; gap: 10px; }
.pkg { display: flex; align-items: center; gap: 12px; background: #0e131c; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; }
.pkg b { min-width: 90px; } .pkg span { color: var(--dim); font-size: 12px; }
.pkg i { color: var(--up); font-style: normal; margin-left: auto; font-weight: 700; }
.pkg em { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.pkg em.ok { color: #61DDAA; background: rgba(97,221,170,.12); }
.pkg em.no { color: #ff7b7b; background: rgba(255,123,123,.12); }
.pkg .btn:disabled { opacity: .55; cursor: not-allowed; }
.pkgs-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; padding: 10px 12px;
  background: #0e131c; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: #a9b7c9; }
.pkgs-top b { color: #61DDAA; font-size: 17px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1b2333;
  border: 1px solid var(--primary); color: var(--text); padding: 10px 16px; border-radius: 10px;
  z-index: 50; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.hint { color: var(--dim); font-size: 12px; padding: 12px; }
@media (max-width: 820px) {
  .chart { height: 62vh; }
  .toolbar select, .toolbar input { flex: 1 1 40%; }
  .kv { grid-template-columns: 1fr; }
}

/* ================= 全屏登录 / 注册（居中卡片，无左侧大屏） ================= */
body { min-height: 100vh; }
.gate { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 60;
  overflow: hidden; padding: 24px;
  background:
    radial-gradient(1200px 700px at 18% -10%, rgba(52,152,219,.20), transparent 60%),
    radial-gradient(1000px 600px at 110% 110%, rgba(243,156,18,.12), transparent 55%),
    linear-gradient(160deg, #0b0f16 0%, #131a24 55%, #0e141c 100%);
}
.gate[hidden] { display: none; }
.gate:before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.gate-wrap { position: relative; z-index: 2; width: 400px; max-width: 92vw; }
.gate-card { background: rgba(20,28,38,.72); border: 1px solid rgba(255,255,255,.08); border-radius: 18px;
  padding: 34px 30px 26px; backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.gate.reg .gate-card { border-color: rgba(97,221,170,.30); }
.gate-icon { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #1f8fc4, #155a7d); box-shadow: 0 8px 24px rgba(31,143,196,.35); }
.gate-icon svg { width: 30px; height: 30px; fill: #ecf6ff; }
.gate-title { text-align: center; font-size: 21px; font-weight: 700; letter-spacing: 1px; color: #f2f6fa; }
.gate-sub { text-align: center; font-size: 12.5px; color: #8b98a8; margin: 8px 0 24px; line-height: 1.7; }
.gf { display: block; margin-bottom: 15px; color: #9aa7b6; font-size: 12px; }
.gf input { width: 100%; margin-top: 7px; height: 44px; padding: 0 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10);
  color: #e8eef4; border-radius: 10px; font-size: 14px; outline: none;
  transition: border-color .15s, background .15s; }
.gf input:focus { border-color: #3498db; background: rgba(255,255,255,.09); }
.gate-row { display: flex; align-items: center; justify-content: space-between;
  color: #9aa7b6; font-size: 12.5px; margin: 2px 0 18px; }
.gate-row .ck { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.gate-row .ck input { width: 15px; height: 15px; accent-color: #3498db; }
.gate-kefu { color:#7f93aa; background:none; border:0; padding:0; font-size:13px; cursor:pointer; }
.gate-kefu:hover { color:#3498db; text-decoration:underline; }
.gate-kefu-tip { margin-top:10px; padding:10px 12px; border-radius:9px; font-size:12.5px; line-height:1.75;
  background:rgba(52,152,219,.08); border:1px solid rgba(52,152,219,.28); color:#a9c3da; }
.gate-btn { width: 100%; height: 46px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #2980b9, #1f6fa0); color: #fff; font-size: 15px;
  font-weight: 600; letter-spacing: 2px; transition: opacity .15s, transform .1s; }
.gate-btn:hover { opacity: .92; }
.gate-btn:active { transform: scale(.985); }
.gate-btn:disabled { opacity: .55; cursor: wait; }
.gate.reg .gate-btn { background: linear-gradient(135deg, #61DDAA, #3fae87); color: #06281d; }  /* 注册按钮颜色保留 */
.gate-msg { color: #e74c3c; font-size: 12.5px; text-align: center; min-height: 18px; margin-top: 12px; }
.gate-links { text-align: center; color: #8b98a8; font-size: 12.5px; margin-top: 16px; }
.gate-links a { color: #5dade2; text-decoration: none; margin-left: 4px; }
.gate-links a:hover { text-decoration: underline; }
.gate-legal { color: #5d6b7b; font-size: 11px; text-align: center; margin-top: 16px; line-height: 1.7; }
.gate-copy { position: relative; text-align: center; color: #5d6b7b; font-size: 11px; letter-spacing: 1px; margin-top: 18px; }
.terminal[hidden] { display: none; }
@media (max-width: 480px) {
  .gate-card { padding: 26px 20px 20px; }
}
