:root{--bg:#f7f7f5;--panel:#fff;--text:#222;--muted:#787774;--line:#e8e7e3;--accent:#2f6feb;--danger:#d1242f;--green:#1a7f37;--red:#cf222e;--shadow:0 12px 30px rgba(0,0,0,.06)}
*{box-sizing:border-box}body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text)}button,input,textarea,select{font:inherit}button{border:0;border-radius:10px;background:#eee;padding:9px 13px;cursor:pointer}button.primary{background:var(--text);color:#fff}button.ghost{background:transparent;border:1px solid var(--line)}button.danger{background:#fff1f1;color:var(--danger)}button:disabled{opacity:.55;cursor:not-allowed}.wrap{display:grid;grid-template-columns:280px 1fr;min-height:100vh}.side{border-right:1px solid var(--line);background:#fbfbfa;padding:22px;position:sticky;top:0;height:100vh;overflow:auto}.brand{font-size:22px;font-weight:800;margin-bottom:6px}.muted{color:var(--muted);font-size:13px}.nav{margin:22px 0;display:grid;gap:8px}.nav button{text-align:left;background:transparent}.nav button.primary{background:var(--text);color:#fff}.nav button.ghost{background:#fff;color:var(--text);border:1px solid var(--line)}.nav button.active,.tag.active{background:#ecebea}.search{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}.filter-title{color:var(--muted);font-size:13px;margin-top:20px}.main{padding:34px;max-width:1220px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.title{font-size:34px;font-weight:850;letter-spacing:-.03em}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.card{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:var(--shadow);transition:.15s}.card:hover{transform:translateY(-2px)}.card h3{margin:0 0 8px;font-size:18px}.card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.meta{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.pill,.tag{font-size:12px;border:1px solid var(--line);border-radius:999px;padding:5px 9px;background:#fafafa;color:#555}.pill.public{color:var(--green);background:#effaf2}.pill.private{color:#7d4e00;background:#fff6df}.content-preview{white-space:pre-wrap;color:#555;line-height:1.55;max-height:96px;overflow:hidden}.editor,.login,.settings{background:#fff;border:1px solid var(--line);border-radius:20px;padding:22px;box-shadow:var(--shadow);max-width:880px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:grid;gap:7px;margin-bottom:14px}.field label{font-size:13px;color:#555;font-weight:650}.field input,.field textarea,.field select{width:100%;border:1px solid var(--line);border-radius:12px;padding:11px 12px;background:#fff}.field textarea{min-height:260px;line-height:1.65;resize:vertical}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.empty{border:1px dashed #d5d2ca;border-radius:20px;padding:42px;text-align:center;color:var(--muted);background:#fff}.login{margin:10vh auto;text-align:center}.login input{max-width:340px;text-align:center}.toast{position:fixed;right:22px;bottom:22px;background:#222;color:#fff;border-radius:14px;padding:12px 16px;box-shadow:var(--shadow);z-index:50}.sharebox{display:grid;gap:10px}.copyline{display:flex;gap:10px}.copyline input{flex:1;border:1px solid var(--line);border-radius:10px;padding:10px}.badge-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.badge-row.small .tag{padding:4px 8px}.view-switch{display:flex;gap:8px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:12px;padding:4px}.view-switch button{background:transparent;border-radius:9px;padding:7px 12px;color:var(--muted)}.view-switch button.active{background:var(--text);color:#fff}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px 16px;box-shadow:var(--shadow)}.stat-label{font-size:12px;color:var(--muted);margin-bottom:6px}.stat-value{font-size:23px;font-weight:850}.good{color:var(--green)!important}.bad{color:var(--red)!important}.table-wrap{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);overflow:auto}.list-table{width:100%;border-collapse:collapse;min-width:900px;font-size:14px}.list-table th{position:sticky;top:0;background:#fbfbfa;color:#666;font-size:12px;font-weight:750;text-align:left;border-bottom:1px solid var(--line);padding:12px 14px;white-space:nowrap}.list-table td{border-bottom:1px solid var(--line);padding:12px 14px;vertical-align:top}.list-table tr:hover{background:#fafafa;cursor:pointer}.list-table tr:last-child td{border-bottom:0}.row-preview{margin-top:5px;color:var(--muted);font-size:12px;max-width:380px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mini-tag{display:inline-block;margin:0 4px 4px 0;border:1px solid var(--line);border-radius:999px;padding:3px 7px;background:#fafafa;color:#555;font-size:12px}.pnl,.pnl-chip{font-weight:800;white-space:nowrap}.pnl-chip{border:1px solid var(--line);border-radius:999px;padding:4px 8px;background:#fafafa;font-size:12px}.nowrap{white-space:nowrap}.sep{border:0;border-top:1px solid var(--line);margin:24px 0}.export-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.export-grid button{background:#fff;border:1px solid var(--line);text-align:left;padding:14px;display:grid;gap:4px}.export-grid span{font-size:12px;color:var(--muted)}
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.28);display:flex;align-items:flex-start;justify-content:center;padding:6vh 20px;z-index:40}.modal{width:min(900px,100%);max-height:88vh;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.18);padding:22px}.modal-top{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:14px}.modal h2{font-size:26px;margin:0 0 8px}.detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}.detail-grid div{border:1px solid var(--line);border-radius:14px;padding:12px;background:#fbfbfa}.detail-grid span{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}.detail-grid strong{font-size:14px;word-break:break-word}.detail-content{white-space:pre-wrap;line-height:1.75;border:1px solid var(--line);border-radius:16px;background:#fff;padding:18px;min-height:160px}.modal-actions{margin-top:16px}
@media(max-width:900px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.wrap{grid-template-columns:1fr}.side{position:relative;height:auto}.main{padding:22px}.grid{grid-template-columns:1fr}.topbar{align-items:flex-start;flex-direction:column}.title{font-size:28px}.export-grid{grid-template-columns:1fr}.view-switch{width:100%;justify-content:space-between}.view-switch button{flex:1}.list-table{min-width:760px}.stats-grid{grid-template-columns:1fr}.detail-grid{grid-template-columns:1fr}.modal-backdrop{padding:2vh 10px}.modal-top{flex-direction:column}}

/* V2.1 rich text editor */
.rich-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:8px;border:1px solid var(--line);border-bottom:0;border-radius:12px 12px 0 0;background:#fbfbfa;position:sticky;top:0;z-index:2}
.rich-toolbar button{padding:7px 10px;border:1px solid var(--line);background:#fff;border-radius:8px;font-size:13px}
.rich-editor{min-height:320px;line-height:1.75;border:1px solid var(--line);border-radius:0 0 12px 12px;padding:14px;background:#fff;outline:none;overflow:auto}
.rich-editor:empty:before{content:attr(data-placeholder);color:var(--muted)}
.rich-help{margin-top:7px}.rich-content,.rich-preview{word-break:break-word}.rich-content p,.rich-editor p,.rich-preview p{margin:0 0 10px}.rich-content h1,.rich-editor h1{font-size:28px;margin:16px 0 10px}.rich-content h2,.rich-editor h2{font-size:22px;margin:14px 0 8px}.rich-content h3,.rich-editor h3{font-size:18px;margin:12px 0 6px}.rich-content ul,.rich-content ol,.rich-editor ul,.rich-editor ol,.rich-preview ul,.rich-preview ol{padding-left:24px;margin:8px 0}.rich-content blockquote,.rich-editor blockquote{margin:10px 0;padding:10px 14px;border-left:4px solid var(--line);background:#fbfbfa;color:#555}.rich-content table,.rich-editor table,.rich-preview table{width:100%;border-collapse:collapse;margin:10px 0;background:#fff}.rich-content th,.rich-content td,.rich-editor th,.rich-editor td,.rich-preview th,.rich-preview td{border:1px solid var(--line);padding:8px;vertical-align:top}.rich-content img,.rich-editor img,.rich-preview img{max-width:100%;height:auto;border-radius:12px;border:1px solid var(--line);margin:10px 0;display:block}.rich-preview{max-height:130px;overflow:hidden;color:#555;line-height:1.55}.row-preview{white-space:nowrap}.detail-content.rich-content{white-space:normal}.content-preview.rich-preview{white-space:normal}
@media(max-width:760px){.rich-toolbar{position:relative;overflow-x:auto;flex-wrap:nowrap}.rich-toolbar button{white-space:nowrap;min-height:38px}.rich-editor{min-height:360px;font-size:16px}.rich-content table,.rich-editor table{font-size:13px;display:block;overflow-x:auto;white-space:nowrap}}

/* V2.2: public disclaimer and pinned entries */
.public-disclaimer {
  max-width: 980px;
  margin: 26px auto 24px;
  padding: 18px 16px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}
.pin-cell { width: 44px; text-align: center; }
.pin-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff7d6;
  border: 1px solid #f2dfa2;
  color: #8a6200;
  font-size: 12px;
  font-weight: 700;
}
.pinned-card {
  border-color: #ead68a;
  background: linear-gradient(180deg, #fffdf4 0%, #fff 42%);
}
@media (max-width: 760px) {
  .public-disclaimer { margin: 18px 12px 20px; font-size: 11px; }
  .pin-cell { width: auto; }
}

/* V2.3: single export, highlight, public visit summary, forward link */
.rich-toolbar #highlightBtn { background: #fff6bf; border-color: #eadb7a; color: #6b5200; }
.rich-editor mark, .rich-content mark, .rich-preview mark { background: #fff3a3; padding: 0 3px; border-radius: 3px; }
.visit-summary { margin-top: 18px; }
.visit-card { margin-top: 10px; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.visit-card strong { font-size: 22px; font-weight: 850; }
.visit-card span { color: var(--muted); font-size: 12px; }
.modal-actions #exportSingleDoc, .modal-actions #exportSinglePdf, .modal-actions #forwardDetail { border-color: #d7d4cc; background: #fff; }
@media (max-width: 760px) {
  .visit-card { padding: 10px 12px; }
  .modal-actions button { flex: 1 1 calc(50% - 8px); min-height: 42px; }
}
.nav-link-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

/* TradingView 浮动行情卡修复版
   目标：
   1. 不再压缩中间交易记录栏；
   2. 恢复原来的左侧栏 + 中间栏布局；
   3. 右侧行情卡改为固定悬浮；
   4. 点击“展开”后弹出大图表浮层。
*/

/* 恢复主页面为原来的两栏布局 */
.wrap{
  display:grid !important;
  grid-template-columns:260px minmax(0,1fr) !important;
  gap:18px !important;
  align-items:start !important;
  max-width:1400px !important;
  margin:0 auto !important;
}

.side{
  grid-column:1 !important;
}

.main{
  grid-column:2 !important;
  min-width:0 !important;
}

/* 右侧轻量行情卡改成悬浮，不占用布局空间 */
.tv-side{
  position:fixed !important;
  right:22px !important;
  top:118px !important;
  width:220px !important;
  max-width:220px !important;
  z-index:999 !important;
  pointer-events:auto;
}

/* 悬浮小卡片 */
.tv-lite-card{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:14px;
  box-shadow:0 18px 45px rgba(15,23,42,.14);
}

.tv-lite-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.tv-title{
  font-weight:800;
  font-size:16px;
  color:#111827;
}

.tv-sub{
  font-size:12px;
  color:#6b7280;
  margin-top:3px;
  line-height:1.4;
}

.tv-toggle-btn{
  border:0;
  background:#111827;
  color:#fff;
  border-radius:10px;
  padding:7px 10px;
  cursor:pointer;
  white-space:nowrap;
}

.tv-mini-line{
  margin-top:14px;
  padding:12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
}

.tv-mini-line span{
  display:block;
  color:#6b7280;
  font-size:12px;
  margin-bottom:4px;
}

.tv-mini-line strong{
  color:#111827;
  font-size:14px;
}

.tv-mini-actions{
  margin-top:10px;
}

.tv-mini-actions button{
  width:100%;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:12px;
  padding:9px 10px;
  cursor:pointer;
}

/* 展开 TradingView 图表浮层，不影响主页面布局 */
.tv-drawer{
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:none;
}

.tv-drawer.open{
  pointer-events:auto;
}

.tv-drawer-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.28);
  opacity:0;
  transition:opacity .18s ease;
}

.tv-drawer.open .tv-drawer-backdrop{
  opacity:1;
}

.tv-drawer-panel{
  position:absolute;
  top:24px;
  right:24px;
  width:min(920px, calc(100vw - 48px));
  height:calc(100vh - 48px);
  background:#0b1220;
  color:#fff;
  border-radius:22px;
  padding:16px;
  box-shadow:0 30px 80px rgba(15,23,42,.35);
  transform:translateX(30px);
  opacity:0;
  transition:all .2s ease;
  display:flex;
  flex-direction:column;
}

.tv-drawer.open .tv-drawer-panel{
  transform:translateX(0);
  opacity:1;
}

.tv-drawer-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.tv-drawer-head .tv-title{
  color:#fff;
  font-size:18px;
}

.tv-drawer-head .tv-sub{
  color:rgba(255,255,255,.72);
}

.tv-close-btn{
  border:1px solid rgba(255,255,255,.18);
  background:#111827;
  color:#fff;
  border-radius:10px;
  padding:8px 12px;
  cursor:pointer;
}

.tv-ticker{
  min-height:74px;
  background:#111827;
  border-radius:14px;
  padding:8px;
  overflow:hidden;
  margin-bottom:12px;
}

.tv-chart{
  flex:1;
  min-height:420px;
  background:#111827;
  border-radius:14px;
  overflow:hidden;
}

/* 屏幕较窄时，避免遮挡内容：把浮动卡片放右下角 */
@media (max-width:1200px){
  .tv-side{
    top:auto !important;
    right:18px !important;
    bottom:18px !important;
    width:210px !important;
    max-width:210px !important;
  }
}

/* 手机端：浮动卡片变成底部工具卡 */
@media (max-width:820px){
  .wrap{
    display:block !important;
    max-width:none !important;
  }

  .side,
  .main{
    width:auto !important;
    max-width:none !important;
    margin-bottom:16px;
  }

  .tv-side{
    left:12px !important;
    right:12px !important;
    bottom:12px !important;
    top:auto !important;
    width:auto !important;
    max-width:none !important;
  }

  .tv-lite-card{
    border-radius:16px;
    padding:12px;
  }

  .tv-mini-line{
    display:none;
  }

  .tv-drawer-panel{
    top:10px;
    right:10px;
    width:calc(100vw - 20px);
    height:calc(100vh - 20px);
    border-radius:18px;
  }
}

/* 左侧贴边布局修复
   作用：
   1. 取消居中布局；
   2. 左侧栏和中间栏整体靠近浏览器左侧；
   3. 保留 TradingView 浮动行情卡；
   4. 不改变表格字段顺序。
*/

.wrap{
  display:grid !important;
  grid-template-columns:260px minmax(0,1fr) !important;
  gap:18px !important;
  align-items:start !important;

  /* 关键修复：不要居中，靠左 */
  max-width:none !important;
  width:100% !important;
  margin:0 !important;
  padding-left:12px !important;
  padding-right:260px !important;
}

.side{
  grid-column:1 !important;
}

.main{
  grid-column:2 !important;
  min-width:0 !important;
}

/* TradingView 继续保持浮动，不占主布局空间 */
.tv-side{
  position:fixed !important;
  right:18px !important;
  top:118px !important;
  width:220px !important;
  max-width:220px !important;
  z-index:999 !important;
  pointer-events:auto;
}

/* 屏幕中等宽度时，减少右侧预留空间 */
@media (max-width:1200px){
  .wrap{
    padding-left:10px !important;
    padding-right:230px !important;
  }

  .tv-side{
    top:auto !important;
    right:14px !important;
    bottom:18px !important;
    width:210px !important;
    max-width:210px !important;
  }
}

/* 手机端恢复单列 */
@media (max-width:820px){
  .wrap{
    display:block !important;
    max-width:none !important;
    width:100% !important;
    margin:0 !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }

  .side,
  .main{
    width:auto !important;
    max-width:none !important;
    margin-bottom:16px;
  }

  .tv-side{
    left:12px !important;
    right:12px !important;
    bottom:12px !important;
    top:auto !important;
    width:auto !important;
    max-width:none !important;
  }
}


/* ===== 自定义浮动信息卡片：只增加浮动卡，不改变原有布局 ===== */
.user-float-card{
  position:fixed;
  right:24px;
  top:430px;
  width:260px;
  z-index:997;
  pointer-events:auto;
}
.user-float-inner{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:14px;
  box-shadow:0 18px 45px rgba(15,23,42,.12);
}
.user-float-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.user-float-title{
  font-size:16px;
  font-weight:800;
  color:#111827;
}
.user-float-toggle{
  border:0;
  background:#f3f4f6;
  color:#111827;
  border-radius:10px;
  padding:6px 9px;
  cursor:pointer;
  white-space:nowrap;
}
.user-float-body{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.user-float-link{
  display:block;
  text-decoration:none;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:13px;
  padding:10px;
}
.user-float-link:hover{
  background:#eef2ff;
  border-color:#c7d2fe;
}
.user-float-link strong{
  display:block;
  color:#111827;
  font-size:14px;
}
.user-float-link span{
  display:block;
  color:#6b7280;
  font-size:12px;
  margin-top:3px;
  word-break:break-all;
}
.user-float-text{
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:13px;
  padding:10px;
  color:#374151;
  font-size:14px;
  line-height:1.6;
  white-space:pre-wrap;
}
.user-float-empty{
  color:#9ca3af;
  font-size:13px;
}
.user-float-card.collapsed .user-float-body{
  display:none;
}
@media (max-width:1200px){
  .user-float-card{
    top:auto;
    right:18px;
    bottom:180px;
    width:240px;
  }
}
@media (max-width:820px){
  .user-float-card{
    left:12px;
    right:12px;
    bottom:96px;
    top:auto;
    width:auto;
  }
  .user-float-inner{
    border-radius:16px;
    padding:12px;
  }
}


/* ===== 右侧浮动工具区统一美化版 =====
   目的：
   1. TradingView 卡片和自定义浮动卡片宽度统一；
   2. 圆角、阴影、间距、padding 统一；
   3. 不改变左侧栏、中间交易记录栏和表格字段；
   4. 两张卡片视觉上形成统一右侧工具区。
*/

.tv-side,
.user-float-card{
  right:24px !important;
  width:260px !important;
  max-width:260px !important;
  z-index:997 !important;
}

.tv-side{
  top:120px !important;
  position:fixed !important;
}

.user-float-card{
  top:360px !important;
  position:fixed !important;
}

.tv-lite-card,
.user-float-inner{
  width:100% !important;
  background:#ffffff !important;
  border:1px solid #e5e7eb !important;
  border-radius:18px !important;
  padding:14px !important;
  box-shadow:0 18px 45px rgba(15,23,42,.12) !important;
}

.tv-lite-head,
.user-float-head{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:10px !important;
  margin-bottom:10px !important;
}

.tv-title,
.user-float-title{
  font-size:16px !important;
  font-weight:800 !important;
  color:#111827 !important;
  line-height:1.3 !important;
}

.tv-sub{
  font-size:12px !important;
  color:#6b7280 !important;
  margin-top:3px !important;
  line-height:1.4 !important;
}

.tv-toggle-btn,
.user-float-toggle{
  border:0 !important;
  background:#111827 !important;
  color:#fff !important;
  border-radius:10px !important;
  padding:7px 10px !important;
  cursor:pointer !important;
  white-space:nowrap !important;
  font-size:13px !important;
}

.tv-mini-line,
.user-float-link,
.user-float-text{
  border:1px solid #e5e7eb !important;
  background:#f8fafc !important;
  border-radius:13px !important;
  padding:10px !important;
}

.tv-mini-line{
  margin-top:12px !important;
}

.tv-mini-actions{
  margin-top:10px !important;
}

.tv-mini-actions button{
  width:100% !important;
  border:1px solid #e5e7eb !important;
  background:#ffffff !important;
  color:#111827 !important;
  border-radius:12px !important;
  padding:9px 10px !important;
  cursor:pointer !important;
}

.user-float-body{
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  min-height:86px !important;
}

.user-float-link:hover{
  background:#eef2ff !important;
  border-color:#c7d2fe !important;
}

.user-float-link strong{
  display:block !important;
  color:#111827 !important;
  font-size:14px !important;
}

.user-float-link span{
  display:block !important;
  color:#6b7280 !important;
  font-size:12px !important;
  margin-top:3px !important;
  word-break:break-all !important;
}

.user-float-text{
  color:#374151 !important;
  font-size:14px !important;
  line-height:1.6 !important;
  white-space:pre-wrap !important;
}

.user-float-card.collapsed .user-float-body{
  display:none !important;
}

.tv-drawer{
  z-index:9999 !important;
}

@media (max-width:1200px){
  .tv-side,
  .user-float-card{
    right:18px !important;
    width:240px !important;
    max-width:240px !important;
  }

  .tv-side{
    top:auto !important;
    bottom:300px !important;
  }

  .user-float-card{
    top:auto !important;
    bottom:120px !important;
  }
}

@media (max-width:820px){
  .tv-side,
  .user-float-card{
    left:12px !important;
    right:12px !important;
    width:auto !important;
    max-width:none !important;
  }

  .tv-side{
    top:auto !important;
    bottom:104px !important;
  }

  .user-float-card{
    top:auto !important;
    bottom:12px !important;
  }

  .tv-lite-card,
  .user-float-inner{
    border-radius:16px !important;
    padding:12px !important;
  }

  .tv-mini-line{
    display:none !important;
  }
}


/* ===== 右侧工具区向左靠近中间栏优化版 =====
   目的：
   1. 右侧工具区整体向左移动；
   2. 减少中间记录栏与右侧工具区之间的大空白；
   3. 间距更接近左侧栏与中间栏的距离；
   4. 不改变左侧栏、中间栏、表格字段和原有布局。
*/

/* 桌面端：增加 right 值 = 卡片整体向左移动 */
.tv-side,
.user-float-card{
  right:150px !important;
}

/* 大屏幕：再稍微向左，让右侧工具区更贴近主内容 */
@media (min-width:1600px){
  .tv-side,
  .user-float-card{
    right:180px !important;
  }
}

/* 普通笔记本：避免压到中间栏，适度向左 */
@media (max-width:1400px){
  .tv-side,
  .user-float-card{
    right:90px !important;
  }
}

/* 窄屏：仍然保持原来的右下角逻辑，避免遮挡内容 */
@media (max-width:1200px){
  .tv-side,
  .user-float-card{
    right:18px !important;
  }
}


/* ===== 右侧工具区宽度优化版 =====
   调整逻辑：
   1. 不再整体硬移动；
   2. 增加右侧浮动卡片宽度；
   3. 向左扩展宽度；
   4. 与中间栏形成类似左侧栏的呼吸间距；
   5. 不压缩中间交易记录栏。
*/

/* 桌面端 */
.tv-side,
.user-float-card{
  width:320px !important;
  max-width:320px !important;
  right:36px !important;
}

/* TradingView 主卡 */
.tv-lite-card,
.user-float-inner{
  width:100% !important;
}

/* 超宽屏 */
@media (min-width:1600px){
  .tv-side,
  .user-float-card{
    width:340px !important;
    max-width:340px !important;
    right:48px !important;
  }
}

/* 普通笔记本 */
@media (max-width:1440px){
  .tv-side,
  .user-float-card{
    width:290px !important;
    max-width:290px !important;
    right:24px !important;
  }
}

/* 中等屏幕 */
@media (max-width:1200px){
  .tv-side,
  .user-float-card{
    width:240px !important;
    max-width:240px !important;
    right:18px !important;
  }
}

/* 手机 */
@media (max-width:820px){
  .tv-side,
  .user-float-card{
    width:auto !important;
    max-width:none !important;
    left:12px !important;
    right:12px !important;
  }
}

/* ===== DEMO: public invite unlock and invite-code manager ===== */
.unlock-box{
  margin-top:18px;
}
.unlock-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  margin-top:10px;
}
.unlock-form input,
.invite-create input,
.invite-table input{
  min-width:0;
  border:1px solid var(--line);
  border-radius:10px;
  padding:9px 10px;
  background:#fff;
}
.unlock-reset{
  width:100%;
  margin-top:10px;
}
.locked-notice{
  margin-top:16px;
  border:1px dashed #d6b655;
  background:#fffaf0;
  border-radius:16px;
  padding:18px;
  display:grid;
  gap:6px;
  color:#6f4e00;
}
.locked-notice strong{
  font-size:17px;
}
.locked-notice span{
  font-size:13px;
  line-height:1.6;
}
.invite-manager h2{
  margin-bottom:8px;
}
.invite-create{
  display:grid;
  grid-template-columns:minmax(220px,1fr) 140px 160px auto;
  gap:10px;
  margin:16px 0;
  align-items:center;
}
.invite-table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}
.invite-table{
  width:100%;
  border-collapse:collapse;
  min-width:980px;
  font-size:13px;
}
.invite-table th,
.invite-table td{
  border-bottom:1px solid var(--line);
  padding:10px;
  text-align:left;
  vertical-align:middle;
}
.invite-table th{
  background:#fbfbfa;
  color:#666;
  font-size:12px;
  font-weight:750;
}
.invite-table tr:last-child td{
  border-bottom:0;
}
.invite-note{
  width:190px;
}
.invite-max,
.invite-expires{
  width:130px;
}
.invite-actions{
  display:flex;
  gap:7px;
  white-space:nowrap;
}
.invite-actions button{
  padding:7px 9px;
}
.switch-line{
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}
.small-empty{
  padding:20px;
}
@media(max-width:760px){
  .unlock-form,
  .invite-create{
    grid-template-columns:1fr;
  }
  .invite-create button{
    width:100%;
  }
}
