﻿/* 前台工具页共用样式 · 与主站亮蓝色系对齐 */
.tool-page {
    --tool-brand: var(--brand, #00a0e9);
    --tool-brand-dark: var(--brand-dark, #0088cc);
    --tool-brand-deep: var(--brand-deep, #006ba3);
    --tool-brand-light: var(--brand-light, #e8f6fc);
    --tool-brand-soft: rgba(0, 160, 233, .12);
    --tool-ink: var(--text, #1f2933);
    --tool-accent: var(--accent, #ff4d4f);
    --tool-accent-dark: var(--accent-dark, #e03b3d);
    --tool-accent-light: var(--accent-light, #fff1f0);
    --tool-copper: var(--tool-accent);
    --tool-copper-dark: var(--tool-accent-dark);
    --tool-bg: var(--bg, #f3f6f9);
    --tool-panel: var(--surface, #ffffff);
    --tool-border: var(--border-strong, #d5dde5);
    --tool-text: var(--text, #1f2933);
    --tool-muted: var(--text-muted, #6b7785);
    --tool-gap: 20px;
    --tool-panel-pad: 18px 20px;
    --tool-radius: var(--radius-sm, 4px);
    margin-top: var(--mall-header-h, 164px);
    background-color: var(--tool-bg);
    padding: var(--mall-block, 20px) 0 var(--mall-section, 40px);
    min-height: 60vh;
    color: var(--tool-text);
}
.tool-page__inner {
    max-width: var(--content, 1200px);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--pad-x, 24px);
    box-sizing: border-box;
}
.tool-page__head {
    margin-bottom: 18px;
    padding: 16px 18px 18px;
    background: var(--tool-panel);
    border: 1px solid var(--tool-border);
    border-left: 4px solid var(--tool-brand);
    border-radius: var(--tool-radius);
}
.tool-page__eyebrow {
    margin: 0 0 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .14em !important;
    text-transform: uppercase;
    color: var(--tool-brand) !important;
    line-height: 1.3 !important;
}
.tool-page__head h1 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--tool-ink);
    letter-spacing: -.01em;
    line-height: 1.35;
}
.tool-page__head p {
    margin: 0;
    color: var(--tool-muted);
    font-size: 13px;
    line-height: 1.7;
    width: 100%;
    max-width: none;
}
.tool-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 22px;
    padding: 0;
    border-bottom: 2px solid var(--tool-border);
    background: transparent;
}
.tool-tabs a {
    display: inline-flex;
    align-items: center;
    margin-bottom: -2px;
    padding: 11px 16px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--tool-muted) !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: none;
    transition: color .15s, border-color .15s, background .15s;
}
.tool-tabs a:hover {
    color: var(--tool-ink) !important;
    background: rgba(0, 160, 233, .06);
}
.tool-tabs a.is-active {
    border-bottom-color: var(--tool-brand);
    color: var(--tool-brand) !important;
    background: transparent;
    box-shadow: none;
}
.tool-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: var(--tool-gap);
    align-items: start;
}
.tool-layout > aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.tool-panel {
    background: var(--tool-panel);
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    padding: var(--tool-panel-pad);
    box-shadow: none;
}
.tool-panel h2,
.tool-panel h3 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #cfd6de;
    font-size: 14px;
    font-weight: 700;
    color: var(--tool-ink);
    line-height: 1.4;
}
.tool-panel h2 .tool-hint,
.tool-panel h3 .tool-hint {
    margin-left: 8px;
    font-weight: 600;
}
.tool-panel + .tool-panel { margin-top: 0; }
.tool-field {
    margin-bottom: 14px;
}
.tool-field:last-child {
    margin-bottom: 0;
}
.tool-field > label:not(.tool-btn),
.tool-field > .tool-field__label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tool-muted);
    line-height: 1.4;
}
.tool-field label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--tool-text);
    cursor: pointer;
}
.tool-field input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--tool-brand);
}
.tool-field input[type="text"],
.tool-field input[type="number"],
.tool-field input[type="color"],
.tool-field select,
.tool-field textarea,
.tool-field input[type="file"] {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    font: inherit;
    color: var(--tool-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.tool-field input[type="file"] {
    padding: 8px 12px;
    line-height: 1.4;
}
.tool-field input[type="color"] {
    padding: 4px 6px;
}
.tool-field textarea {
    height: auto;
    min-height: 80px;
    padding: 10px 12px;
    resize: vertical;
}
.tool-field input[type="range"] {
    width: 100%;
    margin: 4px 0 0;
}
.tool-field input:focus,
.tool-field select:focus,
.tool-field textarea:focus {
    outline: none;
    border-color: var(--tool-brand);
    box-shadow: 0 0 0 3px var(--tool-brand-soft);
}
.tool-field__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.tool-field__row:last-child {
    margin-bottom: 0;
}
.tool-field__row > .tool-field {
    margin-bottom: 0;
}
.tool-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--tool-muted);
    line-height: 1.5;
}
.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.tool-actions:first-child {
    margin-top: 0;
}
.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 15px;
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    background: #fff;
    color: var(--tool-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.tool-btn:hover {
    border-color: var(--tool-brand);
    color: var(--tool-brand);
    background: var(--tool-brand-soft);
}
.tool-btn--primary {
    background: var(--tool-brand);
    border-color: var(--tool-brand);
    color: #fff;
}
.tool-btn--primary:hover {
    background: var(--tool-brand-dark);
    border-color: var(--tool-brand-dark);
    color: #fff;
    box-shadow: none;
}
.tool-btn--ghost {
    background: transparent;
}
.tool-stage {
    min-height: 420px;
    position: relative;
    overflow: hidden;
    background-color: #dfe5eb;
    background-image:
        linear-gradient(45deg, rgba(20, 33, 43, .05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(20, 33, 43, .05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(20, 33, 43, .05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(20, 33, 43, .05) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    border-radius: var(--tool-radius);
    border: 1px solid var(--tool-border);
}
.tool-stage canvas,
.tool-stage img {
    display: block;
    max-width: 100%;
}
.tool-stage__canvas-wrap {
    width: 100%;
    overflow: auto;
    text-align: center;
    padding: 16px;
}
.tool-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #cfd6de;
}
.tool-stat {
    background: #f1f4f7;
    border-radius: var(--tool-radius);
    border-left: 3px solid var(--tool-brand);
    padding: 12px 14px;
}
.tool-stat strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
    color: var(--tool-ink);
    font-weight: 700;
    line-height: 1.3;
}
.tool-stat span {
    font-size: 12px;
    color: var(--tool-muted);
    line-height: 1.4;
}
.tool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tool-table th,
.tool-table td {
    border: 1px solid var(--tool-border);
    padding: 10px 12px;
    text-align: left;
}
.tool-table th {
    background: #eef2f5;
    font-weight: 700;
    color: var(--tool-muted);
}
.tool-table tfoot td {
    font-weight: 700;
    background: var(--tool-brand-soft);
}
.tool-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tool-chip {
    border: 1px solid var(--tool-border);
    background: #fff;
    border-radius: var(--tool-radius);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--tool-text);
}
.tool-chip.is-active {
    border-color: var(--tool-brand);
    background: var(--tool-brand);
    color: #fff;
}
.tool-note {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: var(--tool-radius);
    border-left: 3px solid #d97706;
    background: #fff8eb;
    color: #7c5a1a;
    font-size: 12px;
    line-height: 1.7;
}
.tool-empty {
    padding: 56px 20px;
    text-align: center;
    color: var(--tool-muted);
    font-size: 14px;
    line-height: 1.6;
}
.tool-layer-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}
.tool-layer-list:empty {
    margin: 0;
}
.tool-layer-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: border-color .15s, background .15s;
}
.tool-layer-list li:last-child {
    margin-bottom: 0;
}
.tool-layer-list li.is-active {
    border-color: var(--tool-brand);
    background: var(--tool-brand-soft);
}
.tool-layer-list li span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tool-quote-head {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #cfd6de;
}
.tool-quote-head strong {
    display: block;
    font-size: 16px;
    color: var(--tool-text);
    line-height: 1.4;
}
.tool-quote-head .tool-hint {
    margin-top: 6px;
}
.tool-table-wrap {
    overflow: auto;
    margin: 0 -2px;
}

.tool-btn--danger {
    border-color: #f3b4b4;
    color: #d9534f;
}
.tool-btn--danger:hover {
    border-color: #d9534f;
    color: #d9534f;
    background: #fff5f5;
}

/* LED 效果图制作 — 工场三栏编辑器 */
.tool-led-image.tool-page {
    padding: var(--mall-block, 20px) 0 var(--mall-section, 40px);
    overflow-x: clip;
}
.led-editor {
    background: #f7f8fa;
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--mall-header-h, 164px) - 200px);
    min-height: 480px;
    max-height: min(720px, calc(100vh - var(--mall-header-h, 164px) - 160px));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.led-editor__body {
    flex: 1;
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr) 260px;
    min-height: 0;
    background: #f7f8fa;
}
.led-editor__left,
.led-editor__right {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: #fbfcfd;
    overflow: auto;
    max-height: none;
    min-height: 0;
}
.led-editor__left {
    border-right: 1px solid var(--tool-border);
}
.led-editor__right {
    border-left: 1px solid var(--tool-border);
}
.led-editor__center {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 0;
    background: #eef2f5;
}
.led-stage {
    position: relative;
    flex: 1;
    margin: 0;
    border: none;
    border-radius: 0;
    background-color: #eef2f5;
    background-image:
        linear-gradient(rgba(15, 32, 48, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 32, 48, .06) 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden;
    min-height: 0;
}
.led-stage__canvas-wrap {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    box-sizing: border-box;
    container-type: size;
}
.led-stage__board {
    position: relative;
    box-sizing: border-box;
    width: min(900px, 100cqi, calc(100cqh * 900 / 520));
    aspect-ratio: 900 / 520;
    height: auto;
    background: #fff;
    box-shadow:
        0 0 0 1px rgba(15, 32, 48, .08),
        0 8px 24px rgba(15, 32, 48, .1);
}
.led-stage__board canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #fff;
    cursor: default;
}
.led-box {
    background: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #e5eaef;
    padding: 12px 14px;
    box-shadow: none;
}
.led-box--tips {
    padding: 9px 14px;
    background: var(--tool-brand-light);
    border-bottom-color: #c5e0ef;
}
.led-tips-inline {
    margin: 0;
    font-size: 11px;
    color: var(--tool-brand-deep);
    line-height: 1.5;
}
.led-tips-inline kbd {
    display: inline-block;
    padding: 0 4px;
    border: 1px solid #b7d4e8;
    border-radius: 2px;
    background: #fff;
    font: inherit;
    font-size: 10px;
    color: var(--tool-ink);
}
.led-box:last-child {
    border-bottom: none;
}
.led-box--fill {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-bottom: none;
    overflow: auto;
}
.led-box h2 {
    margin: 0 0 8px;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tool-ink);
    line-height: 1.35;
}
.led-box h2 .tool-hint {
    margin-left: 4px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: #8492a6;
}
.led-box h3,
.led-props-block h3 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--tool-ink);
}
.led-tips {
    margin: 0;
    padding-left: 16px;
    color: #8492a6;
    font-size: 11px;
    line-height: 1.65;
}
.led-tips kbd {
    display: inline-block;
    padding: 0 4px;
    border: 1px solid #d8dee6;
    border-radius: 2px;
    background: #f7fafc;
    font: inherit;
    font-size: 10px;
    color: var(--tool-ink);
}
.led-upload {
    position: relative;
    display: block;
}
.led-upload__zone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 110px;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    border: 1px dashed #7ab8d4;
    border-radius: var(--tool-radius);
    background: var(--tool-brand-light);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s, background .15s;
}
.led-upload__zone:hover {
    border-color: var(--tool-brand);
    background: #d6eef9;
}
.led-upload.is-filled .led-upload__zone {
    border-color: #c5ced8;
    background: #fff;
    padding: 0;
    min-height: 120px;
}
.led-upload__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}
.led-upload__status {
    font-size: 13px;
    font-weight: 600;
    color: var(--tool-brand);
}
.led-upload__pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--tool-brand);
    border-radius: var(--tool-radius);
    background: var(--tool-brand);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
.led-upload__filled {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
}
.led-upload__filled img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: contain;
    object-position: center;
    background: #f7fafc;
}
.led-upload__remove {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 2;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: var(--tool-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    box-shadow: none;
}
.led-upload__remove:hover {
    background: var(--tool-accent-dark);
}
.led-content-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    margin: 0 !important;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px dashed var(--tool-brand);
    border-radius: var(--tool-radius);
    background: var(--tool-brand-light);
    color: var(--tool-brand) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.led-content-btn:hover {
    border-style: solid;
    background: #d6eef9;
    color: var(--tool-brand-dark) !important;
}
.led-editor .tool-field #btnClearContent {
    width: 100%;
    margin-top: 6px;
    height: 32px;
    font-size: 12px;
    border-radius: var(--tool-radius);
}
.led-screen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.led-screen-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #d3d9e0;
    border-radius: var(--tool-radius);
    background: #fff;
    color: var(--tool-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.led-screen-btn__icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #5a6a7a;
}
.led-screen-btn__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}
.led-screen-btn__label {
    line-height: 1.2;
    white-space: nowrap;
}
.led-screen-btn:hover,
.led-screen-btn.is-active {
    border-color: var(--tool-brand);
    color: var(--tool-brand);
    background: var(--tool-brand-soft);
}
.led-screen-btn:hover .led-screen-btn__icon,
.led-screen-btn.is-active .led-screen-btn__icon {
    color: var(--tool-brand);
}
.led-sidebar-note {
    margin: 8px 0 0;
    font-size: 10px;
    color: #9aa8b8;
    line-height: 1.5;
}
.led-stage__empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
    color: var(--tool-muted, #6b7785);
    text-align: center;
    z-index: 1;
    padding: 16px;
    box-sizing: border-box;
}
.led-stage__empty p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--tool-muted, #6b7785);
    line-height: 1.5;
}
.led-stage__empty strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--tool-ink, #1f2933);
    line-height: 1.4;
}
.led-stage__empty span {
    font-size: 12px;
    color: #8492a6;
    line-height: 1.4;
}
.led-toast {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    max-width: calc(100% - 24px);
    padding: 6px 12px;
    border-radius: 2px;
    background: var(--tool-brand, #00a0e9);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
}
.led-stage__empty[hidden],
.led-toast[hidden],
.led-props-empty[hidden],
.led-layer-accordion[hidden],
.led-props[hidden],
.tool-led-image [hidden] {
    display: none !important;
}
.led-props-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #8492a6;
    font-size: 13px;
    text-align: center;
    line-height: 1.6;
}
.led-layer-accordion {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.led-layer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #d3d9e0;
    border-radius: var(--tool-radius);
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--tool-ink);
}
.led-layer-item.is-active {
    border-color: var(--tool-brand);
    background: var(--tool-brand-soft);
    color: var(--tool-brand);
}
.led-layer-item .fa {
    color: inherit;
}
.led-layer-item span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.led-props {
    overflow: visible;
}
.led-editor .tool-field {
    margin-bottom: 10px;
}
.led-editor .tool-field > label:not(.tool-btn),
.led-editor .tool-field > .tool-field__label {
    margin-bottom: 4px;
    font-size: 11px;
}
.led-editor .tool-field input[type="text"],
.led-editor .tool-field input[type="number"],
.led-editor .tool-field input[type="color"],
.led-editor .tool-field select,
.led-editor .tool-field textarea {
    height: 32px;
    padding: 0 8px;
    border-radius: var(--tool-radius);
    font-size: 12px;
}
.led-editor .tool-field textarea {
    height: auto;
    min-height: 56px;
    padding: 6px 8px;
}
.led-editor .tool-field__row {
    gap: 8px;
    margin-bottom: 10px;
}
.led-editor .tool-actions {
    gap: 6px;
    margin-top: 10px;
}
.led-editor .tool-actions .tool-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: var(--tool-radius);
}
.led-props-block {
    margin: 10px 0;
    padding-top: 10px;
    border-top: 1px dashed #cfd6de;
}
.led-check {
    display: flex !important;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--tool-ink) !important;
    cursor: pointer;
}
.led-check-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}
.tool-field__row--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.led-editor__footer {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--tool-border);
    background: #f7f9fb;
}
.led-export-btn {
    min-width: 128px;
    height: 36px;
    font-size: 13px;
    border-radius: var(--tool-radius);
}
.led-editor__footer .tool-btn--primary {
    background: var(--tool-brand);
    border-color: var(--tool-brand);
}
.led-editor__footer .tool-btn:not(.tool-btn--primary) {
    background: #fff;
    border-color: var(--tool-border);
    color: var(--tool-ink);
}
.led-editor__footer .tool-btn:not(.tool-btn--primary):hover {
    border-color: var(--tool-brand);
    color: var(--tool-brand);
    background: var(--tool-brand-light, #e8f6fc);
}

@media (max-width: 1100px) {
    .led-editor__body {
        grid-template-columns: 200px minmax(0, 1fr) 236px;
    }
}
@media (max-width: 960px) {
    .tool-page {
        padding: 24px 0 40px;
    }
    .tool-page__inner {
        padding: 0 var(--pad-x-sm, 16px);
    }
    .tool-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .tool-layout > aside {
        gap: 12px;
    }
    .tool-panel {
        padding: 16px 18px;
    }
    .tool-page__head {
        margin-bottom: 16px;
        padding: 14px 14px 16px;
    }
    .tool-page__head h1 {
        font-size: 20px;
    }
    .tool-tabs {
        gap: 0;
        margin-bottom: 18px;
    }
    .tool-tabs a {
        padding: 10px 12px;
    }
    .tool-field__row {
        gap: 10px;
    }
    .tool-led-image.tool-page {
        padding: var(--mall-block, 14px) 0 var(--mall-section, 28px);
    }
    .led-editor {
        height: auto;
        max-height: none;
        min-height: 0;
    }
    .led-editor__body {
        grid-template-columns: 1fr;
    }
    .led-editor__left {
        border-right: none;
        border-bottom: 1px solid var(--tool-border);
        max-height: none;
    }
    .led-editor__right {
        border-left: none;
        border-top: 1px solid var(--tool-border);
        max-height: none;
    }
    .led-editor__center {
        min-height: 360px;
    }
    .tool-field__row--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* LED 材料清单 / 报价工具 · 主站通色系 */
.tool-led-quote {
    --lq-accent: var(--tool-accent);
    --lq-accent-dark: var(--tool-accent-dark);
    --lq-sec1: var(--tool-brand-deep);
    --lq-sec2: var(--tool-brand);
    --lq-sec3: var(--tool-accent);
}
.tool-led-quote .tool-page__head p {
    max-width: 100%;
}
.lq-wrap {
    display: grid;
    gap: 20px;
    width: 100%;
}
.lq-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 0;
}
.lq-sec {
    background: var(--tool-panel);
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    overflow: hidden;
    box-shadow: none;
}
.lq-sec__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-left: 3px solid var(--lq-sec1);
    background: #f3f5f7;
    color: var(--lq-sec1);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    text-align: left;
}
.lq-sec--opt .lq-sec__head {
    border-left-color: var(--lq-sec2);
    background: var(--tool-brand-light);
    color: var(--lq-sec2);
}
.lq-sec--tax .lq-sec__head {
    border-left-color: var(--lq-sec3);
    background: var(--tool-accent-light);
    color: var(--lq-sec3);
}
.lq-sec__head i {
    font-size: 14px;
    opacity: .75;
}
.lq-sec__body {
    padding: 18px 18px 20px;
    border-top: 1px dashed #cfd6de;
}
.lq-field {
    margin-bottom: 14px;
}
.lq-field > label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tool-text);
}
.lq-field > label em {
    margin-left: 4px;
    font-style: normal;
    font-size: 12px;
    color: var(--tool-accent);
    font-weight: 600;
}
.lq-field input[type="text"],
.lq-field input[type="number"],
.lq-field select,
.lq-opt-table input[type="text"],
.lq-opt-table input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    font: inherit;
    color: var(--tool-text);
    background: #fff;
}
.lq-sub-select {
    margin-top: 8px;
}
.lq-field input:focus,
.lq-field select:focus,
.lq-opt-table input:focus {
    outline: none;
    border-color: var(--tool-brand);
    box-shadow: 0 0 0 3px var(--tool-brand-soft);
}
.lq-type {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    overflow: hidden;
}
.lq-type__btn {
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid var(--tool-border);
    border-radius: 0;
    background: #fff;
    color: var(--tool-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.lq-type__btn:last-child {
    border-right: 0;
}
.lq-type__btn:hover {
    background: #f3f5f7;
    color: var(--tool-brand);
}
.lq-type__btn.is-active {
    border-color: transparent;
    background: var(--tool-brand);
    color: #fff;
}
.lq-grid {
    display: grid;
    gap: 12px 16px;
}
.lq-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lq-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.lq-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 4px 0 16px;
    padding: 0;
    background: var(--tool-border);
    border-radius: var(--tool-radius);
    border: 1px solid var(--tool-border);
    overflow: hidden;
}
.lq-meta__item {
    background: #f7f9fa;
    border-radius: 0;
    padding: 12px 14px;
    border: 0;
}
.lq-meta__item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--tool-ink);
    font-weight: 700;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}
.lq-meta__item span {
    font-size: 12px;
    color: var(--tool-muted);
}
.lq-input-affix {
    display: flex;
    align-items: stretch;
}
.lq-input-affix input {
    flex: 1;
    min-width: 0;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.lq-input-affix span {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--tool-border);
    border-left: 0;
    border-radius: 0 var(--tool-radius) var(--tool-radius) 0;
    background: #eef2f5;
    color: var(--tool-muted);
    font-size: 12px;
    white-space: nowrap;
}
.lq-opt-table-wrap {
    overflow: auto;
}
.lq-opt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.lq-opt-table th,
.lq-opt-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5eaef;
    vertical-align: middle;
    text-align: left;
}
.lq-opt-table th {
    color: var(--tool-muted);
    font-weight: 700;
    background: #eef2f5;
    white-space: nowrap;
}
.lq-opt-name {
    font-weight: 600;
    color: var(--tool-text);
    white-space: nowrap;
}
.lq-opt-remark {
    color: var(--tool-text);
    font-size: 13px;
    font-weight: 400;
    min-width: 180px;
}
.lq-opt-table td:nth-child(2),
.lq-opt-table td:nth-child(3) {
    min-width: 150px;
}
.lq-opt-table td:nth-child(4) {
    min-width: 200px;
    width: 36%;
}
.lq-opt-del {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: var(--tool-radius);
    background: #fff2f2;
    color: #d9534f;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.lq-add-btn {
    margin-top: 12px;
    height: 36px;
    padding: 0 14px;
    border: 1px dashed var(--tool-brand);
    border-radius: var(--tool-radius);
    background: var(--tool-brand-light);
    color: var(--tool-brand);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.lq-add-btn:hover {
    background: #d6eef9;
}
.lq-sliders {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
    margin-top: 8px;
}
.lq-slider__label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tool-text);
}
.lq-slider__label strong {
    color: var(--tool-brand);
    margin-left: 4px;
}
.lq-slider input[type="range"] {
    width: 100%;
    accent-color: var(--tool-brand);
}
.lq-gen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 4px 0 0;
    height: 46px;
    border: 0;
    border-radius: var(--tool-radius);
    background: var(--tool-brand);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    box-shadow: none;
    transition: background .15s, transform .15s;
}
.lq-gen-btn:hover {
    background: var(--tool-brand-dark);
}
.lq-gen-btn:active {
    transform: translateY(1px);
}
.lq-result {
    width: 100%;
    max-width: none;
    margin: 0;
}
.lq-result__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.lq-result__bar h2 {
    margin: 0;
    padding: 0;
    border: 0;
}

/* 报价单文档样式 */
.lq-doc {
    background: transparent;
}
.lq-doc__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.lq-doc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.lq-doc__save {
    border-color: var(--tool-brand);
    color: var(--tool-brand);
}
.lq-doc__save:hover {
    border-color: var(--tool-brand);
    color: var(--tool-brand-dark);
    background: var(--tool-brand-light);
}
.lq-doc__tip {
    margin: 0;
    color: var(--tool-muted);
    font-size: 12px;
}
.lq-doc__paper {
    background: #fff;
    border: 1px solid var(--tool-border);
    border-top: 3px solid var(--tool-brand);
    border-radius: var(--tool-radius);
    padding: 28px 28px 32px;
    box-shadow: none;
}
.lq-doc__head {
    text-align: left;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #cfd6de;
}
.lq-doc__head h2 {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--tool-ink);
    letter-spacing: .02em;
}
.lq-doc__no {
    color: var(--tool-muted);
    font-size: 13px;
}
.lq-doc__meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    padding: 0;
    margin-bottom: 16px;
    background: var(--tool-border);
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    overflow: hidden;
}
.lq-doc__meta > div {
    padding: 12px 14px;
    background: #f7f9fa;
}
.lq-doc__meta span {
    display: block;
    margin-bottom: 4px;
    color: var(--tool-muted);
    font-size: 12px;
}
.lq-doc__meta strong {
    color: var(--tool-text);
    font-size: 14px;
    font-weight: 700;
    word-break: break-all;
}
.lq-doc__table-wrap {
    overflow: auto;
}
.lq-doc__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.lq-doc__table th {
    padding: 12px 10px;
    border-bottom: 1px solid #d3d9e0;
    color: var(--tool-muted);
    font-weight: 700;
    text-align: left;
    background: #eef2f5;
    white-space: nowrap;
}
.lq-doc__table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5eaef;
    color: var(--tool-text);
    vertical-align: middle;
}
.lq-doc__table td.c { text-align: center; }
.lq-doc__table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.lq-doc__table tr.lq-doc__row:nth-child(even) td {
    background: #fafbfc;
}
.lq-doc__table tr.lq-doc__row [contenteditable="true"] {
    outline: none;
    border-radius: 2px;
}
.lq-doc__table tr.lq-doc__row [contenteditable="true"]:focus {
    box-shadow: inset 0 0 0 1px var(--tool-brand);
    background: #f0f9f7;
}
.lq-doc__sec td {
    background: var(--tool-brand) !important;
    color: #fff !important;
    font-weight: 700;
    border-bottom: 0;
}
.lq-doc__sec-amt {
    text-align: right !important;
}
.lq-doc__sub td {
    background: #eef2f5 !important;
    color: #5a6a7a !important;
    font-weight: 700;
    border-bottom: 0;
}
.lq-doc__tax {
    margin-top: 10px;
    text-align: right;
    color: var(--tool-muted);
    font-size: 13px;
}
.lq-doc__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 14px 18px;
    border-radius: var(--tool-radius);
    background: var(--tool-brand);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}
.lq-doc__avg {
    margin-top: 8px;
    text-align: right;
    color: var(--tool-muted);
    font-size: 13px;
}
.lq-doc__contact {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: 18px;
    padding: 0;
    background: var(--tool-border);
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    overflow: hidden;
}
.lq-doc__contact > div {
    padding: 14px;
    background: #f7f9fa;
}
.lq-doc__contact span {
    display: block;
    margin-bottom: 4px;
    color: var(--tool-muted);
    font-size: 12px;
}
.lq-doc__contact strong {
    color: var(--tool-text);
    font-size: 14px;
}
.lq-doc__notes {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #e2d2a8;
    border-left: 3px solid #d97706;
    border-radius: var(--tool-radius);
    background: #fffbeb;
}
.lq-doc__notes h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #7c5a1a;
}
.lq-doc__notes ol {
    margin: 0;
    padding-left: 18px;
    color: #7c5a1a;
    font-size: 12px;
    line-height: 1.7;
}
.lq-doc__sign {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 28px;
}
.lq-doc__sign p {
    margin: 0 0 8px;
    color: var(--tool-text);
    font-size: 14px;
}
.lq-doc__sign-line {
    height: 1px;
    margin: 36px 0 10px;
    background: #cfd6de;
}
.lq-doc__sign-date {
    color: var(--tool-muted) !important;
    font-size: 12px !important;
}

/* 带载示意图弹层 */
.lq-modal[hidden] { display: none !important; }
.lq-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lq-modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 32, 48, .45);
}
.lq-modal__panel {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border-radius: 4px;
    border-top: 3px solid var(--tool-brand, #00a0e9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.lq-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px dashed #cfd6de;
}
.lq-modal__head h3 {
    margin: 0 0 4px;
    font-size: 18px;
}
.lq-modal__head p {
    margin: 0;
    color: var(--tool-muted);
    font-size: 13px;
}
.lq-modal__head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lq-modal__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 4px;
    background: #eef2f5;
    color: #5a6a7a;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.lq-modal__body {
    padding: 18px 20px 24px;
}
.lq-sch__stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: #f5f7fa;
    border-radius: 8px;
}
.lq-sch__stats span {
    display: block;
    margin-bottom: 4px;
    color: var(--tool-muted);
    font-size: 12px;
}
.lq-sch__stats strong {
    font-size: 13px;
    color: var(--tool-text);
}
.lq-sch__axis-x {
    text-align: center;
    margin-bottom: 8px;
    color: var(--tool-muted);
    font-size: 12px;
}
.lq-sch__stage {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.lq-sch__axis-y {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: var(--tool-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lq-sch__grid {
    flex: 1;
    display: grid;
    gap: 8px;
    min-height: 220px;
    padding: 10px;
    border: 1px solid var(--tool-border, #d5dde5);
    border-radius: 4px;
    background: #fff;
}
.lq-sch__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 200px;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
}
.lq-sch__card em {
    font-style: normal;
    opacity: .9;
    font-size: 12px;
}
.lq-sch__port-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: #e85d9a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}
.lq-sch__diagram {
    margin: 8px 0 12px;
    overflow: auto;
}
.lq-sch__svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}
.lq-sch__table-wrap {
    overflow: auto;
    max-height: 320px;
}
.lq-sch__legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
    margin: 14px 0 18px;
    font-size: 12px;
    color: var(--tool-text);
}
.lq-sch__legend i,
.lq-sch__table i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.lq-sch__table-title {
    margin: 0 0 10px;
    font-size: 15px;
}
.lq-sch__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 14px;
}
.lq-sch__table th,
.lq-sch__table td {
    border: 1px solid #e8edf2;
    padding: 10px 12px;
    text-align: center;
}
.lq-sch__table th {
    background: #f7fafc;
    color: var(--tool-muted);
}
.lq-sch__note {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fffbeb;
    color: #8a6d3b;
    font-size: 12px;
    line-height: 1.7;
}
.lq-sch__note strong {
    display: block;
    margin-bottom: 4px;
}
.lq-sch__note p {
    margin: 0;
}
.lq-toast {
    position: fixed;
    left: 50%;
    top: 20%;
    z-index: 9999;
    transform: translate(-50%, -8px);
    padding: 12px 18px;
    border-radius: 8px;
    background: rgba(31, 45, 61, .92);
    color: #fff;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.lq-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 900px) {
    .lq-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lq-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lq-type {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lq-type__btn:nth-child(2) {
        border-right: 0;
    }
    .lq-type__btn:nth-child(1),
    .lq-type__btn:nth-child(2) {
        border-bottom: 1px solid var(--tool-border);
    }
    .lq-sliders {
        grid-template-columns: 1fr;
    }
    .lq-doc__meta,
    .lq-doc__contact,
    .lq-sch__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lq-doc__sign {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
@media (max-width: 640px) {
    .lq-grid--2,
    .lq-grid--4 {
        grid-template-columns: 1fr;
    }
    .lq-meta {
        grid-template-columns: 1fr 1fr;
    }
    .lq-type {
        grid-template-columns: 1fr 1fr;
    }
    .lq-doc__paper {
        padding: 18px 14px 22px;
    }
    .lq-doc__meta,
    .lq-doc__contact,
    .lq-sch__stats {
        grid-template-columns: 1fr;
    }
    .lq-sch__stage {
        flex-direction: column;
    }
    .lq-sch__axis-y {
        writing-mode: horizontal-tb;
        transform: none;
    }
}
