/* ============================================================
   PDF 工具页统一设计系统（2026-10 v3）
   延续站点「墨青单色系 · 近直角 · 零装饰」语言
   仅作用于 .pt-page 容器内，不影响站点其他页面
   ============================================================ */

:root {
    --pt-brand: #365f78;
    --pt-deep: #2d5065;
    --pt-ink: #263b48;
    --pt-ink-soft: #42596a;
    --pt-muted: #58707e;
    --pt-line: #e4eaf0;
    --pt-paper: #ffffff;
    --pt-radius: 6px;
}

/* ============ 卡片 ============ */
.pt-page .pt-card {
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius);
    background: #fff;
}
.pt-page .pt-card > .card-body { padding: 28px; }
@media (max-width: 575.98px) {
    .pt-page .pt-card > .card-body { padding: 20px 18px; }
}

/* ============ 分组标题（步骤感） ============ */
.pt-group { margin-bottom: 22px; }
.pt-group:last-child { margin-bottom: 0; }
.pt-group-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--pt-ink-soft);
    margin: 0 0 11px;
}
.pt-group-title .pt-step-dot {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: var(--pt-brand);
}
.pt-group-title i.ti {
    font-size: 18px;
    color: var(--pt-brand);
}

/* ============ 表单元素 ============ */
.pt-page .form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-ink-soft);
    margin-bottom: 7px;
}
.pt-page .form-control,
.pt-page .form-select {
    border-radius: var(--pt-radius);
    border-color: var(--pt-line);
    padding: .62rem .9rem;
    font-size: 14px;
    color: var(--pt-ink);
    background-color: #fff;
}
.pt-page .form-control:focus,
.pt-page .form-select:focus {
    border-color: var(--pt-brand);
    box-shadow: 0 0 0 3px rgba(54, 95, 120, .14);
}
.pt-page .form-text {
    color: var(--pt-muted);
    font-size: 14px;
    line-height: 1.55;
}
.pt-page .form-check-input {
    border-color: #acc1cf;
}
.pt-page .form-check-input:checked {
    background-color: var(--pt-brand);
    border-color: var(--pt-brand);
}
.pt-page .form-check-input:focus {
    border-color: var(--pt-brand);
    box-shadow: 0 0 0 3px rgba(54, 95, 120, .15);
}
.pt-page .form-check-label { font-size: 14px; color: var(--pt-ink); }

/* 颜色选择器 */
.pt-page .form-control-color {
    width: 100%;
    height: 42px;
    border-radius: var(--pt-radius);
    border: 1px solid var(--pt-line);
    padding: 4px;
}

/* ============ 高对比说明条（替代 alert-light/alert-info） ============ */
.pt-note {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    background: #f4f8fa;
    border: 1px solid #dbe6ec;
    border-left: 4px solid var(--pt-brand);
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 14px;
    line-height: 1.7;
    color: #2f4a5c;
    margin: 0;
}
.pt-note > i {
    color: var(--pt-brand);
    font-size: 18px;
    line-height: 1.4;
    flex: 0 0 auto;
}
.pt-note-amber {
    background: #fcf4ec;
    border-color: #e6d0b9;
    border-left-color: #7f5114;
    color: #7f5114;
}
.pt-note-amber > i { color: #7f5114; }
.pt-note-green {
    background: #eef9f2;
    border-color: #bfddca;
    border-left-color: #37684d;
    color: #37684d;
}
.pt-note-green > i { color: #37684d; }

/* ============ 胶囊分段选择器 ============ */
.pt-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-seg input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pt-seg label {
    margin: 0;
    padding: 8px 17px;
    border-radius: 999px;
    border: 1px solid var(--pt-line);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #42596a;
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
}
.pt-seg label:hover {
    border-color: #acc1cf;
    color: var(--pt-deep);
}
.pt-seg input:checked + label {
    background: var(--pt-brand);
    color: #fff;
    border-color: var(--pt-brand);
}
.pt-seg label .ti { margin-right: 5px; font-size: 15px; vertical-align: -2px; }

/* ============ 可点选选项卡（图标 + 名称 + 描述） ============ */
.pt-optgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.pt-optgrid.pt-optgrid-3 { grid-template-columns: repeat(3, 1fr); }
.pt-optgrid.pt-optgrid-2 { grid-template-columns: repeat(2, 1fr); }
.pt-optgrid.pt-optgrid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 767.98px) {
    .pt-optgrid.pt-optgrid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
    .pt-optgrid,
    .pt-optgrid.pt-optgrid-3,
    .pt-optgrid.pt-optgrid-2 { grid-template-columns: repeat(2, 1fr); }
}
/* 印章九宫格位置选择 */
.pt-stampgrid {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    gap: 6px;
}
.pt-stampgrid label {
    position: relative;
    margin: 0;
    cursor: pointer;
}
.pt-stampgrid input {
    position: absolute;
    opacity: 0;
    inset: 0;
}
.pt-stampgrid span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border: 1px solid var(--pt-line);
    border-radius: 6px;
    background: #fff;
    font-weight: 600;
    color: var(--pt-muted);
    transition: all .15s ease;
}
.pt-stampgrid input:checked + span {
    border-color: var(--pt-brand);
    background: #e2edf2;
    color: var(--pt-deep);
}
.pt-opt {
    position: relative;
    display: block;
    border: 1px solid var(--pt-line);
    border-radius: 6px;
    padding: 14px 14px 13px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s ease, background .15s ease;
    margin: 0;
}
.pt-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pt-opt:hover {
    border-color: #acc1cf;
    background: #f4f8fa;
}
.pt-opt .pt-opt-icon {
    font-size: 21px;
    color: #798993;
    display: block;
    margin-bottom: 8px;
    transition: color .15s ease;
}
.pt-opt .pt-opt-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-ink);
    line-height: 1.35;
}
.pt-opt .pt-opt-desc {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    color: var(--pt-muted);
    margin-top: 3px;
}
.pt-opt:has(input:checked) {
    border-color: var(--pt-brand);
    background: #e2edf2;
}
.pt-opt:has(input:checked) .pt-opt-name { color: var(--pt-deep); }
.pt-opt:has(input:checked) .pt-opt-icon { color: var(--pt-brand); }
.pt-opt:has(input:checked)::after {
    content: "";
    position: absolute;
    right: 9px;
    top: 9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--pt-brand);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 11px 11px;
    background-position: center;
    background-repeat: no-repeat;
}

/* ============ 主按钮 ============ */
.pt-page .btn-primary {
    border: 1px solid var(--pt-brand);
    border-radius: 6px;
    padding: 10px 28px;
    font-weight: 600;
    font-size: 15px;
    background: var(--pt-brand);
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.pt-page .btn-primary:hover,
.pt-page .btn-primary:focus {
    background: var(--pt-deep);
    border-color: var(--pt-deep);
    color: #fff;
}
.pt-page .btn-primary:active { transform: scale(.98); }

/* ============ 文件列表（合并） ============ */
.pt-file {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--pt-line);
    border-radius: 6px;
    padding: 9px 12px;
    margin-bottom: 8px;
    background: #fff;
    font-size: 14px;
    color: var(--pt-ink);
}
.pt-file .pt-file-idx {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2edf2;
    color: var(--pt-deep);
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pt-file .pt-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pt-file .pt-file-actions { flex: 0 0 auto; display: flex; gap: 4px; }
.pt-file .pt-file-actions button {
    border: 0;
    background: transparent;
    color: #798993;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
}
.pt-file .pt-file-actions button:hover { background: #f4f8fa; color: var(--pt-deep); }
.pt-file .pt-file-actions button.pt-is-up { opacity: .35; pointer-events: none; }

/* ============ 上传/拖放区 ============ */
.pt-drop {
    border: 2px dashed #acc1cf;
    border-radius: 6px;
    background: #fafcfe;
    padding: 30px 20px;
    text-align: center;
    transition: border-color .2s ease, background .2s ease;
}
.pt-drop:hover { border-color: var(--pt-brand); }
.pt-drop i {
    font-size: 34px;
    color: var(--pt-brand);
    display: block;
    margin-bottom: 8px;
}

/* 上传限制提示（替代看不清的 text-muted small） */
.pt-upload-tip {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pt-muted);
}
.pt-upload-tip i {
    color: #798993;
    font-size: 15px;
    line-height: 1.5;
    flex: 0 0 auto;
}

/* range 滑杆品牌色 */
.pt-page .form-range::-webkit-slider-thumb {
    background-color: var(--pt-brand);
}
.pt-page .form-range::-moz-range-thumb {
    background-color: var(--pt-brand);
}
.pt-page .form-range::-webkit-slider-runnable-track {
    background: #dbe6ec;
}

/* ============ 预览卡（水印/加页码） ============ */
.pt-preview-card .card-body { background: #fff; }
.pt-preview-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.414;
    background: #fff;
    border: 1px solid var(--pt-line);
    border-radius: 6px;
    overflow: hidden;
}
.pt-preview-caption {
    font-size: 14px;
    color: var(--pt-muted);
    text-align: center;
    margin-top: 10px;
}
/* JSON 信息结果（书签/附件清单等） */
.pt-json-pre {
    max-height: 460px;
    overflow: auto;
    background: #f6f9fb;
    font-size: 14px;
    line-height: 1.6;
    color: #2b3a45;
    white-space: pre;
    border-radius: 0 0 6px 6px;
}
/* 多选/单选项的朴素勾选项行（用于一组布尔开关） */
.pt-chkrow {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid var(--pt-line);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    margin: 0;
    transition: border-color .15s ease, background .15s ease;
}
.pt-chkrow:hover { border-color: rgba(54, 95, 120, .45); }
.pt-chkrow input { margin-top: 3px; }
.pt-chkrow .pt-chk-title { display: block; font-weight: 600; font-size: 14px; }
.pt-chkrow .pt-chk-desc { display: block; font-size: 14px; color: var(--pt-muted); }
