/* ===================== 基础与主题变量 ===================== */
:root {
    --ink: #16324e;
    --muted: #5d7d9a;
    --blue: #2f7cc4;
    --blue-deep: #1b5fa8;
    --blue-light: #6bb8f0;
    --line: rgba(120, 170, 220, 0.26);
    --danger: #d93b3b;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    /* 多层浅蓝渐变叠出通透底色 */
    background:
        radial-gradient(1100px 680px at 10% -6%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
        radial-gradient(900px 620px at 92% 4%, #d9edff 0%, rgba(217, 237, 255, 0) 62%),
        linear-gradient(160deg, #eaf5ff 0%, #dceeff 46%, #f3f9ff 100%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

/* PC 端固定 1920x1080 画布，缩放与居中由 JS 控制 */
#screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    padding: 26px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform-origin: top left;
}

/* ===================== 玻璃拟态通用样式 ===================== */
.glass {
    position: relative;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.46));
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    box-shadow:
        0 18px 40px rgba(47, 124, 204, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
}

/* 卡片顶部一道蓝色高光 */
.glass::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(107, 184, 240, 0), rgba(70, 150, 220, 0.75), rgba(107, 184, 240, 0));
}

/* ===================== 顶栏 ===================== */
.topbar {
    display: flex;
    gap: 18px;
    height: 182px;
    flex: none;
}

.brand {
    width: 396px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 6px;
}

.brand-mark {
    width: 62px;
    height: 62px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    background: linear-gradient(140deg, #2f7cc4, #6bb8f0);
    box-shadow: 0 10px 22px rgba(47, 124, 204, 0.32);
}

.brand-text h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 1px;
    white-space: nowrap;
    background: linear-gradient(120deg, #14548f, #3f9ee0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text p {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 2px;
}

/* 标准总数卡片 */
.stat-card {
    width: 258px;
    flex: none;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.stat-label {
    font-size: 15px;
    color: var(--muted);
    letter-spacing: 1px;
}

.stat-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.stat-value {
    /* 52px 时 140,812 会撑出卡片边界，缩到 38px 正好落在卡片内与表格左边线对齐 */
    font-size: 38px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(120deg, #14548f, #4aa8ea);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-unit {
    font-size: 16px;
    color: var(--muted);
}

/* 搜索框 */
.search-box {
    flex: 1;
    height: 82px;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    border-radius: 41px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.search-box:focus-within {
    border-color: rgba(74, 168, 234, 0.85);
    box-shadow:
        0 18px 40px rgba(47, 124, 204, 0.18),
        0 0 0 4px rgba(107, 184, 240, 0.22);
}

.search-icon {
    width: 24px;
    height: 24px;
    flex: none;
    fill: none;
    stroke: var(--blue);
    stroke-width: 2;
    stroke-linecap: round;
}

.search-box input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    color: var(--ink);
    letter-spacing: 0.5px;
}

.search-box input::placeholder {
    color: #9db9d2;
}

.clear-btn {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    background: rgba(107, 184, 240, 0.18);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, background 0.2s, transform 0.2s;
}

/* 有内容时才显示清空按钮 */
.search-box.has-value .clear-btn {
    opacity: 1;
    pointer-events: auto;
}

.clear-btn:hover {
    background: rgba(107, 184, 240, 0.34);
    transform: rotate(90deg);
}

.clear-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--blue-deep);
    stroke-width: 2;
    stroke-linecap: round;
}

/* 状态分布图卡片 */
.chart-card {
    width: 470px;
    flex: none;
    padding: 14px 18px 8px;
    display: flex;
    flex-direction: column;
}

.chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 6px;
}

.chart-title {
    font-size: 15px;
    letter-spacing: 1px;
    color: var(--blue-deep);
    font-weight: 600;
}

.chart-tip {
    font-size: 12px;
    color: var(--muted);
}

.status-chart {
    flex: 1;
    min-height: 0;
}

/* ===================== 工具栏（状态筛选） ===================== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 52px;
    flex: none;
}

.chips {
    display: flex;
    gap: 10px;
}

.chip {
    height: 40px;
    padding: 0 22px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.62);
    color: var(--muted);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.22s;
    backdrop-filter: blur(10px);
}

.chip:hover {
    color: var(--blue-deep);
    border-color: rgba(107, 184, 240, 0.75);
    transform: translateY(-1px);
}

.chip.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #2f7cc4, #6bb8f0);
    box-shadow: 0 8px 18px rgba(47, 124, 204, 0.3);
}

.result-hint {
    font-size: 14px;
    color: var(--muted);
}

.result-hint b {
    font-size: 18px;
    color: var(--blue-deep);
    font-variant-numeric: tabular-nums;
    margin: 0 2px;
}

.result-key {
    margin-left: 8px;
    color: #7fa2c0;
}

/* ===================== 表格 ===================== */
.table-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 表头与行共用一套列宽，保证上下对齐 */
.table-head,
.row {
    display: grid;
    grid-template-columns: 300px 1fr 150px 130px;
    align-items: center;
    gap: 20px;
    padding: 0 30px;
}

.table-head {
    height: 58px;
    flex: none;
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--blue-deep);
    font-weight: 600;
    background: linear-gradient(90deg, rgba(214, 236, 255, 0.75), rgba(236, 246, 255, 0.35));
    border-bottom: 1px solid var(--line);
}

.table-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.row {
    height: 52px;
    border-bottom: 1px solid rgba(140, 185, 225, 0.16);
    font-size: 15px;
    color: #274b6b;
    transition: background 0.18s;
    animation: rowIn 0.32s ease both;
}

.row:hover {
    background: rgba(107, 184, 240, 0.12);
}

/* 失效标准整行标红 */
.row.invalid {
    background: linear-gradient(90deg, rgba(238, 86, 86, 0.13), rgba(238, 86, 86, 0.05));
    color: #c0392b;
    box-shadow: inset 3px 0 0 #e24b4b;
}

.row.invalid:hover {
    background: linear-gradient(90deg, rgba(238, 86, 86, 0.2), rgba(238, 86, 86, 0.08));
}

.cell-no,
.cell-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 实施日期：等宽数字，保证多行日期左右对齐 */
.cell-date {
    font-size: 14px;
    color: #4a6a88;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
}

.row.invalid .cell-date {
    color: #c56a60;
}

.cell-no {
    font-family: Consolas, "Courier New", monospace;
    font-size: 15px;
    letter-spacing: 0.4px;
}

.row .cell-no {
    color: #1d5f9e;
}

.row.invalid .cell-no {
    color: #b03434;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 74px;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 13px;
    letter-spacing: 1px;
    color: #1b6fb8;
    background: rgba(107, 184, 240, 0.18);
    border: 1px solid rgba(107, 184, 240, 0.45);
}

.status-pill.invalid {
    color: #c0392b;
    background: rgba(238, 86, 86, 0.14);
    border-color: rgba(226, 75, 75, 0.5);
}

.empty-tip {
    height: 100%;
    display: grid;
    place-items: center;
    color: #8fa9c2;
    font-size: 16px;
    letter-spacing: 1px;
}

@keyframes rowIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================== 翻页 ===================== */
.pager {
    height: 74px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0 30px;
    border-top: 1px solid var(--line);
}

.page-info {
    margin-right: auto;
    font-size: 14px;
    color: var(--muted);
}

.page-info b {
    color: var(--blue-deep);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.pager-btn {
    height: 38px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 19px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.7);
    color: var(--blue-deep);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.22s;
}

.pager-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2f7cc4, #6bb8f0);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(47, 124, 204, 0.28);
}

.pager-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pager-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 点击时箭头滑动淡出再出现，形成"切换"动感 */
.icon-pop-left {
    animation: popLeft 0.36s ease;
}

.icon-pop-right {
    animation: popRight 0.36s ease;
}

@keyframes popLeft {
    0% { transform: translateX(0); opacity: 1; }
    45% { transform: translateX(-7px); opacity: 0; }
    46% { transform: translateX(7px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes popRight {
    0% { transform: translateX(0); opacity: 1; }
    45% { transform: translateX(7px); opacity: 0; }
    46% { transform: translateX(-7px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-dot {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.6);
    color: var(--muted);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.page-dot:hover {
    color: var(--blue-deep);
    border-color: rgba(107, 184, 240, 0.8);
}

.page-dot.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #2f7cc4, #6bb8f0);
    box-shadow: 0 8px 16px rgba(47, 124, 204, 0.28);
}

/* ===================== 手机端适配 ===================== */
@media (max-width: 900px) {
    body {
        overflow: auto;
    }

    #screen {
        position: static;
        width: 100%;
        height: auto;
        padding: 14px 12px 24px;
        gap: 12px;
        transform: none !important;
    }

    .topbar {
        height: auto;
        flex-direction: column;
        gap: 12px;
    }

    .brand,
    .stat-card,
    .chart-card {
        width: 100%;
    }

    .brand {
        padding: 4px 2px;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
        font-size: 17px;
        border-radius: 12px;
    }

    .brand-text h1 {
        font-size: 20px;
    }

    .brand-text p {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .stat-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
    }

    .stat-value {
        font-size: 34px;
    }

    .search-box {
        height: 56px;
        border-radius: 28px;
        padding: 0 16px;
    }

    .search-box input {
        font-size: 15px;
    }

    .chart-card {
        height: 190px;
        padding: 12px 14px 4px;
    }

    .toolbar {
        height: auto;
        flex-wrap: wrap;
        gap: 10px;
    }

    .chips {
        flex-wrap: wrap;
        gap: 8px;
    }

    .chip {
        height: 34px;
        padding: 0 16px;
        font-size: 13px;
    }

    .table-panel {
        flex: none;
    }

    .table-head,
    .row {
        grid-template-columns: 100px 1fr 58px 50px;
        gap: 8px;
        padding: 0 12px;
    }

    .table-head {
        height: 46px;
        font-size: 12px;
        letter-spacing: 0;
    }

    .row {
        height: 58px;
        font-size: 13px;
    }

    .cell-no {
        font-size: 12px;
        letter-spacing: 0;
    }

    .cell-date {
        font-size: 10px;
        letter-spacing: 0;
    }

    .status-pill {
        min-width: 0;
        padding: 0 8px;
        height: 24px;
        font-size: 11px;
        letter-spacing: 0;
    }

    .pager {
        height: auto;
        padding: 12px 14px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .page-info {
        width: 100%;
        margin-right: 0;
        text-align: center;
    }

    .pager-btn span {
        display: none;
    }

    .pager-btn {
        padding: 0 12px;
    }

    .page-dot {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }
}
