/* ===== 项目全生命周期管理站点样式 =====
   配色与 CCCGrame.Cloud.Web / CCCGrame.Panel 的主题变量对齐（经典深蓝），
   保证在多站点之间切换时视觉一致。 */

/* ===== 皮肤变量：默认「经典深蓝」，html[data-theme] 一键切换 =====
   与 AI 助手（CCCGrame.Cloud.Web）、游戏中心（CCCGrame.Panel/wwwroot/css/skin.css）四套取值逐一对齐，
   保证在壳层里选同一皮肤时三个站点视觉一致。主题由外部（壳层 ?skin= / Cookie uiSkin）下发。 */
:root {
    --bg: #0d1117;
    --panel: #161b22;
    --panel2: #1b2433;
    --line: #262d38;
    --text: #e6edf3;
    --muted: #8b949e;
    --primary: #4f8cff;
    --primary-dark: #3a72e0;
    --ok: #3fb950;
    --warn: #d29922;
    --danger: #f85149;
    --skip: #6e7681;
    --input-bg: #0d1117;
    --ghost: rgba(255, 255, 255, .04);
    --row-bg: rgba(22, 27, 34, .78);
    --top-bg: rgba(13, 17, 23, .88);
    --shadow: rgba(0, 0, 0, .35);
    --scroll: #2b3648;
    --scroll-hover: #3d4b63;
    --modal-mask: rgba(4, 8, 16, .82);
    --bg-top: #141d2b;
    --bg-bottom: #0d1117;
    --glow: #1b2a44;
    --radius: 12px;
}
html[data-theme="light"] {
    --bg: #f2f6fb;
    --panel: #ffffff;
    --panel2: #eef3fa;
    --line: #d6e0ee;
    --text: #1b2430;
    --muted: #5f6f85;
    --primary: #2f6fe4;
    --primary-dark: #1f56bd;
    --ok: #1f9d55;
    --warn: #b7791f;
    --danger: #d64541;
    --skip: #98a6b8;
    --input-bg: #f7f9fd;
    --ghost: rgba(20, 40, 80, .05);
    --row-bg: rgba(20, 40, 80, .03);
    --top-bg: rgba(255, 255, 255, .92);
    --shadow: rgba(30, 60, 110, .14);
    --scroll: #c3d0e2;
    --scroll-hover: #a8bad2;
    --modal-mask: rgba(24, 44, 80, .42);
    --bg-top: #ffffff;
    --bg-bottom: #e9eff8;
    --glow: rgba(47, 111, 228, .10);
}
html[data-theme="cyber"] {
    --bg: #0a0714;
    --panel: #15102a;
    --panel2: #1d1638;
    --line: #352a5c;
    --text: #eae4ff;
    --muted: #a99bd0;
    --primary: #a855f7;
    --primary-dark: #7e3fd0;
    --ok: #22d3a6;
    --warn: #f59e0b;
    --danger: #ff5c8a;
    --skip: #7d6fa8;
    --input-bg: #120d24;
    --ghost: rgba(255, 255, 255, .06);
    --row-bg: rgba(255, 255, 255, .04);
    --top-bg: rgba(18, 10, 36, .88);
    --shadow: rgba(0, 0, 0, .45);
    --scroll: #3b2e63;
    --scroll-hover: #544188;
    --modal-mask: rgba(6, 3, 16, .82);
    --bg-top: #1d1638;
    --bg-bottom: #070512;
    --glow: rgba(120, 60, 200, .35);
}
html[data-theme="ocean"] {
    --bg: #04121a;
    --panel: #0b1f2b;
    --panel2: #102a38;
    --line: #1d3f50;
    --text: #e0f2f7;
    --muted: #8fb3c2;
    --primary: #22b8cf;
    --primary-dark: #1796a9;
    --ok: #2dd4a7;
    --warn: #e0a33e;
    --danger: #ff6b6b;
    --skip: #6f8f9e;
    --input-bg: #07161f;
    --ghost: rgba(255, 255, 255, .06);
    --row-bg: rgba(255, 255, 255, .04);
    --top-bg: rgba(7, 25, 35, .88);
    --shadow: rgba(0, 0, 0, .45);
    --scroll: #1d3f50;
    --scroll-hover: #2c5a70;
    --modal-mask: rgba(2, 12, 18, .82);
    --bg-top: #102a38;
    --bg-bottom: #030d14;
    --glow: rgba(20, 90, 110, .45);
}

* { box-sizing: border-box; }

/* ===== 滚动条美化（深色细条；Firefox 与 Chromium 双写）=====
   系统默认的白色粗滚动条与深色主题冲突，尤其在流程图横向滚动时非常扎眼。 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll) transparent;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--scroll);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

html, body {
    margin: 0;
    padding: 0;
    /* 与 AI 助手同一套背景：顶部柔光 + 竖向渐变，换肤时整页平滑过渡 */
    background:
        radial-gradient(1000px 500px at 50% -10%, var(--glow), transparent 60%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background .25s ease, color .25s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶部栏 ===== */
.pm-top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--top-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.pm-top-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}
.pm-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.pm-brand:hover { text-decoration: none; }
.pm-logo {
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #7c5cff);
    color: #fff; font-weight: 700; font-size: 14px;
}
.pm-nav { display: flex; gap: 4px; flex: 1; }
.pm-nav a {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}
.pm-nav a:hover { background: var(--ghost); color: var(--text); text-decoration: none; }
.pm-nav a.on { background: rgba(79, 140, 255, .16); color: var(--primary); }

/* 皮肤切换点（独立访问时显示；嵌入壳层时由壳层悬浮球接管） */
.pm-skins { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.pm-skin {
    width: 15px; height: 15px;
    border-radius: 50%;
    border: 1px solid rgba(128, 128, 128, .45);
    padding: 0;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.pm-skin:hover { transform: scale(1.12); }
.pm-skin.on { box-shadow: 0 0 0 2px var(--primary); }
.pm-skin.dark { background: #0d1117; }
.pm-skin.light { background: #f2f6fb; }
.pm-skin.cyber { background: #a855f7; }
.pm-skin.ocean { background: #22b8cf; }

.pm-user { display: flex; align-items: center; gap: 6px; }
.pm-user-label { font-size: 12px; color: var(--muted); }
.pm-user input {
    width: 96px;
    padding: 4px 8px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: var(--input-bg);
    color: var(--text);
    font-size: 12px;
    font-family: inherit;
}

/* ===== 主体 ===== */
.pm-main { max-width: 1280px; margin: 0 auto; padding: 20px; }
.pm-foot {
    max-width: 1280px; margin: 0 auto;
    padding: 26px 20px 40px;
    text-align: center; color: var(--muted); font-size: 12px;
}

/* ===== 提示弹窗（居中浮层，自动淡出）=====
   与 CCCGrame.Cloud.Web 的 .toast 同一套位置/阴影口径，只用本站的 CSS 变量取色。 */
.pm-toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(.96);
    opacity: 0;
    pointer-events: none;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 14px 22px;
    border-radius: 12px;
    box-shadow: 0 16px 40px var(--shadow);
    font-size: 13.5px;
    z-index: 300;
    width: max-content;
    max-width: calc(100vw - 32px);
    text-align: center;
    word-break: break-word;
    line-height: 1.6;
    transition: opacity .18s ease, transform .18s ease;
}
.pm-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    cursor: pointer;
}
.pm-toast.ok { border-color: rgba(63, 185, 80, .5); box-shadow: 0 16px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(63, 185, 80, .18) inset; }
.pm-toast.err { border-color: rgba(248, 81, 73, .5); color: #ffb4ae; box-shadow: 0 16px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(248, 81, 73, .18) inset; }
.pm-toast::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: var(--muted); }
.pm-toast.ok::before { background: var(--ok); }
.pm-toast.err::before { background: var(--danger); }

/* ===== 卡片 ===== */
.pm-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .02) inset;
}
.pm-card-h {
    display: flex; align-items: center; gap: 10px;
    margin: -2px 0 14px;
}
.pm-card-h h2, .pm-card-h h3 {
    margin: 0; font-size: 15px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.pm-card-h .pm-sub { color: var(--muted); font-size: 12px; font-weight: 400; }
.pm-card-h .pm-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ===== 按钮 ===== */
.pm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, opacity .15s;
}
.pm-btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); text-decoration: none; }
.pm-btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.pm-btn-ghost:hover { background: var(--ghost); border-color: #3a4452; }
.pm-btn-danger { background: transparent; border-color: rgba(248, 81, 73, .5); color: #ff7b72; }
.pm-btn-danger:hover { background: rgba(248, 81, 73, .12); border-color: var(--danger); }
.pm-btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.pm-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ===== 统计卡 ===== */
.pm-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.pm-stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.pm-stat .n { font-size: 22px; font-weight: 700; line-height: 1.2; }
.pm-stat .t { font-size: 12px; color: var(--muted); }
.pm-stat.ok .n { color: var(--ok); }
.pm-stat.blue .n { color: var(--primary); }
.pm-stat.warn .n { color: var(--warn); }
.pm-stat.danger .n { color: var(--danger); }

/* ===== 筛选栏 ===== */
.pm-filter {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    margin-bottom: 14px;
}
.pm-filter input, .pm-filter select {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--input-bg);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
}
.pm-filter input[type="text"] { width: 230px; }

/* ===== 表格 ===== */
.pm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pm-table th {
    text-align: left; font-weight: 500; color: var(--muted);
    padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.pm-table td { padding: 11px 10px; border-bottom: 1px solid rgba(38, 45, 56, .7); vertical-align: middle; }
.pm-table tr:hover td { background: var(--ghost); }
.pm-table .pm-name { font-weight: 600; color: var(--text); }
.pm-table .pm-code { color: var(--muted); font-size: 12px; font-family: ui-monospace, Consolas, monospace; }

/* ===== 标签 ===== */
.pm-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 99px;
    font-size: 11.5px;
    border: 1px solid var(--line);
    color: var(--muted);
    white-space: nowrap;
}
.pm-tag.blue { color: #79b8ff; border-color: rgba(79, 140, 255, .45); background: rgba(79, 140, 255, .12); }
.pm-tag.ok { color: #7ee787; border-color: rgba(63, 185, 80, .45); background: rgba(63, 185, 80, .12); }
.pm-tag.warn { color: #e3b341; border-color: rgba(210, 153, 34, .45); background: rgba(210, 153, 34, .12); }
.pm-tag.danger { color: #ff9b94; border-color: rgba(248, 81, 73, .45); background: rgba(248, 81, 73, .12); }
.pm-tag.skip { color: var(--skip); border-style: dashed; }

/* ===== 进度条 ===== */
.pm-progress { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.pm-progress > i {
    display: block; height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), #7c5cff);
    transition: width .35s ease;
}
.pm-progress.ok > i { background: linear-gradient(90deg, var(--ok), #56d364); }

/* ===== 项目概要 ===== */
.pm-summary { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.pm-summary-main { flex: 1 1 420px; min-width: 300px; }
.pm-summary-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pm-summary-title h1 { margin: 0; font-size: 20px; font-weight: 700; }
.pm-summary-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.pm-summary-desc {
    color: #c9d1d9; font-size: 13px;
    background: var(--panel2);
    border-radius: 9px;
    padding: 10px 12px;
    white-space: pre-wrap;
}
.pm-summary-side { flex: 0 0 260px; min-width: 220px; }
.pm-kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 12.5px; }
.pm-kv span:first-child { color: var(--muted); }
.pm-kv span:last-child { text-align: right; }

/* ===== 生命周期流程图 ===== */
.pm-flow-wrap {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 2px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--scroll) transparent;
}
/* 流程图横向滚动条：常驻细条，避免内容被裁时用户找不到可滚动 */
.pm-flow-wrap::-webkit-scrollbar { height: 8px; }
.pm-flow-wrap::-webkit-scrollbar-track { background: var(--ghost); border-radius: 99px; }
.pm-flow-wrap::-webkit-scrollbar-thumb {
    background: var(--scroll);
    border-radius: 99px;
    border: none;
}
.pm-flow-wrap::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }
.pm-flow { display: flex; align-items: flex-start; min-width: max-content; padding: 4px 2px; }
.pm-flow-node {
    position: relative;
    flex: 0 0 auto;
    /* 12 个环节 × 96px ≈ 1152px，正好放进 1280 内容区（窄屏仍可横向滚动） */
    width: 96px;
    text-align: center;
    cursor: pointer;
    padding: 2px 0 4px;
    user-select: none;
}
/* 连接线：节点右侧到下一个节点 */
.pm-flow-node:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 19px;
    left: calc(50% + 19px);
    width: calc(100% - 38px);
    height: 2px;
    background: var(--line);
    border-radius: 2px;
    z-index: 0;
}
.pm-flow-node.done:not(:last-child)::after { background: rgba(63, 185, 80, .55); }
.pm-flow-node.doing:not(:last-child)::after { background: linear-gradient(90deg, var(--primary), var(--line)); }

.pm-dot {
    position: relative;
    z-index: 1;
    width: 38px; height: 38px;
    margin: 0 auto 7px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    background: var(--panel2);
    border: 2px solid var(--line);
    color: var(--muted);
    transition: transform .15s, border-color .15s, background .15s, color .15s;
}
.pm-flow-node:hover .pm-dot { transform: translateY(-2px); border-color: #3d4b63; }
.pm-flow-node.done .pm-dot { background: rgba(63, 185, 80, .16); border-color: var(--ok); color: #7ee787; }
.pm-flow-node.doing .pm-dot {
    background: rgba(79, 140, 255, .18);
    border-color: var(--primary);
    color: #79b8ff;
    box-shadow: 0 0 0 4px rgba(79, 140, 255, .13);
}
.pm-flow-node.skip .pm-dot { border-style: dashed; color: var(--skip); }
.pm-flow-node.active .pm-dot {
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .13);
}
.pm-flow-node .nm { font-size: 11.5px; line-height: 1.35; color: var(--text); white-space: nowrap; }
.pm-flow-node.skip .nm { color: var(--muted); }
.pm-flow-node .st { font-size: 11px; color: var(--muted); margin-top: 1px; }
.pm-flow-node.done .st { color: #7ee787; }
.pm-flow-node.doing .st { color: #79b8ff; }
.pm-flow-node .badges { display: flex; justify-content: center; gap: 4px; margin-top: 3px; }
.pm-flow-node .badges i {
    font-style: normal; font-size: 10px;
    padding: 0 5px; border-radius: 99px;
    background: var(--ghost); color: var(--muted); border: 1px solid var(--line);
}

.pm-flow-legend {
    display: flex; flex-wrap: wrap; gap: 14px;
    font-size: 11.5px; color: var(--muted);
    margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line);
}
.pm-flow-legend b { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

/* ===== 阶段面板 ===== */
.pm-panel { display: none; }
.pm-panel.on { display: block; }

.pm-stage-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pm-stage-head h3 { margin: 0; font-size: 16px; }
.pm-stage-desc { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }

/* ===== 表单 ===== */
.pm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.pm-grid.c2 { grid-template-columns: repeat(2, 1fr); }
.pm-field { display: flex; flex-direction: column; gap: 5px; }
.pm-field.full { grid-column: 1 / -1; }
.pm-field label { font-size: 12px; color: var(--muted); }
.pm-field input, .pm-field select, .pm-field textarea {
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--input-bg);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
}
.pm-field textarea { resize: vertical; min-height: 74px; line-height: 1.65; }
.pm-field input:focus, .pm-field select:focus, .pm-field textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, .16);
}
.pm-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pm-hint { color: var(--muted); font-size: 12px; }

/* ===== 沟通记录 ===== */
.pm-comm-list { display: flex; flex-direction: column; gap: 10px; }
.pm-comm {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--row-bg);
}
.pm-comm-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.pm-comm-h .t { font-weight: 600; font-size: 13.5px; }
.pm-comm-h .time { color: var(--muted); font-size: 12px; }
.pm-comm-h .pm-right { margin-left: auto; display: flex; gap: 6px; }
.pm-comm-body { font-size: 13px; color: #c9d1d9; white-space: pre-wrap; }
.pm-comm-foot { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.pm-comm-foot b { color: #e3b341; font-weight: 500; }

/* ===== 附件 ===== */
.pm-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pm-file {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel2);
    display: flex; flex-direction: column;
}
.pm-file .thumb {
    height: 96px;
    display: flex; align-items: center; justify-content: center;
    background: #0a0e14;
    overflow: hidden;
}
.pm-file .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-file .thumb .ext { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .5px; }
.pm-file .meta { padding: 7px 9px; font-size: 12px; }
.pm-file .meta .nm {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--text);
}
.pm-file .meta .sz { color: var(--muted); font-size: 11px; }
.pm-file .ops { display: flex; gap: 6px; padding: 0 9px 8px; }

.pm-upload { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 12px; }
.pm-upload input[type="file"] { font-size: 12px; color: var(--muted); max-width: 260px; }

/* ===== 空状态 ===== */
.pm-empty {
    text-align: center;
    padding: 26px 10px;
    color: var(--muted);
    font-size: 13px;
    border: 1px dashed var(--line);
    border-radius: 10px;
}

/* ===== 新增沟通表单（默认收起，点「＋ 记录一次沟通」展开）===== */
.pm-comm-new {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}
.pm-comm-new.on { display: block; }

/* ===== 弹窗（阶段详情 / 编辑沟通记录）===== */
.pm-mask {
    position: fixed; inset: 0; z-index: 100;
    background: var(--modal-mask);
    display: none;
    align-items: flex-start; justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}
.pm-mask.on { display: flex; }
.pm-modal {
    width: 100%; max-width: 760px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 20px 60px var(--shadow);
}

/* 阶段详情弹窗：更宽、头部固定、内容区独立滚动 */
.pm-modal-lg {
    max-width: 1080px;
    max-height: calc(100vh - 80px);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pm-modal-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    position: sticky; top: 0; z-index: 2;
}
.pm-modal-head h3 { margin: 0; font-size: 16px; }
.pm-modal-head .pm-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pm-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 20px 20px;
}
/* 弹窗内的卡片去掉外框，避免“卡片套卡片” */
.pm-modal-body .pm-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 18px;
    box-shadow: none;
}
.pm-modal-body .pm-card + .pm-card {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

/* ===== 被「智云HUB」壳层用 iframe 嵌入时 =====
   壳层已有自己的顶栏，这里隐藏本站顶栏与页脚，避免出现两条导航。 */
body.pm-embedded .pm-top { display: none; }
body.pm-embedded .pm-main { padding-top: 14px; }
body.pm-embedded .pm-foot { display: none; }

/* ===== 响应式 ===== */
/* 平板 / 窄窗口 */
@media (max-width: 900px) {
    .pm-stats { grid-template-columns: repeat(2, 1fr); }
    .pm-grid { grid-template-columns: 1fr; }
    .pm-grid.c2 { grid-template-columns: 1fr; }
    .pm-summary-side { flex: 1 1 100%; }
    .pm-top-inner { flex-wrap: wrap; gap: 10px; }
    .pm-nav { order: 3; width: 100%; overflow-x: auto; }
    .pm-filter input[type="text"] { width: 100%; }
    .pm-skins { margin-left: 0; }
}

/* 手机 */
@media (max-width: 640px) {
    /* 顶栏紧凑 */
    .pm-top-inner { padding: 8px 12px; gap: 8px; }
    .pm-brand { font-size: 13px; }
    .pm-logo { width: 22px; height: 22px; font-size: 12px; }
    .pm-nav a { padding: 5px 9px; font-size: 12.5px; }
    .pm-user-label { display: none; }
    .pm-user input { width: 66px; }

    .pm-main { padding: 12px; }
    .pm-foot { padding: 16px 12px 24px; }

    /* 卡片 / 统计 */
    .pm-card { padding: 13px; border-radius: 10px; margin-bottom: 12px; }
    .pm-stat { padding: 10px 12px; border-radius: 10px; }
    .pm-stat .n { font-size: 18px; }
    .pm-stat .t { font-size: 11px; }

    /* 项目概要 */
    .pm-summary-title h1 { font-size: 17px; }
    .pm-summary-meta { gap: 10px; font-size: 12px; }
    .pm-summary-desc { font-size: 12.5px; }

    /* 流程图节点收窄，减少横向滚动 */
    .pm-flow-node { width: 82px; }
    .pm-dot { width: 32px; height: 32px; font-size: 11px; }
    .pm-flow-node:not(:last-child)::after {
        top: 16px;
        left: calc(50% + 17px);
        width: calc(100% - 34px);
    }
    .pm-flow-node .nm { font-size: 11px; }
    .pm-flow-node .st { font-size: 10px; }

    /* 表格压缩（外层已有横向滚动容器） */
    .pm-table { font-size: 12.5px; }
    .pm-table th, .pm-table td { padding: 8px; }

    /* 表单：16px 字号避免 iOS 聚焦自动放大页面 */
    .pm-field input, .pm-field select, .pm-field textarea,
    .pm-filter input, .pm-filter select, .pm-user input { font-size: 16px; }
    .pm-field label { font-size: 12.5px; }

    .pm-actions { gap: 8px; }
    .pm-actions .pm-btn { flex: 1 1 100%; }

    /* 附件两列 */
    .pm-files { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* 弹窗铺满全屏：手机上按钮更好点，内容区更高 */
    .pm-mask { padding: 0; align-items: stretch; }
    .pm-modal { max-width: 100%; border-radius: 0; }
    .pm-modal-lg { height: 100vh; max-height: 100vh; }
    .pm-modal-head { padding: 12px 14px; }
    .pm-modal-body { padding: 12px 14px 24px; }

    .pm-toast { font-size: 14px; padding: 12px 16px; }
}
