* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: #222;
    line-height: 1.6;
    background: #fff;
}

a { color: inherit; text-decoration: none; }

/* ── Header ── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 56px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #eee;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
}

.brand-mark {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: #16a34a;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
}

.site-nav {
    display: flex;
    gap: 32px;
    font-size: 14px;
    color: #888;
}

.site-nav a:hover { color: #16a34a; }

/* ── Button ── */

.btn {
    display: inline-block;
    padding: 12px 36px;
    background: #16a34a;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #16a34a;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover { background: #15803d; border-color: #15803d; }

.btn-outline {
    background: transparent;
    color: #16a34a;
}

.btn-outline:hover {
    background: #16a34a;
    color: #fff;
}

/* ── Hero ── */

.hero {
    text-align: center;
    padding: 100px 20px 80px;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}

.hero-badge {
    display: inline-block;
    padding: 6px 20px;
    background: #dcfce7;
    color: #15803d;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero p {
    font-size: 17px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 36px;
}

/* ── Features ── */

.features {
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 48px;
}

.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feat {
    padding: 32px 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
}

.feat:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.feat-ico {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 10px;
    font-size: 18px;
    margin-bottom: 16px;
}

.feat h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feat p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* ── Pricing ── */

.pricing {
    padding: 80px 20px;
    background: #fafafa;
}

.pricing h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-sub {
    text-align: center;
    color: #888;
    font-size: 15px;
    margin-bottom: 48px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 720px;
    margin: 0 auto;
}

.price-card {
    position: relative;
    padding: 36px 28px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-align: center;
}

.price-card.hot {
    border: 2px solid #16a34a;
    box-shadow: 0 8px 30px rgba(22,163,74,0.12);
}

.hot-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: #16a34a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
}

.price-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.price-num {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 24px;
    color: #111;
}

.price-tag {
    display: inline-block;
    padding: 6px 18px;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.price-card.hot .price-tag {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.price-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 28px;
}

.price-card li {
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f3f4f6;
}

.price-card li::before {
    content: "✓ ";
    color: #16a34a;
    font-weight: 700;
}

.price-card .btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

/* ── Contact ── */

.contact {
    padding: 80px 20px;
    text-align: center;
}

.contact h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.contact > p {
    color: #888;
    font-size: 15px;
    margin-bottom: 32px;
}

.contact-card {
    display: inline-block;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 320px;
}

.contact-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 32px;
}

.contact-row + .contact-row {
    border-top: 1px solid #e5e7eb;
}

.contact-row span {
    color: #888;
    font-size: 15px;
}

.contact-row strong {
    font-size: 17px;
    letter-spacing: 0.5px;
}

.small-text {
    margin-top: 16px;
    color: #aaa;
    font-size: 13px;
}

/* ── Footer ── */

.site-footer {
    padding: 20px 40px;
    text-align: center;
    color: #ccc;
    font-size: 13px;
    border-top: 1px solid #f0f0f0;
}

/* ── Smooth scroll ── */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 60px;
}

/* ── Admin page ── */

/* ── 下载页 ── */

.download-hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}

.download-hero .hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #16a34a;
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    margin-bottom: 20px;
}

.download-hero h1 {
    font-size: 38px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
}

.download-hero > p {
    font-size: 16px;
    color: #555;
    margin-bottom: 36px;
    line-height: 1.7;
}

.download-hero > p strong {
    color: #16a34a;
    font-weight: 700;
}

.dl-card {
    max-width: 580px;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #16a34a;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(22, 163, 74, 0.15);
}

.dl-card-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.dl-ico {
    font-size: 48px;
    line-height: 1;
}

.dl-info {
    flex: 1;
}

.dl-name {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.dl-meta {
    font-size: 13px;
    color: #94a3b8;
}

.btn-dl {
    display: block;
    width: 100%;
    padding: 18px;
    background: #16a34a;
    color: #fff !important;
    text-align: center;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.btn-dl:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.3);
}

.dl-tips {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
}

.dl-sys {
    max-width: 580px;
    margin: 32px auto 0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px 24px;
    text-align: left;
}

.dl-sys h3 {
    font-size: 15px;
    color: #0f172a;
    margin-bottom: 10px;
}

.dl-sys ul {
    list-style: none;
    padding: 0;
}

.dl-sys li {
    font-size: 14px;
    color: #555;
    padding: 4px 0;
}

/* 三步使用 */

.dl-steps {
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.dl-steps h2 {
    text-align: center;
    font-size: 28px;
    color: #0f172a;
    margin-bottom: 36px;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    transition: all 0.2s;
}

.step:hover {
    border-color: #16a34a;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.step h3 {
    font-size: 17px;
    color: #0f172a;
    margin-bottom: 8px;
}

.step p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* FAQ */

.dl-faq {
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
    background: #f8fafc;
}

.dl-faq h2 {
    text-align: center;
    font-size: 28px;
    color: #0f172a;
    margin-bottom: 36px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 22px;
}

.faq-item h3 {
    font-size: 15px;
    color: #0f172a;
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

.faq-item strong {
    color: #16a34a;
    font-weight: 700;
}

/* 联系 */

.dl-contact {
    padding: 60px 20px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.dl-contact h2 {
    font-size: 26px;
    color: #0f172a;
    margin-bottom: 8px;
}

.dl-contact > p {
    color: #555;
    margin-bottom: 24px;
}

/* ── Admin: Login ── */

.admin-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 57px);
    background: #f5f5f5;
}

.admin-login-card {
    width: 380px;
    padding: 40px 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.admin-login-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.admin-login-header h2 {
    font-size: 20px;
    margin: 0;
}

.login-result {
    margin-top: 12px;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #888;
    font-size: 13px;
    font-family: inherit;
    white-space: pre-wrap;
    min-height: 20px;
}

.login-result:empty { display: none; }

/* ── Admin: Top bar ── */

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
    background: #1a1a1a;
    color: #fff;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.admin-topbar .brand-mark {
    background: #16a34a;
}

.admin-topbar .btn-outline {
    color: #ccc;
    border-color: #555;
    padding: 6px 16px;
    font-size: 13px;
}

.admin-topbar .btn-outline:hover {
    color: #fff;
    border-color: #888;
    background: transparent;
}

/* ── Admin: Body ── */

.admin-body {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* ── Admin: Stats ── */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.stat {
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 28px;
    line-height: 1.2;
    color: #111;
}

.stat span {
    font-size: 12px;
    color: #999;
}

/* ── Admin: Sections ── */

.admin-section {
    margin-bottom: 28px;
}

.admin-section h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.admin-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-section-grid h2 {
    border-bottom: none;
    padding-bottom: 0;
}

/* ── Admin: Panel & Form ── */

.panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
}

.model-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.software-config-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
    padding: 16px 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

.software-config-toolbar > div { display: grid; gap: 4px; }
.software-config-list { display: grid; gap: 18px; }

.software-config-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 28px 0 14px;
    padding-top: 22px;
    border-top: 2px solid #e2e8f0;
}

.software-config-section-head h2 { margin: 0 0 5px; font-size: 20px; }
.software-config-section-head p { margin: 0; }
.software-card.standalone.is-disabled > header { opacity: .62; }

.ai-config-card {
    overflow: hidden;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.ai-config-card.is-disabled { background: #f8fafc; }

.ai-config-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid #dfe7ef;
    background: linear-gradient(135deg, #f8fffb 0%, #f5f9ff 100%);
}

.ai-config-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #059669, #2563eb);
    box-shadow: 0 6px 16px rgba(5, 150, 105, .2);
    font-size: 16px;
    font-weight: 800;
}

.ai-config-title { min-width: 0; }
.ai-config-kicker { margin-bottom: 3px; color: #64748b; font-size: 11px; font-weight: 600; }
.ai-config-title h3 { display: inline; margin: 0 8px 0 0; color: #172033; font-size: 19px; }
.ai-config-title code { color: #64748b; font-size: 11px; }

.ai-config-state { display: flex; align-items: center; gap: 8px; }
.model-badge, .status-badge {
    display: inline-flex;
    align-items: center;
    height: 27px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.model-badge { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; }
.status-badge { gap: 6px; color: #64748b; background: #f1f5f9; }
.status-badge i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.status-badge.success { color: #047857; background: #ecfdf5; }
.status-badge.success i { background: #10b981; }
.status-badge.failed { color: #b91c1c; background: #fef2f2; }
.status-badge.failed i { background: #ef4444; }

.ai-config-card .software-config-form { gap: 18px; padding: 20px 22px 22px; background: #fff; }
.ai-config-card.is-disabled .software-config-form { background: #f8fafc; }
.ai-config-columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr); gap: 16px; }

.ai-config-block {
    display: grid;
    align-content: start;
    gap: 13px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
}

.ai-block-head { padding-bottom: 10px; border-bottom: 1px solid #e2e8f0; }
.ai-block-head > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ai-block-head strong { color: #1e293b; font-size: 14px; }
.ai-block-head span { color: #94a3b8; font-size: 11px; }
.compact-fields { gap: 10px; }
.field-hint { margin-top: 1px; color: #94a3b8; font-size: 11px; font-weight: 400; }

.parameter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.parameter-grid label {
    gap: 4px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}
.parameter-grid label > span { color: #475569; font-size: 11px; }
.parameter-grid input { padding: 7px 8px; font-size: 13px; font-weight: 700; }
.parameter-grid small { color: #94a3b8; font-size: 10px; font-weight: 400; }

.config-switch-list { display: grid; gap: 8px; }
.config-switch-list > label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}
.config-switch-list span { display: grid; gap: 2px; }
.config-switch-list strong { color: #334155; font-size: 12px; }
.config-switch-list small { color: #94a3b8; font-size: 10px; font-weight: 400; }
.config-switch-list input[type="checkbox"] {
    width: 38px;
    height: 21px;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: background .15s;
}
.config-switch-list input[type="checkbox"]::after {
    content: '';
    width: 17px;
    height: 17px;
    position: absolute;
    top: 2px;
    left: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15,23,42,.25);
    transition: transform .15s;
}
.config-switch-list input[type="checkbox"]:checked { background: #16a34a; }
.config-switch-list input[type="checkbox"]:checked::after { transform: translateX(17px); }

.prompt-editor { border: 1px solid #dbe3ec; border-radius: 11px; background: #fff; }
.prompt-editor > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}
.prompt-editor > summary::-webkit-details-marker { display: none; }
.prompt-editor > summary > span { display: grid; gap: 3px; }
.prompt-editor > summary strong { color: #1e293b; font-size: 13px; }
.prompt-editor > summary small { color: #94a3b8; font-size: 11px; }
.prompt-editor > summary em { color: #2563eb; font-size: 11px; font-style: normal; font-weight: 600; }
.prompt-editor[open] > summary { border-bottom: 1px solid #e2e8f0; }
.prompt-editor[open] > summary em { font-size: 0; }
.prompt-editor[open] > summary em::after { content: '收起'; font-size: 11px; }
.prompt-editor-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; background: #f8fafc; }
.prompt-editor textarea { min-height: 180px; background: #fff; line-height: 1.55; }

.ai-config-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 2px;
}
.ai-config-actions .button-row { margin: 0; }
.config-effective { display: flex; align-items: center; gap: 7px; color: #64748b; font-size: 11px; }
.config-effective i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.ai-config-result:empty { display: none; }
.ai-config-result { min-height: 0; margin: 0; }

.ai-page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ai-page-head h1 { margin-bottom: 3px; }

.ai-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 14px;
    border: 1px solid #dce3ea;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(15,23,42,.04);
}
.ai-overview-grid > div { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-right: 1px solid #e8edf2; }
.ai-overview-grid > div:last-child { border-right: 0; }
.ai-overview-grid p { display: grid; gap: 3px; margin: 0; color: #7b8794; font-size: 11px; }
.ai-overview-grid strong { color: #273240; font-size: 23px; line-height: 1; }
.overview-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; font-size: 18px; font-weight: 800; }
.overview-icon.green { color: #0f9f63; background: #ebfaf2; }
.overview-icon.blue { color: #3767e8; background: #edf3ff; }
.overview-icon.cyan { color: #0796a7; background: #eaf9fb; }
.overview-icon.red { color: #e34949; background: #fff0f0; }

.ai-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 14px; margin-bottom: 14px; }
.ai-dashboard-panel { overflow: hidden; border: 1px solid #dce3ea; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(15,23,42,.04); }
.ai-dashboard-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 12px 17px; border-bottom: 1px solid #e5eaf0; }
.ai-dashboard-panel > header h3 { margin: 0 0 2px; color: #273240; font-size: 16px; }
.ai-dashboard-panel > header span { color: #94a0ac; font-size: 11px; }
.ai-table-wrap { overflow-x: auto; }
.ai-config-table { font-size: 12px; }
.ai-config-table th { padding: 10px 13px; color: #7b8794; background: #fafbfc; text-transform: none; letter-spacing: 0; }
.ai-config-table td { height: 48px; padding: 9px 13px; color: #52606d; }
.ai-config-table td:first-child { display: table-cell; color: #273240; }
.ai-config-table td:first-child strong { vertical-align: middle; }
.ai-config-table td:first-child small { display: block; margin-top: 2px; color: #98a3af; }
.ai-config-table code { color: #475569; font-size: 11px; }
.model-row-icon { width: 29px; height: 29px; display: inline-grid; place-items: center; margin-right: 8px; border-radius: 7px; vertical-align: middle; font-size: 11px; font-weight: 700; }
.model-row-icon.text { color: #5b56d6; background: #f0efff; }
.model-row-icon.image { color: #306bea; background: #edf4ff; }
.table-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 11px; }
.table-status i { width: 6px; height: 6px; border-radius: 50%; }
.table-status.on { color: #078653; background: #ebfaf2; }
.table-status.on i { background: #16a56a; }
.table-status.off { color: #7b8794; background: #f1f3f5; }
.table-status.off i { background: #94a0ac; }
.table-edit-btn { padding: 5px 11px; border: 1px solid #d7dee6; border-radius: 5px; color: #44515e; background: #fff; font-size: 11px; }
.table-edit-btn:hover { color: #078653; border-color: #8fd5b4; }

.quick-test-panel { padding-bottom: 14px; }
.quick-test-panel > label { display: grid; gap: 5px; margin: 12px 16px; color: #52606d; font-size: 11px; font-weight: 600; }
.quick-test-panel select { padding: 8px 10px; }
.quick-endpoint { display: grid; gap: 4px; margin: 10px 16px; padding: 9px 11px; border: 1px solid #e1e7ed; border-radius: 6px; background: #fafbfc; }
.quick-endpoint span { color: #8a96a3; font-size: 10px; }
.quick-endpoint strong { color: #334155; font-size: 12px; }
.quick-endpoint code { overflow: hidden; color: #52606d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quick-test-button { width: calc(100% - 32px); margin: 2px 16px 10px; }
.quick-test-result { display: flex; align-items: center; gap: 9px; margin: 0 16px; padding: 10px 12px; border-radius: 7px; color: #64748b; background: #f3f5f7; font-size: 11px; }
.quick-test-result i { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.quick-test-result.loading i { background: #eab308; }
.quick-test-result.success { color: #067647; background: #ecfdf3; }
.quick-test-result.success i { background: #12b76a; }
.quick-test-result.failed { color: #b42318; background: #fef3f2; }
.quick-test-result.failed i { background: #f04438; }
.binding-panel { margin-bottom: 14px; }

.ai-config-editors { display: grid; gap: 10px; margin-top: 14px; }
.ai-config-editors > h3 { margin: 4px 0 0; color: #34404c; font-size: 16px; }
.ai-config-editor { border: 1px solid #dce3ea; border-radius: 9px; background: #fff; }
.ai-config-editor > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; cursor: pointer; list-style: none; }
.ai-config-editor > summary::-webkit-details-marker { display: none; }
.ai-config-editor > summary > span { display: grid; gap: 2px; }
.ai-config-editor > summary strong { color: #34404c; font-size: 13px; }
.ai-config-editor > summary small { color: #98a3af; font-size: 10px; }
.ai-config-editor > summary em { color: #078653; font-size: 11px; font-style: normal; }
.ai-config-editor[open] > summary { border-bottom: 1px solid #e5eaf0; }
.ai-config-editor[open] > summary em::before { content: '收起'; font-size: 11px; }
.ai-config-editor[open] > summary em { font-size: 0; }
.ai-config-editor .ai-config-card { border: 0; border-radius: 0 0 9px 9px; box-shadow: none; }

.software-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.software-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #16a34a);
}

.software-card > header > div { display: flex; align-items: center; gap: 10px; }
.software-card > header h2 { margin: 0; font-size: 19px; }
.software-card > header > span { font-size: 12px; color: #dcfce7; }

.software-card > header code,
.software-feature summary code {
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 11px;
}

.software-card > header code { color: #dcfce7; background: rgba(255,255,255,.14); }
.software-feature-list { display: grid; }
.software-feature { border-bottom: 1px solid #e5e7eb; }
.software-feature:last-child { border-bottom: 0; }

.software-feature > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 22px;
    cursor: pointer;
    list-style-position: inside;
    background: #fff;
}

.software-feature > summary:hover { background: #f8fafc; }
.software-feature > summary > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.software-feature summary code { color: #64748b; background: #f1f5f9; }

.software-feature-meta {
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.software-feature.is-disabled > summary { opacity: .58; }

.software-config-form {
    padding: 20px 22px 24px;
    border-top: 1px solid #eef2f7;
    background: #fbfdff;
}

.software-advanced {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.software-advanced > summary,
.legacy-configs > summary {
    cursor: pointer;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.software-advanced[open] > summary { margin-bottom: 14px; }
.software-advanced > label, .software-advanced > div { margin-top: 12px; }
.software-checks { align-items: center; padding-top: 22px; }
.btn.danger { color: #b91c1c; border-color: #fecaca; }

.legacy-configs {
    margin-top: 22px;
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
}

.legacy-configs > summary { margin-bottom: 14px; }

.panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.form { display: grid; gap: 14px; }

.form label {
    display: grid;
    gap: 5px;
    color: #555;
    font-size: 13px;
    font-weight: 600;
}

.form label.inline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.form-checks {
    display: flex;
    gap: 24px;
}

.form-inline-quota {
    display: grid;
    grid-template-columns: 80px 100px 1fr auto;
    gap: 10px;
    align-items: end;
}

input, select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    color: #222;
    background: #fff;
}

textarea {
    resize: vertical;
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 13px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.button-row { display: flex; gap: 10px; margin-top: 4px; }

.result-box {
    margin-top: 14px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #666;
    min-height: 50px;
    overflow: auto;
    white-space: pre-wrap;
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 13px;
}

.hidden { display: none !important; }

/* ── Admin: Table ── */

.table-wrap {
    margin-top: 14px;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; text-align: left; white-space: nowrap; }
th { background: #f9fafb; color: #888; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }

.mini-list { display: grid; gap: 8px; }
.mini-item { padding: 12px; border: 1px solid #e5e7eb; border-radius: 8px; }
.mini-item strong { font-size: 13px; }
.mini-item small { display: block; color: #888; font-size: 12px; margin-top: 2px; }

table .empty { text-align: center; color: #94a3b8; padding: 30px !important; font-size: 13px; }
.muted { color: #94a3b8; font-size: 13px; }
.hidden { display: none !important; }

/* ── Admin: Sidebar Layout ── */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 52px);
    background: #f5f7fa;
}

.admin-sidebar {
    background: linear-gradient(180deg, #1b2530, #151d26);
    border-right: 1px solid #202b36;
    padding: 18px 0;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #c4ced8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    position: relative;
}

.admin-nav-item:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
}

.admin-nav-item.active {
    background: #303d4b;
    color: #fff;
    border-left-color: #20b56a;
    font-weight: 600;
}

.admin-nav-item .ico {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.admin-nav-item .badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.admin-content {
    padding: 32px 40px;
    max-width: 1440px;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.content-head {
    margin-bottom: 24px;
}

.content-head h1 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}

.content-sub {
    color: #94a3b8;
    font-size: 13px;
    margin: 0;
}

/* ── Admin: Software releases ── */
.release-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.release-admin-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr); gap: 18px; margin-bottom: 18px; }
.release-upload-panel, .release-guide-panel, .release-list-panel { border: 1px solid #e2e8f0; box-shadow: 0 8px 24px rgba(15, 23, 42, .04); }
.release-panel-title { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.release-panel-title h3, .release-list-panel h3, .release-guide-panel h3 { margin: 0; color: #0f172a; font-size: 17px; }
.release-panel-title p, .release-list-panel header p { margin: 3px 0 0; color: #94a3b8; font-size: 12px; }
.release-panel-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #10b981, #15803d); font-size: 24px; font-weight: 700; }
.release-current-check { display: flex !important; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid #bbf7d0; border-radius: 10px; background: #f0fdf4; cursor: pointer; }
.release-current-check input { width: auto; margin-top: 3px; }
.release-current-check span { display: grid; gap: 2px; }
.release-current-check strong { color: #166534; font-size: 13px; }
.release-current-check small { color: #4d7c5c; font-size: 12px; }
.release-submit { width: 100%; min-height: 44px; font-weight: 700; }
.release-progress { padding: 12px 14px; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; }
.release-progress > div { display: flex; justify-content: space-between; margin-bottom: 7px; color: #475569; font-size: 12px; }
.release-progress progress { width: 100%; height: 8px; accent-color: #16a34a; }
.release-result { padding: 12px 14px; border-radius: 9px; font-size: 13px; }
.release-result.success { display: block; color: #166534; background: #ecfdf5; border: 1px solid #bbf7d0; }
.release-result.error { display: block; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.release-guide-panel { position: relative; overflow: hidden; background: linear-gradient(155deg, #17212b, #1e293b); color: #fff; }
.release-guide-panel::after { content: ''; position: absolute; width: 180px; height: 180px; right: -90px; top: -90px; border-radius: 999px; background: rgba(52, 211, 153, .12); }
.release-guide-panel h3 { color: #fff; margin: 12px 0 20px; font-size: 19px; }
.release-guide-badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; color: #6ee7b7; background: rgba(16, 185, 129, .14); font-size: 11px; font-weight: 700; }
.release-guide-panel ol { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: release-step; }
.release-guide-panel li { display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; counter-increment: release-step; }
.release-guide-panel li::before { content: counter(release-step); display: grid; place-items: center; grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 8px; color: #064e3b; background: #6ee7b7; font-weight: 800; font-size: 12px; }
.release-guide-panel li strong { font-size: 13px; }
.release-guide-panel li span { color: #94a3b8; font-size: 12px; margin-top: 2px; }
.release-server-note { margin-top: 24px; padding: 13px; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .2); background: rgba(15, 23, 42, .45); }
.release-server-note strong { color: #fbbf24; font-size: 12px; }
.release-server-note p { margin: 5px 0 0; color: #cbd5e1; font-size: 11px; line-height: 1.65; }
.release-server-note code { color: #fff; }
.release-list-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.release-table td > strong { display: block; color: #0f172a; }
.release-table td > small { display: block; color: #94a3b8; margin-top: 3px; font-size: 11px; }
.release-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.release-status i { width: 7px; height: 7px; border-radius: 50%; }
.release-status.current { color: #047857; background: #d1fae5; }
.release-status.current i { background: #10b981; }
.release-status.archived { color: #64748b; background: #f1f5f9; }
.release-status.archived i { background: #94a3b8; }
.release-file-name { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.release-hash { padding: 4px 6px; color: #475569; background: #f1f5f9; border-radius: 5px; font-size: 11px; }
.release-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 210px; }
.release-action { border: 1px solid #dbe3ea; border-radius: 6px; background: #fff; color: #475569; padding: 5px 8px; font-size: 11px; cursor: pointer; text-decoration: none; }
.release-action:hover { border-color: #16a34a; color: #15803d; }
.release-action.primary { color: #fff; border-color: #16a34a; background: #16a34a; }
.release-action.danger { color: #dc2626; }
.release-action.danger:hover { border-color: #dc2626; }

.managed-downloads { display: grid; gap: 16px; width: min(760px, 100%); margin: 24px auto; }
.managed-downloads-head { display: flex; align-items: center; justify-content: space-between; color: #64748b; font-size: 12px; }
.managed-downloads-head span { color: #047857; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.managed-download-card { width: 100%; margin: 0; border-color: #a7f3d0; box-shadow: 0 10px 32px rgba(16, 185, 129, .09); }
.managed-release-notes { margin: 0 0 14px; padding: 10px 12px; color: #475569; background: #f8fafc; border-radius: 8px; white-space: pre-line; text-align: left; font-size: 13px; line-height: 1.6; }
.managed-checksum { margin-top: 10px; overflow: hidden; color: #94a3b8; font: 10px/1.4 Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }

/* ── Feedback ── */

.feedback-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.fb-tab {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

.fb-tab:hover { border-color: #16a34a; color: #16a34a; }

.fb-tab.active {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fb-item {
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.fb-item:hover {
    background: #fff;
    border-color: #16a34a;
    box-shadow: 0 2px 8px rgba(22,163,74,0.08);
}

.fb-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.fb-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.fb-tag.auto_error { background: #fee2e2; color: #b91c1c; }
.fb-tag.manual { background: #dbeafe; color: #1d4ed8; }
.fb-tag.web { background: #f3e8ff; color: #6b21a8; }

.fb-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.fb-status.open { background: #fef3c7; color: #92400e; }
.fb-status.handling { background: #dbeafe; color: #1e40af; }
.fb-status.resolved { background: #d1fae5; color: #065f46; }
.fb-status.closed { background: #e5e7eb; color: #6b7280; }

.fb-item-title {
    font-weight: 600;
    color: #0f172a;
    margin-right: auto;
}

.fb-item-time {
    color: #94a3b8;
    font-size: 12px;
}

.fb-item-meta {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 4px;
}

.fb-item-content {
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.fb-item-error {
    margin-top: 6px;
    padding: 8px 10px;
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    color: #991b1b;
    border-radius: 4px;
    word-break: break-all;
    max-height: 80px;
    overflow: hidden;
}

/* ── Modal ── */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden { display: none; }

.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.modal-body {
    position: relative;
    width: 90%;
    max-width: 820px;
    max-height: 85vh;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-head h3 {
    font-size: 16px;
    margin: 0;
    color: #0f172a;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0 6px;
}

.modal-close:hover { color: #ef4444; }

.modal-content {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
}

.modal-foot {
    padding: 12px 22px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.fb-detail-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px 16px;
    margin-bottom: 20px;
    font-size: 13px;
}

.fb-detail-grid dt {
    color: #64748b;
    font-weight: 500;
}

.fb-detail-grid dd {
    margin: 0;
    color: #0f172a;
}

.fb-detail-section {
    margin-bottom: 20px;
}

.fb-detail-section h4 {
    font-size: 13px;
    color: #475569;
    margin: 0 0 6px;
    font-weight: 600;
}

.fb-detail-section pre {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    line-height: 1.5;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.fb-detail-section.error pre {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .site-header { padding: 0 16px; flex-direction: column; align-items: flex-start; height: auto; padding: 12px 16px; gap: 8px; }
    .hero { padding: 60px 16px 50px; }
    .hero h1 { font-size: 28px; }
    .feat-grid, .price-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .contact-card { min-width: auto; width: 100%; max-width: 360px; }
    .admin-stats { grid-template-columns: repeat(3, 1fr); }
    .admin-section-grid { grid-template-columns: 1fr; }
    .form-grid-2, .form-grid-3, .model-config-grid { grid-template-columns: 1fr; }
    .form-inline-quota { grid-template-columns: 1fr; }
    .admin-topbar { padding: 12px 16px; }
    .admin-body { padding: 16px; }
    .admin-login-card { width: calc(100% - 32px); padding: 28px 20px; }
    .form-checks { flex-direction: column; gap: 10px; }
    .software-config-toolbar, .software-card > header, .software-feature > summary { align-items: flex-start; flex-direction: column; }
    .software-config-section-head { align-items: stretch; flex-direction: column; }
    .software-config-toolbar .btn { width: 100%; }
    .software-feature-meta { max-width: 100%; white-space: normal; }
    .software-config-form { padding: 16px; }
    .ai-config-head { grid-template-columns: auto 1fr; padding: 15px; }
    .ai-config-state { grid-column: 1 / -1; flex-wrap: wrap; }
    .ai-config-columns, .prompt-editor-body { grid-template-columns: 1fr; }
    .parameter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ai-config-actions { align-items: stretch; flex-direction: column; }
    .ai-config-actions .button-row { flex-wrap: wrap; }
    .ai-page-head { align-items: stretch; flex-direction: column; }
    .ai-overview-grid { grid-template-columns: repeat(2, 1fr); }
    .ai-overview-grid > div:nth-child(2) { border-right: 0; }
    .ai-dashboard-grid { grid-template-columns: 1fr; }
    .release-page-head { align-items: stretch; flex-direction: column; }
    .release-admin-grid { grid-template-columns: 1fr; }

    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; max-height: none; }
    .admin-nav { flex-direction: row; overflow-x: auto; padding: 0 12px; }
    .admin-nav-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; padding: 12px 14px; }
    .admin-nav-item.active { border-left-color: transparent; border-bottom-color: #16a34a; }
    .admin-content { padding: 20px 16px; }

    .download-hero h1 { font-size: 26px; }
    .download-hero { padding: 40px 16px 28px; }
    .dl-card { padding: 20px; }
    .dl-card-head { flex-direction: column; text-align: center; gap: 8px; }
    .dl-tips { flex-direction: column; gap: 6px; }
    .step-grid { grid-template-columns: 1fr; }
    .dl-steps, .dl-faq, .dl-contact { padding: 40px 16px; }
    .launch-strip,
    .snap-hero,
    .snap-grid {
        grid-template-columns: 1fr;
    }
    .launch-strip {
        margin: 20px 16px 0;
        padding: 20px;
    }
    .snap-hero {
        padding: 46px 16px 38px;
    }
    .snap-hero h1 {
        font-size: 30px;
    }
    .snap-section {
        padding: 42px 16px;
    }
    .snap-download-panel {
        margin: 0 16px 46px;
        flex-direction: column;
        align-items: stretch;
    }
    .snap-download-panel .btn {
        text-align: center;
    }
}

/* Spreadsheet image exporter */

.hidden { display: none !important; }

.sheet-tool {
    min-height: calc(100vh - 68px);
    background: #f6f8fb;
    color: #172033;
}

.tool-topbar {
    height: 64px;
    padding: 0 28px;
    border-bottom: 1px solid #dbe3ee;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #101827;
    font-weight: 700;
    text-decoration: none;
}

.tool-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: #0f766e;
    font-size: 16px;
}

.tool-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-badge,
.tool-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 0 12px;
    background: #e8f0f6;
    color: #42526b;
    font-size: 13px;
    font-weight: 600;
}

.tool-pill {
    background: #ecfdf3;
    color: #147345;
    text-transform: uppercase;
}

.tool-workspace {
    max-width: 1360px;
    margin: 0 auto;
    padding: 28px;
    display: grid;
    grid-template-columns: 280px minmax(420px, 1fr) minmax(360px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.tool-panel {
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.tool-main,
.tool-output {
    min-height: 430px;
}

.tool-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.tool-panel h1,
.tool-panel h2 {
    margin: 0;
    color: #101827;
    letter-spacing: 0;
}

.tool-panel h1 { font-size: 24px; }
.tool-panel h2 { font-size: 18px; }

.tool-panel p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.excel-feature-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.excel-feature-tab {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
    text-align: left;
    display: grid;
    gap: 4px;
    cursor: pointer;
}

.excel-feature-tab strong {
    color: #0f172a;
    font-size: 14px;
}

.excel-feature-tab span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.excel-feature-tab.active {
    border-color: #0f766e;
    background: #ecfdf3;
}

.excel-feature-tab.active strong {
    color: #0f766e;
}

.excel-feature-tab.disabled {
    opacity: 0.56;
    cursor: not-allowed;
}

.tool-form {
    display: grid;
    gap: 14px;
}

.tool-form label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.tool-form input,
.tool-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 11px 12px;
    color: #101827;
    background: #ffffff;
    font: inherit;
}

.tool-form textarea {
    resize: vertical;
    min-height: 160px;
}

.tool-form input:focus,
.tool-form textarea:focus {
    outline: 2px solid rgba(15, 118, 110, 0.18);
    border-color: #0f766e;
}

.tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tool-result {
    min-height: 22px;
    color: #475569;
}

.tool-result.error { color: #b91c1c; }
.tool-result.success { color: #147345; }

.tool-code {
    background: #0f172a;
    color: #dbeafe;
    border-radius: 6px;
    padding: 14px;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 260px;
    overflow: auto;
}

.tool-warnings {
    margin: 12px 0;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.55;
}

.tool-table-wrap {
    margin-top: 14px;
    max-height: 320px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.tool-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.tool-table-wrap th,
.tool-table-wrap td {
    padding: 9px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.tool-table-wrap td:last-child {
    word-break: break-all;
}

.sheet-local-preview {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}

.sheet-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px;
    border-bottom: 1px solid #dbe3ee;
}

.sheet-tab {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.sheet-tab.active {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

.sheet-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    min-height: 280px;
}

.sheet-grid-wrap {
    overflow: auto;
    max-height: 360px;
    border-right: 1px solid #dbe3ee;
}

#sheetGridPreview {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #ffffff;
}

#sheetGridPreview th,
#sheetGridPreview td {
    border: 1px solid #e2e8f0;
    padding: 6px 8px;
    min-width: 82px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sheetGridPreview th {
    position: sticky;
    top: 0;
    background: #eef2f7;
    color: #475569;
    z-index: 1;
}

#sheetGridPreview .row-head {
    position: sticky;
    left: 0;
    min-width: 44px;
    max-width: 44px;
    background: #eef2f7;
    color: #64748b;
    text-align: center;
    z-index: 2;
}

.sheet-image-strip {
    padding: 10px;
    display: grid;
    align-content: start;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
}

.sheet-image-card {
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background: #ffffff;
    padding: 8px;
}

.sheet-image-card img {
    width: 100%;
    height: 96px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 4px;
}

.sheet-image-card span {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 11px;
    word-break: break-all;
}

@media (max-width: 1100px) {
    .tool-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tool-topbar {
        height: auto;
        min-height: 64px;
        padding: 12px 16px;
        gap: 10px;
        align-items: flex-start;
    }

    .tool-workspace {
        padding: 16px;
    }

    .tool-panel-head {
        flex-direction: column;
    }

    .excel-feature-tabs {
        grid-template-columns: 1fr;
    }

    .tool-actions .btn {
        width: 100%;
    }

    .sheet-preview-layout {
        grid-template-columns: 1fr;
    }

    .sheet-grid-wrap {
        border-right: none;
        border-bottom: 1px solid #dbe3ee;
    }

    .sheet-image-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* EXCEL automation workspace */

.excel-app {
    min-height: 100vh;
    background: #f7f9fc;
    color: #162033;
}

.excel-topbar {
    height: 76px;
    padding: 0 28px;
    background: #ffffff;
    border-bottom: 1px solid #dfe5ee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.excel-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.excel-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #34d399, #16a34a);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.18);
}

.excel-brand strong {
    display: block;
    color: #111827;
    font-size: 18px;
    line-height: 1.1;
}

.excel-brand small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.excel-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.excel-icon-btn,
.excel-text-btn {
    border: none;
    background: transparent;
    color: #334155;
    font: inherit;
    cursor: pointer;
}

.excel-icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dbe3ee;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.excel-text-btn {
    padding: 7px 8px;
    border-radius: 6px;
}

.excel-text-btn:hover,
.excel-icon-btn:hover {
    background: #f1f5f9;
}

.excel-ai-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    font-size: 13px;
    font-weight: 700;
}

.excel-layout {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: calc(100vh - 76px);
}

.excel-sidebar {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 26px 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.excel-nav-block {
    display: grid;
    gap: 8px;
}

.excel-nav-title {
    color: #64748b;
    font-size: 12px;
    padding: 0 10px 6px;
}

.excel-nav-item {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    min-height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.excel-nav-item.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 700;
}

.excel-nav-item.disabled {
    cursor: not-allowed;
    color: #64748b;
}

.excel-nav-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: #4f46e5;
}

.excel-login-box {
    margin-top: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}

.excel-login-box h2 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 14px;
}

.excel-login-form {
    display: grid;
    gap: 8px;
}

.excel-login-form input,
.excel-setting-section textarea,
.excel-select-label select {
    width: 100%;
    border: 1px solid #d5dde8;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    padding: 10px 12px;
    font: inherit;
}

.excel-setting-section textarea {
    resize: vertical;
    min-height: 128px;
}

.excel-login-form input:focus,
.excel-setting-section textarea:focus,
.excel-select-label select:focus {
    outline: 2px solid rgba(79, 70, 229, 0.14);
    border-color: #6366f1;
}

.excel-login-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.excel-mini-btn {
    height: 34px;
    border: 1px solid #d5dde8;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
}

.excel-mini-btn.primary {
    border-color: #4f46e5;
    background: #4f46e5;
    color: #ffffff;
}

.excel-inline-result {
    min-height: 18px;
    margin: 8px 0 0;
    color: #64748b;
    font-size: 12px;
}

.excel-inline-result.error,
.excel-status.error {
    color: #dc2626;
}

.excel-inline-result.success,
.excel-status.success {
    color: #15803d;
}

.excel-work-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 366px;
    gap: 24px;
    padding: 26px;
}

.excel-main {
    min-width: 0;
}

.excel-page-head,
.excel-file-row,
.excel-preview-toolbar,
.excel-settings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.excel-page-head {
    margin-bottom: 18px;
}

.excel-page-head h1 {
    margin: 0;
    color: #111827;
    font-size: 24px;
    letter-spacing: 0;
}

.excel-page-head p,
.excel-settings-head p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
}

.excel-upload-btn {
    position: relative;
    overflow: hidden;
    min-width: 96px;
    height: 38px;
    border: 1px solid #d5dde8;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #334155;
    background: #ffffff;
    cursor: pointer;
    font-weight: 600;
}

.excel-upload-btn input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.excel-file-row {
    margin-bottom: 16px;
}

.excel-file-chip {
    min-width: 304px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.excel-file-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: #16a34a;
    color: #ffffff;
    font-weight: 800;
}

.excel-file-chip strong {
    display: block;
    color: #111827;
    font-size: 14px;
}

.excel-file-chip small,
.excel-meta {
    color: #64748b;
    font-size: 12px;
}

.excel-preview {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    min-height: 560px;
}

.excel-preview-toolbar {
    min-height: 52px;
    padding: 0 12px;
    border-bottom: 1px solid #e2e8f0;
}

.excel-preview-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.excel-preview .sheet-preview-layout {
    min-height: 506px;
}

.excel-preview .sheet-grid-wrap,
.excel-preview .sheet-image-strip {
    max-height: 620px;
}

.excel-status {
    min-height: 22px;
    margin: 12px 0 0;
    color: #64748b;
    font-size: 13px;
}

.excel-settings {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #ffffff;
    padding: 20px;
    align-self: start;
    display: grid;
    gap: 18px;
}

.excel-settings-head {
    justify-content: flex-start;
}

.excel-setting-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: #4f46e5;
}

.excel-settings h2,
.excel-setting-section h3 {
    margin: 0;
    color: #111827;
    letter-spacing: 0;
}

.excel-settings h2 {
    font-size: 16px;
}

.excel-setting-section {
    display: grid;
    gap: 12px;
    padding-top: 4px;
}

.excel-setting-section h3 {
    font-size: 13px;
}

.excel-radio,
.excel-checkbox,
.excel-select-label {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #334155;
    font-size: 13px;
}

.excel-radio input,
.excel-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
}

.excel-select-label {
    display: grid;
    gap: 8px;
}

.excel-primary-action,
.excel-secondary-action {
    min-height: 44px;
    border-radius: 8px;
    border: 1px solid #4f46e5;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.excel-primary-action {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #ffffff;
}

.excel-primary-action:disabled {
    opacity: 0.6;
    cursor: wait;
}

.excel-secondary-action {
    background: #ffffff;
    color: #4f46e5;
}

.excel-tip {
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    color: #475569;
    padding: 12px;
    font-size: 12px;
    line-height: 1.55;
}

.excel-tip strong {
    color: #334155;
}

.excel-tip p {
    margin: 4px 0 0;
}

@media (max-width: 1180px) {
    .excel-work-area {
        grid-template-columns: 1fr;
    }

    .excel-settings {
        order: -1;
    }
}

/* 宽屏：左侧内容区和右侧操作区各自独立滚动，互不带动 */
@media (min-width: 1181px) {
    .excel-layout {
        height: calc(100vh - 76px);
        min-height: 0;
        overflow: hidden;
    }

    .excel-sidebar {
        overflow-y: auto;
    }

    .excel-work-area {
        height: 100%;
        overflow: hidden;
        grid-template-rows: minmax(0, 1fr);
    }

    .excel-main {
        height: 100%;
        overflow-y: auto;
        padding-right: 4px;
    }

    .excel-settings {
        max-height: 100%;
        overflow-y: auto;
    }
}

@media (max-width: 840px) {
    .excel-topbar {
        height: auto;
        padding: 14px 16px;
        align-items: flex-start;
        gap: 14px;
        flex-direction: column;
    }

    .excel-layout {
        grid-template-columns: 1fr;
    }

    .excel-sidebar {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .excel-work-area {
        padding: 16px;
    }

    .excel-page-head,
    .excel-file-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .excel-file-chip {
        min-width: 0;
        width: 100%;
    }
}

/* ---------- 表格整理 ---------- */

.merge-upload-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.merge-file-list {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 8px;
}

.merge-file-empty {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.merge-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #ffffff;
    padding: 8px 12px;
}

.merge-file-item.template {
    border-color: #c7d2fe;
    background: #eef2ff;
}

.merge-file-name {
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.merge-file-meta {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.merge-file-item .excel-text-btn {
    margin-left: auto;
}

.merge-mapping,
.merge-preview {
    margin-top: 18px;
}

.merge-mapping-head h2,
.merge-preview h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 16px;
}

.merge-mapping-head p {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 13px;
}

.merge-plan {
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: #f5f7ff;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.merge-plan-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.merge-plan select {
    border: 1px solid #d5dde8;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    padding: 6px 8px;
    font: inherit;
    font-size: 12px;
}

.merge-plan-mode {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.merge-join-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.merge-join-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #64748b;
    font-size: 12px;
    min-width: 180px;
}

.merge-join-keys {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.merge-join-keys-label {
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.merge-join-keyrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.merge-join-eq {
    color: #4f46e5;
    font-weight: 700;
}

.merge-plan-text {
    margin: 10px 0 0;
    color: #3730a3;
    font-size: 13px;
    line-height: 1.6;
}

/* 智能统计：维度 / 度量编辑行 */
.pivot-group {
    margin-bottom: 16px;
}

.pivot-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pivot-group-head h3 {
    margin: 0;
    font-size: 14px;
}

.pivot-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pivot-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pivot-row select,
.pivot-row input {
    height: 34px;
    padding: 0 8px;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #fff;
}

.pivot-row .pivot-col {
    flex: 1 1 180px;
    min-width: 140px;
}

.pivot-row .pivot-bucket,
.pivot-row .pivot-agg {
    flex: 0 0 120px;
}

.pivot-row .pivot-label {
    flex: 1 1 140px;
    min-width: 120px;
}

.pivot-row .pivot-del {
    flex: none;
}

.excel-sheet-select {
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #fff;
    max-width: 240px;
}

.merge-field-chips-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.merge-field-chips-row .excel-mini-btn {
    flex: none;
}

.merge-field-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.merge-field-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #eef2ff;
    padding: 4px 6px 4px 12px;
}

.merge-field-chip input {
    border: none;
    background: transparent;
    color: #4f46e5;
    font: inherit;
    font-weight: 600;
    width: 9em;
    min-width: 4em;
}

.merge-field-chip input:focus {
    outline: none;
}

.merge-field-chip button {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 2px 6px;
}

.merge-field-chip button:hover {
    color: #dc2626;
}

.merge-mapping-table {
    max-height: 420px;
    overflow: auto;
}

.merge-mapping-table select {
    width: 100%;
    border: 1px solid #d5dde8;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    padding: 6px 8px;
    font: inherit;
    font-size: 12px;
}

.merge-row-ignored td {
    color: #94a3b8;
}

.merge-samples {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 使用说明 / 调试折叠块 / 预览全屏 ---------- */

.excel-help {
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #f5f7ff;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #334155;
    font-size: 13px;
    line-height: 1.7;
}

.excel-help summary {
    cursor: pointer;
    font-weight: 700;
    color: #4f46e5;
    user-select: none;
}

.excel-help ol {
    margin: 10px 0 0;
    padding-left: 20px;
}

.excel-help li {
    margin-bottom: 4px;
}

.excel-help p {
    margin: 8px 0 0;
    color: #64748b;
}

.excel-help em {
    font-style: normal;
    color: #4f46e5;
}

.excel-plan-details summary {
    cursor: pointer;
    color: #64748b;
    font-size: 12px;
    user-select: none;
}

.excel-plan-details[open] summary {
    margin-bottom: 8px;
}

.excel-preview:fullscreen {
    background: #ffffff;
    overflow: auto;
    padding: 16px;
}

.excel-preview:fullscreen .sheet-preview-layout {
    min-height: 0;
}

.excel-preview:fullscreen .sheet-grid-wrap,
.excel-preview:fullscreen .sheet-image-strip {
    max-height: calc(100vh - 120px);
}

/* ---------- 主页 EXCEL 工具入口 ---------- */

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.excel-tools-cta {
    text-align: center;
    margin-top: 36px;
}

/* ---------- 智能截图软件入口 / 详情页 ---------- */

.launch-strip {
    max-width: 1120px;
    margin: 34px auto 0;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 28px;
    align-items: center;
    border: 1px solid #d7eadf;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.launch-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.launch-copy h2 {
    font-size: 28px;
    color: #0f172a;
    margin-bottom: 10px;
}

.launch-copy p {
    color: #475569;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.launch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.launch-media img,
.snap-hero-media img {
    display: block;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

.snap-hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 24px 56px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: 36px;
    align-items: center;
}

.snap-hero h1 {
    font-size: 42px;
    line-height: 1.25;
    color: #0f172a;
    margin-bottom: 18px;
}

.snap-hero p {
    color: #475569;
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 26px;
}

.snap-download-line {
    margin-top: 16px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    word-break: break-all;
}

.snap-download-line code,
.snap-file-note code {
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 2px 6px;
}

.snap-section {
    max-width: 1080px;
    margin: 0 auto;
    padding: 58px 24px;
}

.snap-section h2 {
    text-align: center;
    font-size: 28px;
    color: #0f172a;
    margin-bottom: 32px;
}

.snap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.snap-card {
    min-height: 180px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    padding: 24px;
}

.snap-card h3 {
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 10px;
}

.snap-card p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
}

.snap-flow {
    background: #f8fafc;
    max-width: none;
}

.snap-flow h2,
.snap-flow .snap-steps {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.snap-steps {
    display: grid;
    gap: 12px;
}

.snap-steps div {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.snap-steps strong {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
}

.snap-steps span {
    color: #334155;
    line-height: 1.7;
}

.snap-feature-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.snap-feature-list span {
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    color: #166534;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
}

.snap-download-panel {
    max-width: 980px;
    margin: 0 auto 70px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: center;
    border: 1px solid #d7eadf;
    border-radius: 8px;
    background: #f8fffb;
}

.snap-download-panel h2 {
    color: #0f172a;
    margin-bottom: 8px;
}

.snap-download-panel p {
    color: #475569;
    line-height: 1.8;
}

.snap-download-card {
    margin-bottom: 24px;
}

/* ---------- EXCEL 页顶栏：折叠按钮 / 用户信息 / 充值 ---------- */

.excel-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.excel-user-chip {
    display: inline-flex;
    align-items: center;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
}

.excel-recharge-btn {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.excel-recharge-btn:hover {
    background: #4338ca;
}

/* ---------- 侧边菜单折叠 ---------- */

.excel-layout.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
}

.excel-layout.sidebar-collapsed .excel-sidebar {
    display: none;
}

/* EXCEL 工具页是应用形态，不需要营销页页脚 */
body[data-page="excel-automation"] .site-footer {
    display: none;
}

/* ---------- 数据清洗（通用乱表整理） ---------- */

.tidy-plan-block,
.tidy-result-block {
    margin-bottom: 18px;
}

.tidy-plan-block h3,
.tidy-result-block h3 {
    font-size: 15px;
    margin: 12px 0 6px;
    color: #0f172a;
}

.tidy-plan-block h3 small {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}

.tidy-plan-block input {
    width: 140px;
    padding: 3px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
}

.tidy-plan-block select {
    padding: 3px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
}

.tidy-result-block h4 {
    font-size: 13px;
    margin: 14px 0 6px;
    color: #b45309;
}

/* ---------- 统计分析 ---------- */

.stats-checkbox-list {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    background: #fbfdff;
}

.stats-dim-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
}

.stats-dim-item:hover {
    background: #eef2ff;
}

.stats-dim-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-dim-kind {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    flex: none;
}

.stats-dim-kind.text {
    background: #e0f2fe;
    color: #0369a1;
}

.stats-dim-kind.number {
    background: #dcfce7;
    color: #15803d;
}

.stats-topn-input {
    width: 100%;
    border: 1px solid #d5dde8;
    border-radius: 8px;
    padding: 8px 12px;
    font: inherit;
}

.stats-block {
    margin-bottom: 22px;
}

.stats-block-title {
    margin: 0 0 8px;
    font-size: 15px;
    color: #0f172a;
}

.stats-block-title small {
    color: #94a3b8;
    font-weight: 400;
    font-size: 12px;
}

.stats-table th,
.stats-table td {
    white-space: nowrap;
}

.stats-table td.num,
.stats-table th.num {
    text-align: right;
}

.stats-table td:nth-child(2) {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 统计分析 · AI ---------- */

.stats-ai-btn {
    margin-top: 8px;
    width: 100%;
    border-color: #4f46e5;
    color: #4f46e5;
}

.stats-ai-btn:hover {
    background: #eef2ff;
}

.excel-hint-line {
    margin: 8px 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

.stats-insight-bar {
    margin: 4px 0 10px;
}

.stats-insight {
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: #f5f7ff;
    color: #334155;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ---------- 后台用户管理 · 软件筛选标签 ---------- */
.soft-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.soft-tab {
    border: 1px solid #d5dde8;
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    padding: 5px 14px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.soft-tab:hover { background: #f1f5f9; }
.soft-tab.active {
    border-color: #16a34a;
    background: #16a34a;
    color: #ffffff;
    font-weight: 600;
}

/* ---------- 后台用户搜索栏 ---------- */
.user-search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.user-search-bar input {
    flex: 1;
    min-width: 220px;
}
.user-search-bar .btn {
    flex: none;
    white-space: nowrap;
}
