:root {
    --page-bg-top: #f6fbff;
    --page-bg-mid: #eef5fb;
    --page-bg-bottom: #f7f2e7;
    --panel-bg: rgba(255, 255, 255, 0.84);
    --panel-border: rgba(203, 218, 232, 0.72);
    --text: #223142;
    --muted: #667789;
    --brand: #1f78ff;
    --brand-soft: #e7f1ff;
    --accent: #ffb54d;
    --good: #187d67;
    --warning: #d6891e;
    --bad: #d65442;
    --missing: #9aa7b5;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 48px rgba(31, 74, 123, 0.12);
}

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

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at left top, rgba(255, 216, 145, 0.46), transparent 28%),
        radial-gradient(circle at right top, rgba(119, 193, 255, 0.28), transparent 32%),
        linear-gradient(180deg, var(--page-bg-top) 0%, var(--page-bg-mid) 44%, var(--page-bg-bottom) 100%);
}

a {
    color: inherit;
}

.page-shell {
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.hero-copy h1 {
    margin: 6px 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #6f8aa6;
}

.subtitle {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.page-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.page-nav-head {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.page-nav-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6f8aa6;
}

.page-nav-hint {
    max-width: 320px;
    font-size: 12px;
    line-height: 1.45;
    text-align: right;
    color: var(--muted);
}

.page-nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nav-link,
.lang-btn,
.primary-btn,
select {
    transition: 0.2s ease;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(31, 120, 255, 0.16);
    background: rgba(255, 255, 255, 0.74);
    color: #29517e;
    text-decoration: none;
    font-weight: 600;
}

.nav-link:hover,
.lang-btn:hover,
.primary-btn:hover {
    transform: translateY(-1px);
}

.nav-link.is-current {
    border-color: rgba(31, 120, 255, 0.24);
    background: linear-gradient(180deg, #eef5ff 0%, #dfecff 100%);
    color: #1f5fb8;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.lang-switcher {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(203, 218, 232, 0.78);
}

.lang-btn {
    min-width: 54px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 700;
}

.lang-btn.active {
    background: linear-gradient(135deg, #e8f2ff, #d6e6ff);
    color: #184f96;
    box-shadow: inset 0 0 0 1px rgba(99, 146, 214, 0.36);
}

.app-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.sidebar,
.content {
    min-width: 0;
}

.content {
    display: grid;
    gap: 16px;
}

.panel {
    position: relative;
    padding: 20px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 250, 253, 0.78)),
        var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.52), transparent 30%),
        radial-gradient(circle at 0% 100%, rgba(191, 224, 255, 0.22), transparent 28%);
}

.panel > * {
    position: relative;
    z-index: 1;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.panel-header h2,
.section-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.panel-note,
.section-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.field {
    display: block;
    margin-top: 14px;
}

.field span {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #486173;
}

select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(190, 205, 220, 0.92);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    font-size: 14px;
}

select:focus,
.primary-btn:focus,
.drop-zone:focus {
    outline: 2px solid rgba(31, 120, 255, 0.26);
    outline-offset: 2px;
}

.drop-zone {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(108, 150, 201, 0.54);
    background:
        linear-gradient(180deg, rgba(239, 246, 255, 0.9), rgba(250, 252, 255, 0.9));
    cursor: pointer;
}

.drop-zone.is-dragover {
    border-color: rgba(31, 120, 255, 0.68);
    box-shadow: inset 0 0 0 1px rgba(31, 120, 255, 0.18);
    background: linear-gradient(180deg, rgba(232, 243, 255, 0.96), rgba(245, 250, 255, 0.96));
}

.drop-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff4d9, #ffe5a7);
    font-size: 28px;
}

.primary-btn {
    min-width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #1f78ff, #4fa2ff);
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(31, 120, 255, 0.24);
}

.drop-hint {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.file-pill {
    margin: 0;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #34597f;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.info-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.info-list div {
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(219, 228, 236, 0.88);
}

.info-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.info-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.info-list dd {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 56px 24px;
    text-align: center;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(203, 218, 232, 0.72);
    box-shadow: var(--shadow);
}

.empty-sun {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(145deg, #fff1c7, #ffd98d);
    font-size: 34px;
}

.empty-state h2 {
    margin: 0;
    font-size: 24px;
}

.empty-state p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-card {
    position: relative;
    padding: 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 252, 255, 0.84));
    border: 1px solid rgba(208, 219, 230, 0.8);
    box-shadow: 0 12px 30px rgba(31, 74, 123, 0.08);
}

.metric-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: var(--missing);
}

.metric-card.good::before {
    background: var(--good);
}

.metric-card.warning::before {
    background: var(--warning);
}

.metric-card.bad::before {
    background: var(--bad);
}

.metric-label {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.metric-value {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.metric-note {
    margin: 10px 0 0;
    color: #50657b;
    font-size: 12px;
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.chart-panel,
.detail-panel {
    min-width: 0;
}

.chart-scroll {
    overflow-x: auto;
}

.trend-svg {
    display: block;
    width: 100%;
    min-width: 620px;
}

.trend-svg text {
    font-family: inherit;
    fill: #5a6f84;
}

.trend-svg .grid-line {
    stroke: rgba(181, 196, 211, 0.72);
    stroke-width: 1;
}

.trend-svg .axis-line {
    stroke: rgba(136, 156, 176, 0.82);
    stroke-width: 1.25;
}

.trend-svg .bar.good {
    fill: #1f8b73;
}

.trend-svg .bar.warning {
    fill: #e09a2a;
}

.trend-svg .bar.bad {
    fill: #dc664d;
}

.trend-svg .bar.missing {
    fill: #b4bfc9;
}

.trend-svg .standard-line {
    stroke: rgba(36, 72, 112, 0.88);
    stroke-width: 1.8;
    stroke-dasharray: 8 6;
}

.trend-svg .value-text {
    font-size: 12px;
    font-weight: 700;
}

.trend-svg .label-text {
    font-size: 12px;
}

.trend-svg .standard-text {
    font-size: 12px;
    font-weight: 700;
}

.content-split {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 16px;
}

.bar-list {
    display: grid;
    gap: 12px;
}

.bar-row {
    padding: 12px;
    border-radius: 16px;
    background: rgba(246, 249, 252, 0.84);
    border: 1px solid rgba(220, 228, 236, 0.85);
}

.bar-row.is-selected {
    background: linear-gradient(180deg, rgba(232, 243, 255, 0.96), rgba(246, 250, 255, 0.92));
    border-color: rgba(122, 164, 216, 0.76);
}

.bar-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.bar-row-title {
    font-weight: 700;
    font-size: 14px;
}

.bar-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(212, 221, 229, 0.72);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
}

.bar-fill.good {
    background: linear-gradient(90deg, #1b8b74, #3ebc9c);
}

.bar-fill.warning {
    background: linear-gradient(90deg, #e09a2a, #f5c060);
}

.bar-fill.bad {
    background: linear-gradient(90deg, #d45c49, #ee907a);
}

.bar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.status-badge.good {
    background: var(--good);
}

.status-badge.warning {
    background: var(--warning);
}

.status-badge.bad {
    background: var(--bad);
}

.status-badge.missing {
    background: var(--missing);
}

.detail-grid {
    display: grid;
    gap: 12px;
    margin: 0;
}

.detail-grid div {
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(219, 228, 236, 0.82);
}

.detail-grid div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-grid dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.detail-grid dd {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 540px;
}

thead th {
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(219, 228, 236, 0.92);
    color: var(--muted);
    text-align: left;
    font-size: 12px;
    font-weight: 700;
}

tbody td {
    padding: 12px 0;
    border-bottom: 1px solid rgba(236, 241, 245, 0.9);
    font-size: 14px;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.table-empty {
    color: var(--muted);
    text-align: center;
}

.panel-empty {
    margin: 0;
    padding: 18px;
    border-radius: 16px;
    background: rgba(247, 249, 251, 0.88);
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1180px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .page-shell {
        padding: 20px;
    }

    .topbar {
        flex-direction: column;
    }

    .top-actions {
        justify-content: flex-start;
    }

    .page-nav,
    .page-nav-head {
        align-items: flex-start;
    }

    .page-nav-hint {
        text-align: left;
    }

    .page-nav-links {
        justify-content: flex-start;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 14px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 16px;
        border-radius: 20px;
    }

    .drop-zone {
        padding: 16px;
    }
}
