/* ===== 股票工具箱专用样式 v2（统一视觉升级） ===== */

/* --- 页面主体与标题 --- */
#main { max-width: 1200px; }
#header { margin: 0 auto 18px; }
#header h1 { font-size: 26px; letter-spacing: 1px; color: #1e293b; }
#header h1:before { content: ''; display: inline-block; width: 6px; height: 24px; background: linear-gradient(180deg,#2563eb,#4f8ef7); border-radius: 3px; margin-right: 12px; vertical-align: -3px; }

/* --- 使用说明：浅蓝信息卡（替代原黄色警示块） --- */
.gp-explain { background: linear-gradient(135deg,#f0f6ff 0%,#e8f1fe 100%); border: 1px solid #d6e4fb; border-left: 4px solid #2563eb; border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; font-size: 13px; line-height: 1.9; color: #334155; }
.gp-explain h4 { margin: 0 0 6px 0; color: #1d4ed8; font-size: 14px; font-weight: 600; }
.gp-explain h4 i { margin-right: 6px; }

/* --- 区块标题（.gp-sec-title 组件） --- */
.gp-sec-title { display: flex; align-items: center; font-size: 17px; font-weight: 700; margin: 22px 0 14px; padding-bottom: 10px; border-bottom: 2px solid #eef2f7; }
.gp-sec-title i { width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 6px; background: linear-gradient(135deg,#2563eb,#4f8ef7); color: #fff; font-size: 13px; margin-right: 10px; flex-shrink: 0; }
.gp-sec-title .t { background: linear-gradient(90deg,#1e3a8a,#2563eb); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* --- 分区小标题（gp-col / 左栏 h3） --- */
.gp-col h3, .gp-layout-main h3 { font-size: 15px; font-weight: 700; color: #1e293b; margin: 0 0 14px 0; padding: 7px 12px; border-left: 4px solid #2563eb; border-bottom: none; background: linear-gradient(90deg,rgba(37,99,235,.08),transparent); border-radius: 0 8px 8px 0; }

/* --- 表单控件 --- */
.gp-form-group { margin-bottom: 14px; display: flex; align-items: center; }
.gp-form-group label { width: auto; min-width: 98px; font-size: 14px; color: #475569; text-align: left; font-weight: 500; }
.gp-form-group input, .gp-form-group select { width: 200px; height: 38px; padding: 0 12px; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 14px; color: #1e293b; background: #fff; transition: all .2s; box-sizing: border-box; }
.gp-form-group input:hover, .gp-form-group select:hover { border-color: #93b4f5; }
.gp-form-group input:focus, .gp-form-group select:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.gp-form-group input[readonly] { background: #f8fafc; }

/* --- 按钮 --- */
.gp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 26px; background: linear-gradient(135deg,#2563eb,#3b82f6); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; margin: 6px 8px 6px 0; box-shadow: 0 2px 6px rgba(37,99,235,.25); transition: all .2s; }
.gp-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(37,99,235,.35); background: linear-gradient(135deg,#1d4ed8,#2563eb); }
.gp-btn:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(37,99,235,.3); }
.gp-btn-reset { background: #fff; color: #64748b; border: 1.5px solid #d1d5db; box-shadow: none; }
.gp-btn-reset:hover { background: #f1f5f9; color: #1e293b; border-color: #94a3b8; box-shadow: 0 2px 6px rgba(0,0,0,.06); transform: none; }
.gp-btn-reset:active { transform: none; }

/* --- 结果卡 --- */
.gp-result { background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #2563eb; border-radius: 10px; padding: 16px 18px; margin-top: 16px; line-height: 2.1; font-size: 14px; color: #334155; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.gp-result b { color: #1e293b; }
.gp-result .up { color: #e74c3c; font-weight: 600; }
.gp-result .down { color: #27ae60; font-weight: 600; }
.gp-result .primary { color: #2563eb; font-weight: 600; }

/* --- 表格 --- */
.gp-table, .gp-record-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 12px 0; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.gp-table th, .gp-record-table th { background: linear-gradient(180deg,#f8fafc,#f1f5f9); font-weight: 600; color: #334155; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #e2e8f0; }
.gp-table td, .gp-record-table td { padding: 9px 12px; text-align: center; font-size: 13px; border-top: 1px solid #eef2f7; color: #475569; }
.gp-table tr:nth-child(even) td, .gp-record-table tr:nth-child(even) td { background: #fafbfc; }
.gp-table tr:hover td, .gp-record-table tr:hover td { background: #f0f6ff; }
.gp-table .up { color: #e74c3c; font-weight: 600; }
.gp-table .down { color: #27ae60; font-weight: 600; }

/* --- 首页工具卡片 --- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding: 6px 0; }
.tool-card { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 22px 16px; text-align: center; transition: all .3s; text-decoration: none; display: block; position: relative; overflow: hidden; }
.tool-card:before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg,#2563eb,#4f8ef7); opacity: 0; transition: opacity .3s; }
.tool-card:hover { border-color: #2563eb; box-shadow: 0 8px 20px rgba(37,99,235,.12); transform: translateY(-3px); }
.tool-card:hover:before { opacity: 1; }
.tool-card .tool-icon { font-size: 34px; color: #2563eb; margin-bottom: 10px; }
.tool-card .tool-name { font-size: 15px; font-weight: 600; color: #1e293b; margin-bottom: 6px; }
.tool-card .tool-desc { font-size: 12px; color: #94a3b8; line-height: 1.5; }

/* --- 名词解析 --- */
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.glossary-item { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 16px 18px; transition: all .25s; }
.glossary-item:hover { border-color: #93b4f5; box-shadow: 0 4px 14px rgba(37,99,235,.08); }
.glossary-item h3 { font-size: 15px; color: #2563eb; margin: 0 0 8px 0; }
.glossary-item p { font-size: 13px; color: #64748b; line-height: 1.8; margin: 0; }

/* --- 交易记录统计卡 --- */
.gp-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 15px 0; }
.gp-stat-card { background: linear-gradient(135deg,#fff,#f8fafc); border: 1px solid #e9ecef; border-radius: 12px; padding: 16px 10px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.03); }
.gp-stat-num { font-size: 19px; font-weight: 700; color: #2563eb; }
.gp-stat-num.up { color: #e74c3c; }
.gp-stat-num.down { color: #27ae60; }
.gp-stat-label { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* --- 图表容器 --- */
.gp-chart { display: none; width: 100%; max-width: 640px; height: 300px; margin: 18px auto 6px; padding: 12px; background: #fff; border: 1px solid #e9ecef; border-radius: 10px; box-sizing: border-box; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.gp-chart.chart-half { max-width: 420px; height: 260px; }
.gp-chart canvas { width: 100% !important; height: 100% !important; }
.gp-chart-row { display: flex; flex-wrap: wrap; gap: 12px; }
.gp-chart-row .gp-chart { flex: 1; min-width: 300px; margin: 6px 0; }

/* --- 双栏布局：左侧计算+结果，右侧图表 --- */
.gp-layout { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.gp-layout-main { flex: 1; min-width: 320px; }
.gp-layout-side { width: 400px; flex-shrink: 0; position: sticky; top: 12px; }
.gp-layout-side .gp-chart { margin: 0 0 16px 0; }
.gp-layout-side .gp-chart-title { font-size: 15px; font-weight: 700; color: #1e293b; margin: 0 0 6px 0; }
.gp-side-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.gp-side-card h4 { margin: 0 0 4px 0; font-size: 14px; color: #475569; }
@media (max-width: 900px) {
  .gp-layout-side { width: 100%; position: static; }
}

/* --- 图表面板标题 --- */
.gp-side-title { font-size: 15px; font-weight: 700; color: #1e293b; background: linear-gradient(90deg,#2563eb,#4f8ef7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin: 0 0 12px 4px; padding-left: 8px; border-left: 3px solid #2563eb; }

/* --- 您可能需要的 notice 区 --- */
.notice a { color: #2563eb; text-decoration: none; transition: color .2s; }
.notice a:hover { color: #1d4ed8; text-decoration: underline; }

/* --- 响应式 --- */
@media (max-width: 768px) {
  .gp-row { flex-direction: column; }
  .gp-col { min-width: 100%; }
  .gp-form-group label { min-width: 78px; font-size: 13px; }
  .gp-form-group input, .gp-form-group select { width: 150px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .tool-card { padding: 14px 10px; }
  .tool-card .tool-icon { font-size: 28px; }
  .glossary-grid { grid-template-columns: 1fr; }
  .gp-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
/* --- 组合收益动态行 --- */
.zuhe-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; padding: 10px 12px; background: #f8fafc; border: 1px dashed #d1d5db; border-radius: 10px; }
.zuhe-row .gp-form-group { margin-bottom: 0; }
.zuhe-row .gp-form-group input { width: 110px; }
.gp-btn-add { background: linear-gradient(135deg,#059669,#10b981); box-shadow: 0 2px 6px rgba(5,150,105,.25); }
.gp-btn-add:hover { background: linear-gradient(135deg,#047857,#059669); }
.gp-btn-del { background: #fff; color: #e74c3c; border: 1.5px solid #fecaca; box-shadow: none; padding: 8px 12px; margin: 0; }
.gp-btn-del:hover { background: #fef2f2; border-color: #fca5a5; color: #dc2626; transform: none; }
