/* ==========================================================================
   ecom-ops.css · 板块五「电商运营」设计系统（.eo 作用域）
   深夜色驾驶舱 + 电光紫 + 增长青绿；数据看板/增长曲线质感；白天/黑夜双主题
   ========================================================================== */

.eo {
    --eo-violet: #6d4bdb;
    --eo-indigo: #4f5be0;
    --eo-blue: #3563d8;
    --eo-cyan: #0ea5b7;
    --eo-teal: #12a58e;
    --eo-green: #12a150;
    --eo-lime: #5aa832;
    --eo-gold: #dd9213;
    --eo-amber: #e8a93d;
    --eo-red: #e0455e;
    --eo-pink: #d6498c;
    --eo-purple-soft: #8b74e8;

    --eo-ink: #171b26;
    --eo-sub: #555e70;
    --eo-faint: #939bab;

    --eo-bg: #eef0f7;
    --eo-card: #ffffff;
    --eo-card2: #f5f6fb;
    --eo-line: #e4e7f1;
    --eo-track: #e9ebf3;

    --eo-radius: 16px;
    --eo-shadow: 0 12px 32px rgba(38, 34, 92, .10);
    --eo-shadow-soft: 0 4px 14px rgba(38, 34, 92, .07);
    --eo-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --eo-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;

    position: relative;
    color: var(--eo-ink);
    font-family: var(--eo-font);
    line-height: 1.7;
}
:root[data-theme="dark"] .eo {
    --eo-violet: #9a80f2;
    --eo-indigo: #8590f0;
    --eo-blue: #7092ec;
    --eo-cyan: #3fc3d3;
    --eo-teal: #39c4ae;
    --eo-green: #3ec37c;
    --eo-lime: #7fcf5a;
    --eo-gold: #f0ac2e;
    --eo-amber: #f2bf5f;
    --eo-red: #f06a80;
    --eo-pink: #e874ab;
    --eo-purple-soft: #ab98f0;

    --eo-ink: #e8ebf3;
    --eo-sub: #a9b2c4;
    --eo-faint: #76809a;

    --eo-bg: #11141d;
    --eo-card: #1a1e2b;
    --eo-card2: #212637;
    --eo-line: #2c3245;
    --eo-track: #282e40;

    --eo-shadow: 0 12px 32px rgba(0, 0, 0, .4);
    --eo-shadow-soft: 0 4px 14px rgba(0, 0, 0, .32);
}

/* ---------- Hero：数据驾驶舱 ---------- */
.eo-hero {
    position: relative;
    overflow: hidden;
    padding: 40px 38px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(128deg, #13162a 0%, #2b2570 52%, #6d4bdb 128%);
    box-shadow: var(--eo-shadow);
}
:root[data-theme="dark"] .eo-hero {
    background: linear-gradient(128deg, #0e101e 0%, #221d58 52%, #5638b8 128%);
}
.eo-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 34px 34px;
    pointer-events: none;
}
.eo-hero::after {
    content: "📈";
    position: absolute;
    right: 26px;
    bottom: -40px;
    font-size: 170px;
    line-height: 1;
    opacity: .14;
    transform: rotate(-6deg);
}
.eo-breadcrumb { font-size: 13px; opacity: .85; margin-bottom: 14px; position: relative; z-index: 1; }
.eo-breadcrumb a { color: #fff; opacity: .85; }
.eo-breadcrumb a:hover { opacity: 1; }
.eo-hero h1 { position: relative; z-index: 1; font-size: 28px; margin: 0 0 10px; font-weight: 700; letter-spacing: .5px; }
.eo-hero p { position: relative; z-index: 1; margin: 0; max-width: 730px; font-size: 14.5px; opacity: .92; }

/* ---------- 布局 ---------- */
.eo-wrap { max-width: 1080px; margin: 26px auto 0; padding: 0 4px; }
.eo-grid { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: start; }
.eo-card {
    background: var(--eo-card);
    border: 1px solid var(--eo-line);
    border-radius: var(--eo-radius);
    padding: 24px;
    box-shadow: var(--eo-shadow-soft);
}
.eo-card.full { grid-column: 1 / -1; }
.eo-card h2 {
    margin: 0 0 16px; font-size: 17px; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}
.eo-card h2::before {
    content: ""; width: 5px; height: 17px; border-radius: 3px;
    background: linear-gradient(var(--eo-violet), var(--eo-cyan));
}

/* ---------- 表单 ---------- */
.eo-field { margin-bottom: 18px; }
.eo-field:last-child { margin-bottom: 0; }
.eo-field > label { display: block; font-size: 13.5px; font-weight: 600; color: var(--eo-sub); margin-bottom: 8px; }
.eo-input, .eo-select, .eo-textarea {
    width: 100%; box-sizing: border-box;
    padding: 11px 13px; font-size: 14.5px; font-family: inherit;
    color: var(--eo-ink); background: var(--eo-card2);
    border: 1.5px solid var(--eo-line); border-radius: 11px;
    transition: border-color .15s, box-shadow .15s;
}
.eo-input:focus, .eo-select:focus, .eo-textarea:focus {
    outline: none; border-color: var(--eo-violet);
    box-shadow: 0 0 0 3px rgba(109, 75, 219, .15);
}
.eo-textarea { min-height: 78px; resize: vertical; line-height: 1.6; }
.eo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eo-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.eo-suffix { position: relative; }
.eo-suffix .eo-input { padding-right: 44px; }
.eo-suffix em {
    position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
    font-style: normal; font-size: 13px; color: var(--eo-faint); pointer-events: none;
}
.eo-hint { font-size: 12.5px; color: var(--eo-faint); margin-top: 7px; }

/* ---------- 分段选择 / 芯片 ---------- */
.eo-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.eo-seg button, .eo-chip {
    padding: 8px 15px; font-size: 13.5px; font-family: inherit; cursor: pointer;
    color: var(--eo-sub); background: var(--eo-card2);
    border: 1.5px solid var(--eo-line); border-radius: 10px;
    transition: all .15s;
}
.eo-seg button:hover, .eo-chip:hover { border-color: var(--eo-purple-soft); color: var(--eo-violet); }
.eo-seg button.active, .eo-chip.active {
    color: #fff; background: linear-gradient(120deg, var(--eo-violet), var(--eo-indigo));
    border-color: transparent; box-shadow: 0 3px 10px rgba(109, 75, 219, .3);
}

/* ---------- 按钮 ---------- */
.eo-btn {
    width: 100%; padding: 13px; font-size: 15px; font-weight: 600; font-family: inherit;
    color: #fff; cursor: pointer; border: none; border-radius: 12px;
    background: linear-gradient(120deg, var(--eo-violet), var(--eo-indigo));
    box-shadow: 0 6px 18px rgba(109, 75, 219, .32);
    transition: transform .12s, box-shadow .15s, opacity .15s;
}
.eo-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(109, 75, 219, .4); }
.eo-btn:active { transform: translateY(0); }
.eo-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.eo-btn.ghost {
    color: var(--eo-sub); background: var(--eo-card2);
    border: 1.5px solid var(--eo-line); box-shadow: none;
}
.eo-btn.gold { background: linear-gradient(120deg, var(--eo-gold), var(--eo-pink)); box-shadow: 0 6px 18px rgba(221, 146, 19, .3); }

/* ---------- KPI 四格 ---------- */
.eo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.eo-stat {
    position: relative;
    background: var(--eo-card); border: 1px solid var(--eo-line);
    border-radius: 14px; padding: 16px 17px; box-shadow: var(--eo-shadow-soft);
    overflow: hidden;
}
.eo-stat::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--eo-violet);
}
.eo-stat .k { font-size: 12.5px; color: var(--eo-faint); margin-bottom: 6px; }
.eo-stat .v { font-size: 23px; font-weight: 700; font-family: var(--eo-mono); line-height: 1.2; }
.eo-stat .v small { font-size: 12.5px; font-weight: 400; color: var(--eo-faint); font-family: var(--eo-font); margin-left: 3px; }
.eo-stat.is-indigo::before { background: var(--eo-indigo); }
.eo-stat.is-indigo .v { color: var(--eo-indigo); }
.eo-stat.is-cyan::before { background: var(--eo-cyan); }
.eo-stat.is-cyan .v { color: var(--eo-cyan); }
.eo-stat.is-green::before { background: var(--eo-green); }
.eo-stat.is-green .v { color: var(--eo-green); }
.eo-stat.is-gold::before { background: var(--eo-gold); }
.eo-stat.is-gold .v { color: var(--eo-gold); }
.eo-stat.is-red::before { background: var(--eo-red); }
.eo-stat.is-red .v { color: var(--eo-red); }
.eo-stat.is-pink::before { background: var(--eo-pink); }
.eo-stat.is-pink .v { color: var(--eo-pink); }

/* ---------- 结果 / 徽章 ---------- */
.eo-verdict {
    border-radius: 14px; padding: 18px 20px; margin-bottom: 16px;
    background: linear-gradient(120deg, rgba(109, 75, 219, .08), rgba(14, 165, 183, .08));
    border: 1px solid var(--eo-line);
}
.eo-verdict.good { background: linear-gradient(120deg, rgba(18, 161, 80, .10), rgba(14, 165, 183, .08)); }
.eo-verdict.bad { background: linear-gradient(120deg, rgba(224, 69, 94, .10), rgba(221, 146, 19, .08)); }
.eo-verdict .big { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.eo-verdict .sub { font-size: 13.5px; color: var(--eo-sub); }
.eo-badge {
    display: inline-block; padding: 3px 11px; font-size: 12px; font-weight: 600;
    border-radius: 6px; vertical-align: middle;
}
.eo-badge.ok { color: var(--eo-green); background: rgba(18, 161, 80, .13); }
.eo-badge.warn { color: var(--eo-gold); background: rgba(221, 146, 19, .14); }
.eo-badge.hot { color: var(--eo-pink); background: rgba(214, 73, 140, .13); }
.eo-badge.red { color: var(--eo-red); background: rgba(224, 69, 94, .13); }
.eo-badge.blue { color: var(--eo-indigo); background: rgba(79, 91, 224, .12); }
.eo-badge.cyan { color: var(--eo-cyan); background: rgba(14, 165, 183, .13); }
.eo-badge.gray { color: var(--eo-sub); background: var(--eo-track); }

/* ---------- 条目清单 ---------- */
.eo-list { list-style: none; margin: 0; padding: 0; }
.eo-item {
    display: flex; gap: 12px; padding: 13px 4px;
    border-bottom: 1px dashed var(--eo-line); font-size: 14px;
}
.eo-item:last-child { border-bottom: none; }
.eo-item .ico { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; background: var(--eo-card2); }
.eo-item .txt { flex: 1; }
.eo-item .txt b { font-weight: 600; }
.eo-item .txt small { display: block; color: var(--eo-faint); font-size: 12.5px; margin-top: 2px; }

/* ---------- 知识点卡 ---------- */
.eo-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.eo-tip {
    padding: 17px 18px; border-radius: 14px; background: var(--eo-card2);
    border: 1px solid var(--eo-line); border-top: 3px solid var(--eo-violet);
}
.eo-tip:nth-child(2) { border-top-color: var(--eo-cyan); }
.eo-tip:nth-child(3) { border-top-color: var(--eo-gold); }
.eo-tip .th { font-weight: 700; font-size: 14.5px; margin-bottom: 7px; display: flex; gap: 7px; align-items: center; }
.eo-tip p { margin: 0; font-size: 13.3px; color: var(--eo-sub); line-height: 1.7; }

/* ---------- 表格 ---------- */
.eo-table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.eo-table th, .eo-table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--eo-line); }
.eo-table th { color: var(--eo-sub); font-weight: 600; font-size: 12.8px; background: var(--eo-card2); }
.eo-table tr:last-child td { border-bottom: none; }
.eo-table td.num, .eo-table th.num { text-align: right; font-family: var(--eo-mono); }
.eo-table tr.is-best td { background: rgba(18, 161, 80, .08); }
.eo-table tr.is-bad td { background: rgba(224, 69, 94, .07); }

/* ---------- 柱状图（纯 CSS，由 JS 填高度/颜色） ---------- */
.eo-chart {
    display: flex; align-items: flex-end; gap: 10px;
    min-height: 170px; padding: 14px 6px 0;
    border-bottom: 2px solid var(--eo-line);
}
.eo-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.eo-chart .bar {
    width: 100%; max-width: 46px; min-height: 3px;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, var(--eo-violet), var(--eo-indigo));
    transition: height .25s ease;
}
.eo-chart .bar.good { background: linear-gradient(180deg, var(--eo-cyan), var(--eo-green)); }
.eo-chart .bar.warn { background: linear-gradient(180deg, var(--eo-amber), var(--eo-gold)); }
.eo-chart .bar.bad { background: linear-gradient(180deg, var(--eo-pink), var(--eo-red)); }
.eo-chart .num { font-size: 11.5px; font-family: var(--eo-mono); color: var(--eo-sub); }
.eo-chart .cap { font-size: 11.5px; color: var(--eo-faint); white-space: nowrap; }
.eo-chart-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12.5px; color: var(--eo-sub); flex-wrap: wrap; }
.eo-chart-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- AI 生成结果 ---------- */
.eo-loading { display: flex; align-items: center; gap: 12px; padding: 24px; color: var(--eo-sub); font-size: 14px; justify-content: center; }
.eo-spinner {
    width: 22px; height: 22px; border-radius: 50%;
    border: 3px solid var(--eo-track); border-top-color: var(--eo-violet);
    animation: eo-spin .8s linear infinite;
}
@keyframes eo-spin { to { transform: rotate(360deg); } }

.eo-gen .eo-gen-item { margin-bottom: 18px; }
.eo-gen .eo-gen-item:last-child { margin-bottom: 0; }
.eo-gen .gh {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-bottom: 9px;
}
.eo-gen .gh .gt { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eo-copy {
    flex: none; padding: 5px 13px; font-size: 12.5px; font-family: inherit; cursor: pointer;
    color: var(--eo-violet); background: transparent; border: 1.5px solid var(--eo-line);
    border-radius: 8px; transition: all .15s;
}
.eo-copy:hover { border-color: var(--eo-violet); background: var(--eo-card2); }
.eo-copy.done { color: var(--eo-green); border-color: var(--eo-green); }
.eo-gen .body {
    white-space: pre-wrap; font-size: 14.3px; line-height: 1.85;
    background: var(--eo-card2); border: 1px solid var(--eo-line);
    border-radius: 11px; padding: 16px 18px;
}
.eo-gen .meta { margin-top: 8px; font-size: 12.5px; color: var(--eo-faint); }
.eo-gen .meta .eo-badge { margin-right: 6px; }
.eo-empty { text-align: center; padding: 48px 20px; color: var(--eo-faint); font-size: 14px; }
.eo-empty .em { font-size: 44px; display: block; margin-bottom: 12px; opacity: .7; }

/* ---------- 趋势胶囊（装饰标签） ---------- */
.eo-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px;
    border: 1.5px dashed var(--eo-gold); border-radius: 999px;
    color: var(--eo-gold); font-size: 12.5px; font-weight: 600;
}

/* ---------- 提示条 ---------- */
.eo-note {
    margin-top: 20px; padding: 14px 18px; border-radius: 12px; font-size: 13.3px;
    background: var(--eo-card2); border: 1px solid var(--eo-line); color: var(--eo-sub);
}
.eo-note.warn { border-left: 4px solid var(--eo-gold); }
.eo-note.red { border-left: 4px solid var(--eo-red); }
.eo-note b { color: var(--eo-ink); }

/* ---------- 保存提示 ---------- */
.eo-saved {
    position: fixed; right: 26px; bottom: 26px; z-index: 99;
    padding: 11px 20px; border-radius: 11px; font-size: 13.5px; color: #fff;
    background: rgba(20, 23, 38, .92); box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.eo-saved.show { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .eo-grid { grid-template-columns: 1fr; }
    .eo-stats { grid-template-columns: repeat(2, 1fr); }
    .eo-tips { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .eo-hero { padding: 28px 22px; }
    .eo-hero h1 { font-size: 22px; }
    .eo-card { padding: 19px; }
    .eo-row, .eo-row-3 { grid-template-columns: 1fr; }
    .eo-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .eo-stat .v { font-size: 19px; }
    .eo-chart { gap: 5px; }
}

/* ---------- 打印 ---------- */
@media print {
    .eo-hero, .eo-breadcrumb, .eo-saved, .eo-btn, .eo-copy, .no-print { display: none !important; }
    .eo { --eo-bg: #fff; }
    .eo-card, .eo-stat { box-shadow: none; border-color: #ccc; break-inside: avoid; }
    .eo-grid, .eo-stats { display: block; }
    .eo-stat { display: inline-block; width: 46%; margin: 4px; }
}
