/* ============================================
   印刷工具实验室 样式
   1) 实验室首页：标题区 + 工具卡片网格 + 筛选
   2) 工具页通用：输入面板、结果区
   配色沿用 css/style.css 里的 :root 变量
   ============================================ */

/* ---------------- 实验室首页 · 标题区 ---------------- */
.lab-hero {
    position: relative;
    overflow: hidden;
    padding: 46px 0 40px;
    color: #fff;
    background: linear-gradient(135deg, #14264a 0%, #1a3a6b 55%, #23508f 100%);
}

/* 淡淡的网点纹理，衬托"实验室"的感觉 */
.lab-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.45;
    pointer-events: none;
}

.lab-hero .container {
    position: relative;
    z-index: 1;
}

.lab-kicker {
    display: inline-block;
    margin-bottom: 14px;
    padding: 3px 12px;
    border: 1px solid rgba(143, 178, 224, 0.45);
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 3px;
    color: #9dbbdf;
}

.lab-hero h1 {
    margin-bottom: 10px;
    font-size: 30px;
    letter-spacing: 2px;
}

.lab-hero > .container > p {
    max-width: 620px;
    font-size: 14.5px;
    line-height: 1.85;
    color: #c2d3e9;
}

.lab-meta {
    display: flex;
    gap: 38px;
    margin-top: 24px;
}

.lab-meta strong {
    display: block;
    font-size: 22px;
    line-height: 1.35;
    color: #fff;
}

.lab-meta strong.accent {
    color: #ff8f6b;
}

.lab-meta em {
    font-style: normal;
    font-size: 12px;
    color: #9db4d4;
}

/* ---------------- 实验室首页 · 工具网格 ---------------- */
.lab-main {
    min-height: 50vh;
    padding: 34px 0 60px;
    background: #f5f7fa;
}

.lab-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.lab-chip {
    padding: 7px 16px;
    border: 1px solid #dde5f0;
    border-radius: 999px;
    background: #fff;
    color: #5a6880;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.lab-chip:hover {
    border-color: #b9cbe4;
    color: #1a3a6b;
}

.lab-chip.active {
    border-color: #1a3a6b;
    background: #1a3a6b;
    color: #fff;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    min-height: 176px;
    padding: 20px 20px 16px;
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

a.tool-card:hover {
    transform: translateY(-4px);
    border-color: #c3d5ec;
    box-shadow: 0 10px 24px rgba(26, 58, 107, 0.12);
}

.tool-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
}

.tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eef2f8;
    font-size: 20px;
    line-height: 1;
}

.tool-cat {
    padding: 2px 8px;
    border: 1px solid #e6ecf5;
    border-radius: 4px;
    font-size: 11.5px;
    color: #8a94a6;
}

.tool-name {
    display: block;
    margin-bottom: 6px;
    font-size: 16.5px;
    font-weight: bold;
    color: #1a3a6b;
}

.tool-desc {
    flex: 1;
    font-size: 13px;
    line-height: 1.65;
    color: #77839a;
}

.tool-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1px dashed #eef1f6;
    font-size: 12.5px;
}

.tool-open {
    color: #e8542e;
    font-weight: bold;
}

.tool-status {
    color: #9aa5b8;
}

/* 占位（还没做好的工具）卡片：虚线灰底，不可点 */
.tool-card.is-soon {
    border-style: dashed;
    border-color: #dfe5ee;
    background: #f8f9fb;
    cursor: default;
}

.tool-card.is-soon .tool-icon {
    background: #eef0f4;
    filter: grayscale(0.55);
    opacity: 0.85;
}

.tool-card.is-soon .tool-name {
    color: #8b97aa;
}

.tool-card.is-soon .tool-desc {
    color: #a2acbc;
}

.tool-card.is-hide {
    display: none !important;
}

/* 筛选后一条都没有时的提示 */
.lab-empty {
    display: none;
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
    color: #9aa5b8;
}

.lab-empty.show {
    display: block;
}

/* ---------------- 实验室首页 · 底部说明 ---------------- */
.lab-note {
    margin-top: 34px;
    padding: 20px 24px;
    border: 1px dashed #d7e0ec;
    border-radius: 12px;
    background: #fff;
    font-size: 13.5px;
    line-height: 1.9;
    color: #77839a;
}

.lab-note strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14.5px;
    color: #1a3a6b;
}

/* 管理员可见：如何新增工具 */
.lab-admin {
    margin-top: 22px;
    padding: 20px 24px;
    border: 1px dashed #e8542e;
    border-radius: 12px;
    background: #fff8f5;
    font-size: 13.5px;
    line-height: 1.95;
    color: #6b5b55;
}

.lab-admin h3 {
    margin-bottom: 8px;
    font-size: 15px;
    color: #c2431f;
}

.lab-admin ol {
    padding-left: 20px;
}

.lab-admin code {
    padding: 1px 5px;
    border-radius: 3px;
    background: #f0e6e2;
    font-family: Consolas, Monaco, monospace;
    font-size: 12.5px;
    color: #a8401f;
}

/* ============================================
   工具页通用样式（tools/ 文件夹下的页面共用）
   ============================================ */
.tp-bar {
    border-bottom: 1px solid #e9eef6;
    background: #fff;
}

.tp-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 880px;
    margin: 0 auto;
    padding: 11px 20px;
}

.tp-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15.5px;
    font-weight: bold;
    color: #1a3a6b;
    text-decoration: none;
}

.tp-brand img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.tp-bar .tp-back {
    font-size: 13px;
    color: #7c8aa3;
    text-decoration: none;
}

.tp-bar .tp-back:hover {
    color: #e8542e;
}

.tp-wrap {
    min-height: 70vh;
    padding: 26px 20px 56px;
    background: #f5f7fa;
}

.tp-card {
    max-width: 880px;
    margin: 0 auto;
    padding: 30px 34px 32px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(26, 58, 107, 0.08);
}

.tp-head h1 {
    margin-bottom: 8px;
    font-size: 23px;
    color: #1a3a6b;
}

.tp-head p {
    font-size: 13.5px;
    line-height: 1.8;
    color: #8a94a6;
}

.tp-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
    margin: 24px 0 22px;
}

.tp-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #66738a;
}

.tp-field label span {
    margin-left: 4px;
    font-size: 12px;
    color: #a6b0c0;
}

.tp-field input,
.tp-field select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fbfcfe;
    font-size: 15px;
    font-family: inherit;
    color: #2f3a4d;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tp-field input:focus,
.tp-field select:focus {
    border-color: #1a3a6b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.08);
}

/* 自定义纸张尺寸的两个输入框：默认隐藏 */
.tp-field.is-hidden {
    display: none;
}

.tp-result {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 18px;
    padding: 20px 22px;
    border-radius: 12px;
    background: #f2f6fc;
}

.res-label {
    display: block;
    margin-bottom: 3px;
    font-size: 12.5px;
    color: #7c8aa3;
}

.res-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.35;
    color: #1a3a6b;
    word-break: break-all;
}

.res-value small {
    margin-left: 3px;
    font-size: 12px;
    font-weight: normal;
    color: #8a94a6;
}

.res-item.highlight .res-value {
    font-size: 25px;
    color: #e8542e;
}

.tp-note {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px dashed #e6ecf5;
    font-size: 12.5px;
    line-height: 1.9;
    color: #94a0b3;
}

.tp-note b {
    color: #77839a;
    font-weight: bold;
}

.tp-more {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    max-width: 880px;
    margin: 18px auto 0;
    font-size: 13px;
}

.tp-more a {
    color: #5a6880;
    text-decoration: none;
}

.tp-more a:hover {
    color: #e8542e;
}

/* ---------------- 手机端 ---------------- */
@media (max-width: 768px) {
    .lab-hero {
        padding: 34px 0 30px;
    }

    .lab-hero h1 {
        font-size: 23px;
    }

    .lab-hero > .container > p {
        font-size: 13.5px;
    }

    .lab-meta {
        gap: 26px;
        margin-top: 18px;
    }

    .lab-meta strong {
        font-size: 19px;
    }

    .lab-main {
        padding: 24px 0 40px;
    }

    .lab-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tool-card {
        min-height: 0;
        padding: 16px 16px 13px;
    }

    .tool-top {
        margin-bottom: 10px;
    }

    .lab-note,
    .lab-admin {
        padding: 16px 16px;
        font-size: 13px;
    }

    .tp-wrap {
        padding: 16px 12px 40px;
    }

    .tp-card {
        padding: 22px 18px 24px;
    }

    .tp-head h1 {
        font-size: 20px;
    }

    .tp-form {
        grid-template-columns: 1fr;
        gap: 13px;
        margin: 18px 0;
    }

    .tp-result {
        grid-template-columns: repeat(2, 1fr);
        gap: 13px 12px;
        padding: 16px;
    }

    .res-value {
        font-size: 17px;
    }

    .res-item.highlight .res-value {
        font-size: 21px;
    }

    .tp-more {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 0 4px;
    }
}
