/* FXTL 改造：红黄绿、KPI、看板、移动端、打印 */
.jc-pill {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.jc-red { background: #fde2e1; color: #b42318; border: 1px solid #f5b5b0; }
.jc-yellow { background: #fff4d6; color: #8a5a00; border: 1px solid #f3d48a; }
.jc-green { background: #e3f6e8; color: #146c2e; border: 1px solid #b7e2c3; }
.jc-done { background: #eef0f3; color: #5b6573; border: 1px solid #d6dbe1; }

.jc-kpi {
    display: block;
    padding: .9rem 1rem;
    border: 1px solid #e6e8eb;
    border-radius: .5rem;
    background: #fff;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.jc-kpi:hover { border-color: #b9c2cc; color: inherit; }
.jc-kpi .n { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.jc-kpi .t { color: #6b7480; font-size: .85rem; }
.jc-kpi .s { color: #8a929c; font-size: .75rem; }

.jc-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .3rem; }
.jc-dot.red { background: #dc3545; }
.jc-dot.yellow { background: #f0ad00; }
.jc-dot.green { background: #198754; }

.jc-table td, .jc-table th { vertical-align: middle; }
.jc-muted { color: #6b7480; }
.jc-section { margin: 1.2rem 0 .5rem; font-weight: 700; }

/* 移动端 */
.jc-mobile-body { background: #f2f3f8; }
.jc-mobile-page { max-width: 560px; margin: 0 auto; min-height: 100vh; background: #f2f3f8; padding-bottom: 68px; }
/* 移动端标题栏：左返回 + 居中标题（没有右上角"PC 版"入口）。
   返回按钮做成"半透明描边圆形按钮"：白边 + 浅白底 + 按下缩放，比裸字符箭头更像现代 App。 */
.jc-mobile-top { position: sticky; top: 0; z-index: 20; background: #1f6feb; color: #fff;
    padding: .6rem .8rem; display: flex; align-items: center; gap: .55rem;
    box-shadow: 0 2px 6px rgba(16, 42, 92, .18); }
.jc-mobile-title { flex: 1; min-width: 0; text-align: center; font-weight: 600; font-size: 1rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-mobile-back {
    width: 32px; height: 32px; flex: none; padding: 0; display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
    transition: background-color .16s ease, border-color .16s ease, transform .1s ease;
    -webkit-tap-highlight-color: transparent;
}
.jc-mobile-back:hover { background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .85); }
.jc-mobile-back:active { transform: scale(.92); background: rgba(255, 255, 255, .38); }
.jc-mobile-back:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.jc-mobile-back svg { display: block; }
.jc-mobile-back--placeholder { visibility: hidden; border-color: transparent; background: none; box-shadow: none; cursor: default; }
.jc-mobile-content { padding: .8rem; }
.jc-mobile-card { background: #fff; border-radius: .6rem; padding: .8rem; margin-bottom: .7rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.jc-mobile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.jc-mobile-grid a, .jc-mobile-grid .it { background: #fff; border-radius: .6rem; padding: .9rem .4rem; text-align: center; text-decoration: none; color: #212529; box-shadow: 0 1px 3px rgba(0,0,0,.07); position: relative; }
.jc-mobile-grid .ico { font-size: 1.5rem; display: block; }
.jc-mobile-grid .lbl { font-size: .78rem; margin-top: .3rem; }
.jc-badge-count { position: absolute; top: .3rem; right: .4rem; background: #dc3545; color: #fff; border-radius: 999px; font-size: .68rem; padding: 0 .35rem; }
.jc-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid #e3e6ea; display: flex; max-width: 560px; margin: 0 auto; }
.jc-bottom-nav a { flex: 1; text-align: center; padding: .5rem 0 .55rem; color: #6b7480; text-decoration: none; font-size: .72rem; }
.jc-bottom-nav a .ico { display: block; font-size: 1.25rem; line-height: 1.2; }
.jc-bottom-nav a.active { color: #1f6feb; }
.jc-steps { display: flex; gap: .4rem; margin-bottom: .8rem; }
.jc-steps .st { flex: 1; text-align: center; font-size: .75rem; padding: .35rem; border-radius: .4rem; background: #e9edf3; color: #6b7480; }
.jc-steps .st.on { background: #1f6feb; color: #fff; }
.jc-photo { width: 100%; border-radius: .4rem; display: block; }
.jc-thumb { width: 84px; height: 84px; object-fit: cover; border-radius: .4rem; border: 1px solid #dfe3e8; }
.jc-btn-block { display: block; width: 100%; }

/* 打印：报告 1-2 页 */
@media print {
    .no-print, .sidebar, .topbar, footer, #blazor-error-ui { display: none !important; }
    .page { display: block !important; }
    .main, .content { margin: 0 !important; padding: 0 !important; }
    body { background: #fff !important; }
    .jc-report { box-shadow: none !important; border: 0 !important; }
    .jc-report table { page-break-inside: auto; }
    .jc-report tr { page-break-inside: avoid; }
}

/* 多维下钻树 */
.stat-table { border: 1px solid #e6e8eb; border-radius: .5rem; background: #fff; overflow: auto; }
.stat-header, .stat-row { display: flex; align-items: center; gap: .4rem; padding: .35rem .6rem; border-bottom: 1px solid #f0f2f4; }
.stat-header { background: #f7f8fa; font-size: .78rem; color: #6b7480; position: sticky; top: 0; z-index: 1; }
.stat-row:hover { background: #fafbfc; }
.stat-arrow { width: 1.5rem; padding: 0; text-decoration: none; flex: none; }
.stat-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; text-align: left; }
.stat-label:hover { color: #1f6feb; text-decoration: underline; }
.stat-count { width: 64px; text-align: right; color: #6b7480; font-size: .8rem; flex: none; }
.stat-popup-mask { position: fixed; inset: 0; z-index: 1040; background: transparent; }
.stat-popup { position: fixed; z-index: 1050; min-width: 180px; max-width: 320px; padding: .35rem; background: #fff;
    border: 1px solid #d8dce1; border-radius: .5rem; box-shadow: 0 8px 28px rgba(15, 23, 42, .18); }
.stat-popup-title { padding: .2rem .5rem .4rem; font-size: .75rem; color: #6b7480; border-bottom: 1px solid #f0f2f4; margin-bottom: .25rem; }
.stat-popup-item { display: block; width: 100%; text-align: left; padding: .35rem .5rem; border: 0; background: none;
    border-radius: .35rem; font-size: .86rem; color: #24292f; }
.stat-popup-item:hover { background: #eef4ff; color: #1f6feb; }
.stat-popup-cancel { display: block; width: 100%; text-align: left; padding: .3rem .5rem; margin-top: .2rem;
    border: 0; background: none; border-top: 1px solid #f0f2f4; font-size: .78rem; color: #6b7480; }
.stat-popup-cancel:hover { color: #c0392b; }
/* 一行最多 4 个维度：用 auto-fill + 上限宽度，1920 屏正好 4 组，窄屏自动 3/2/1 组，
   不会挤成横向滚动。每个输入框固定 90px。 */
.jc-dim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: .4rem 1rem; max-width: 1040px; }
@media (max-width: 700px) { .jc-dim-grid { grid-template-columns: 1fr; } }
.jc-dim-item { display: flex; align-items: center; gap: .3rem; min-width: 0; }
.jc-dim-label { width: 56px; flex: none; font-size: .78rem; color: #6b7480;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-dim-item .bsc-textinput { flex: none; }
.jc-dim-clear { width: 18px; height: 18px; line-height: 1; padding: 0; flex: none;
    border: 0; background: none; color: #9aa3ad; font-size: 1rem; border-radius: 50%; }
.jc-dim-clear:hover { color: #c0392b; background: #f6eaea; }
/* 桌面"移动端"页：手机外壳 + iframe（参考 SHFP Admin_Mobile 的做法）。
   宽高按 iPhone 逻辑尺寸 390×844 来，边框/圆角/刘海做装饰，iframe 里就是完整的移动版页面。 */
.jc-phone-stage { display: flex; flex-direction: column; align-items: center; padding: .4rem 0 1.2rem; }
.jc-phone { position: relative; width: 402px; padding: 14px 14px 22px; border-radius: 44px;
    background: linear-gradient(160deg, #2b3038, #14171c 60%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .28), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.jc-phone__notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 108px; height: 20px; border-radius: 0 0 14px 14px; background: #14171c; z-index: 2; }
.jc-phone__screen { position: relative; width: 374px; height: min(812px, calc(100vh - 250px)); min-height: 520px;
    border-radius: 32px; overflow: hidden; background: #f2f3f8; }
.jc-phone__screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.jc-phone__bar { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    width: 120px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .35); }
.jc-phone-tip { margin-top: .7rem; }
.stat-measure { width: 92px; text-align: right; font-variant-numeric: tabular-nums; flex: none; }
