/* ============ EHS软件（第二十三应用 · 权限同图库） ============ */

/* 电脑端页面容器与巡检助手对齐（阅读型窄壳 --content-max 居中） */
.software-page { max-width: var(--content-max); margin-inline: auto; }

/* 页头渐变 */
.tool-hero.is-software { background: linear-gradient(135deg, #0e7490 0%, #155e75 60%, #0c4a5f 100%); }
.tool-hero.is-software .tool-hero-ico { color: #a5f3fc; }

/* 分类 chips：整组水平居中；窄屏放不下时自动换行居中（不滚动、不裁切） */
.sw-chips { display: flex; }
.sw-chips-row { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-inline: auto; padding: 14px 16px 6px; }
/* PC 端导航条居左（手机端保持居中） */
@media (min-width: 760px) { .sw-chips-row { margin-inline: 0; justify-content: flex-start; } }
.sw-chip { flex: 0 0 auto; white-space: nowrap; padding: 7px 16px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: 13px; cursor: pointer; transition: all .18s; }
.sw-chip:hover { border-color: #67c3d8; color: #0e7490; }
.sw-chip.on { background: #0e7490; border-color: #0e7490; color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(14, 116, 144, .28); }
.sw-chip:active { transform: scale(.96); }

/* 卡片流 */
.sw-feed { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px 16px 20px; }
@media (min-width: 760px) { .sw-feed { grid-template-columns: repeat(2, 1fr); } }
.sw-card { position: relative; display: flex; flex-direction: column; text-align: left; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; overflow: hidden; cursor: pointer; padding: 0; transition: transform .16s, box-shadow .16s; }
.sw-card:active { transform: scale(.98); }
.sw-card:hover { box-shadow: 0 8px 22px rgba(14, 116, 144, .18); transform: translateY(-2px); }
.sw-card-cover { display: block; width: 100%; aspect-ratio: 16 / 10; background: linear-gradient(160deg, #f1f5f9, #e2e8f0); overflow: hidden; }
.sw-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-card-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #94a3b8; }
.sw-card-ph svg { width: 42px; height: 42px; }
.sw-card-main { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.sw-card-cat { font-style: normal; font-size: 11px; color: #0e7490; background: #ecfeff; border-radius: 6px; padding: 2px 7px; width: fit-content; }
.sw-card-title { font-size: 14.5px; color: #0f172a; line-height: 1.3; }
.sw-card-sum { font-size: 12px; color: #64748b; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw-card-foot { display: flex; gap: 10px; font-style: normal; font-size: 11px; color: #94a3b8; margin-top: 2px; }
.sw-card-go { position: absolute; right: 10px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: rgba(15, 23, 42, .45); color: #fff; display: flex; align-items: center; justify-content: center; }
.sw-card-go svg { width: 13px; height: 13px; }

/* 空态 / 底部说明 */
.sw-empty { grid-column: 1 / -1; text-align: center; color: #94a3b8; font-size: 13.5px; padding: 56px 0 64px; }
.sw-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: #94a3b8; font-size: 12px; padding: 4px 16px 28px; }
.sw-note svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* ============ 详情弹层（挂 #overlay） ============ */
.sw-viewer { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: #f1f5f9; animation: swIn .22s ease; }
@keyframes swIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.sw-v-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border-bottom: 1px solid #e2e8f0; box-shadow: 0 1px 4px rgba(15, 23, 42, .04); position: relative; z-index: 2; }
.sw-v-back { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: none; background: #f1f5f9; color: #334155; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sw-v-back svg { width: 17px; height: 17px; }
.sw-v-t { font-size: 15px; font-weight: 600; color: #0f172a; }
.sw-v-cat { font-style: normal; font-size: 11px; color: #0e7490; }
.sw-v-title { font-size: 16px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-v-ver { margin-left: auto; flex: 0 0 auto; font-size: 12px; color: #0e7490; background: #ecfeff; border-radius: 8px; padding: 3px 9px; }

.sw-v-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sw-v-wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 14px; }
.sw-v-hero { position: relative; overflow: hidden; border-radius: 18px; padding: 18px 18px 16px; color: #fff; background: linear-gradient(135deg, #0e7490, #155e75); box-shadow: 0 10px 24px rgba(14, 116, 144, .22); }
.sw-v-hero::after { content: ''; position: absolute; right: -46px; top: -46px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.sw-v-hrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sw-v-hcat { font-style: normal; font-size: 12px; color: #fff; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 3px 11px; }
.sw-v-hver { font-size: 12px; color: #a5f3fc; background: rgba(8, 51, 68, .4); border-radius: 999px; padding: 3px 11px; }
.sw-v-htitle { display: block; font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.sw-v-hero .sw-v-meta { gap: 8px; }
.sw-v-hero .sw-mi { background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
.sw-v-hero .sw-mi i { color: rgba(255, 255, 255, .72); }
.sw-v-stage { position: relative; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 8px; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.sw-v-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.sw-v-loading { color: #94a3b8; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sw-v-loading i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #e2e8f0; border-top-color: #0e7490; animation: swSpin 1s linear infinite; }
@keyframes swSpin { to { transform: rotate(360deg); } }
.sw-v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(14, 116, 144, .82); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(14, 116, 144, .35); }
.sw-v-nav.left { left: 12px; }
.sw-v-nav.right { right: 12px; }
.sw-v-nav:active { background: rgba(21, 94, 117, .95); }
.sw-v-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.sw-v-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(15, 23, 42, .22); box-shadow: 0 1px 2px rgba(255, 255, 255, .6); }
.sw-v-dots i.on { background: #0e7490; width: 16px; border-radius: 3px; }

.sw-v-info { display: flex; flex-direction: column; gap: 12px; }
.sw-v-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-mi { font-size: 12px; color: #475569; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 5px 10px; }
.sw-mi i { font-style: normal; color: #94a3b8; margin-right: 4px; }
.sw-v-sec { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; }
.sw-sec-t { display: block; font-style: normal; font-size: 13px; font-weight: 700; color: #0e7490; margin-bottom: 7px; }
.sw-sec-p { margin: 0; font-size: 13.5px; color: #334155; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.sw-sec-pre { margin: 0; font-family: inherit; font-size: 13.5px; color: #334155; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }

.sw-v-bar { flex: 0 0 auto; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e2e8f0; }
.sw-v-bar-in { max-width: 760px; margin: 0 auto; }
.sw-v-dltip { margin-top: 8px; text-align: center; font-size: 12px; color: #94a3b8; }
.sw-v-dl { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 0; border: none; border-radius: 12px; background: linear-gradient(135deg, #0e7490, #155e75); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform .14s, opacity .14s; }
.sw-v-dl:active { transform: scale(.98); }
.sw-v-dl:disabled { opacity: .5; cursor: not-allowed; }
.sw-v-dl svg { width: 17px; height: 17px; }
