* {
    box-sizing: border-box;
}

:root {
    --dashboard-bg: #f6f2ea;
    --dashboard-card: rgba(255, 255, 255, 0.9);
    --dashboard-card-strong: rgba(255, 255, 255, 0.96);
    --dashboard-line: rgba(36, 51, 64, 0.1);
    --dashboard-ink: #18242d;
    --dashboard-muted: #637583;
    --dashboard-accent: #43c7b8;
    --dashboard-accent-soft: rgba(67, 199, 184, 0.12);
    --dashboard-secondary: #82b7ff;
    --dashboard-warm: #ffc485;
    --dashboard-danger: #ff7f73;
    --dashboard-shadow: 0 30px 80px rgba(22, 32, 40, 0.12);
    --dashboard-radius-xl: 34px;
    --dashboard-radius-lg: 24px;
    --dashboard-radius-md: 18px;
    --dashboard-font-body: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --dashboard-font-display: "Baskerville", "STSong", "Songti SC", "Noto Serif CJK SC", serif;
}

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

body {
    font-family: var(--dashboard-font-body);
    color: var(--dashboard-ink);
    background:
        radial-gradient(circle at 12% 0%, rgba(67, 199, 184, 0.16), transparent 20%),
        radial-gradient(circle at 88% 0%, rgba(130, 183, 255, 0.16), transparent 18%),
        linear-gradient(180deg, #faf6ef 0%, #f3eee3 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.34) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.34) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38), transparent 90%);
    opacity: 0.32;
}

.dashboard-shell {
    width: min(1440px, calc(100vw - 32px));
    margin: 16px auto 42px;
    display: grid;
    gap: 18px;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 6px;
    color: var(--dashboard-muted);
    font-size: 0.92rem;
}

.dashboard-topbar a {
    color: inherit;
    text-decoration: none;
}

.dashboard-topbar a:hover {
    color: var(--dashboard-ink);
}

.dashboard-hero,
.dashboard-panel,
.visual-card,
.recommendation-card,
.kpi-card {
    position: relative;
    border-radius: var(--dashboard-radius-xl);
    border: 1px solid var(--dashboard-line);
    background: var(--dashboard-card);
    box-shadow: var(--dashboard-shadow);
    backdrop-filter: blur(16px);
    overflow: hidden;
}

.dashboard-hero::before,
.dashboard-panel::before,
.visual-card::before,
.recommendation-card::before,
.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(67, 199, 184, 0.18), rgba(130, 183, 255, 0.16));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 22px;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 246, 0.88)),
        linear-gradient(135deg, rgba(67, 199, 184, 0.08), rgba(130, 183, 255, 0.1));
}

.hero-copy {
    display: grid;
    gap: 14px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(67, 199, 184, 0.18);
    color: color-mix(in srgb, var(--dashboard-accent) 75%, #1f4c55 25%);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--dashboard-accent), var(--dashboard-secondary));
    box-shadow: 0 0 0 4px rgba(67, 199, 184, 0.12);
}

.hero-copy h1 {
    margin: 0;
    font-family: var(--dashboard-font-display);
    font-size: clamp(2.3rem, 4vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.hero-copy p {
    margin: 0;
    color: var(--dashboard-muted);
    line-height: 1.72;
    max-width: 780px;
}

.hero-meta,
.hero-stage-list,
.recommendation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(36, 51, 64, 0.08);
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--dashboard-muted);
}

.hero-aside {
    display: grid;
    gap: 14px;
    align-content: start;
}

.stage-card {
    padding: 20px;
    border-radius: var(--dashboard-radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 251, 250, 0.94));
    border: 1px solid rgba(36, 51, 64, 0.08);
}

.stage-card strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.stage-card p,
.hero-note p {
    margin: 10px 0 0;
    color: var(--dashboard-muted);
    line-height: 1.68;
}

.hero-note {
    padding: 18px 20px;
    border-radius: var(--dashboard-radius-lg);
    background: rgba(255, 255, 255, 0.82);
    border: 1px dashed rgba(67, 199, 184, 0.28);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.kpi-card {
    padding: 18px 18px 16px;
    border-radius: var(--dashboard-radius-lg);
    background: var(--dashboard-card-strong);
}

.kpi-card-label {
    color: var(--dashboard-muted);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.kpi-card-value {
    margin-top: 10px;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.kpi-card-meta {
    margin-top: 6px;
    color: var(--dashboard-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.kpi-card-delta {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--dashboard-accent-soft);
    color: color-mix(in srgb, var(--dashboard-accent) 80%, #1f4749 20%);
    font-size: 0.82rem;
    font-weight: 800;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
}

.dashboard-panel {
    padding: 24px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-head h2 {
    margin: 10px 0 0;
    font-family: var(--dashboard-font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.panel-head p {
    margin: 10px 0 0;
    color: var(--dashboard-muted);
    line-height: 1.72;
}

.progress-list,
.timeline-list,
.recommendation-grid,
.section-stack {
    display: grid;
    gap: 14px;
}

.progress-item {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(36, 51, 64, 0.07);
}

.progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.progress-head strong {
    font-size: 1rem;
}

.progress-head span {
    font-weight: 800;
    color: color-mix(in srgb, var(--dashboard-accent) 80%, #1f4f56 20%);
}

.progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(36, 51, 64, 0.08);
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--dashboard-accent) 0%, var(--dashboard-secondary) 100%);
}

.progress-note {
    color: var(--dashboard-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.timeline-item {
    position: relative;
    padding: 0 0 0 26px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: -18px;
    width: 2px;
    background: rgba(36, 51, 64, 0.1);
}

.timeline-item:last-child::before {
    bottom: 8px;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.95);
    background: rgba(36, 51, 64, 0.18);
    box-shadow: 0 0 0 5px rgba(67, 199, 184, 0.08);
}

.timeline-item.done .timeline-dot {
    background: var(--dashboard-accent);
}

.timeline-item.active .timeline-dot {
    background: var(--dashboard-secondary);
}

.timeline-item.upcoming .timeline-dot {
    background: var(--dashboard-warm);
}

.timeline-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(36, 51, 64, 0.08);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--dashboard-muted);
}

.timeline-item h3 {
    margin: 12px 0 6px;
    font-size: 1.08rem;
}

.timeline-item p {
    margin: 0;
    color: var(--dashboard-muted);
    line-height: 1.68;
}

.section-shell {
    display: grid;
    gap: 16px;
}

.section-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 2px 0;
}

.section-hero h2 {
    margin: 8px 0 0;
    font-family: var(--dashboard-font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-hero p {
    margin: 10px 0 0;
    color: var(--dashboard-muted);
    line-height: 1.72;
    max-width: 760px;
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.visual-card {
    padding: 20px;
    border-radius: var(--dashboard-radius-lg);
    background: var(--dashboard-card-strong);
}

.visual-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.visual-card p {
    margin: 10px 0 16px;
    color: var(--dashboard-muted);
    line-height: 1.65;
    min-height: 52px;
}

.chart-wrap {
    position: relative;
    min-height: 250px;
}

.chart-wrap canvas {
    width: 100% !important;
    height: 250px !important;
}

.gauge-wrap canvas {
    height: 220px !important;
}

.metric-list {
    display: grid;
    gap: 10px;
}

.metric-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    border-radius: 16px;
    background: rgba(245, 248, 250, 0.92);
    border: 1px solid rgba(36, 51, 64, 0.06);
}

.metric-item-label {
    color: var(--dashboard-muted);
    line-height: 1.5;
}

.metric-item-value {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tone-good .metric-item-value {
    color: color-mix(in srgb, var(--dashboard-accent) 82%, #1f4646 18%);
}

.tone-warning .metric-item-value {
    color: color-mix(in srgb, var(--dashboard-warm) 88%, #945824 12%);
}

.tone-neutral .metric-item-value {
    color: var(--dashboard-secondary);
}

.table-card {
    padding: 22px;
    border-radius: var(--dashboard-radius-lg);
    border: 1px solid var(--dashboard-line);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--dashboard-shadow);
    overflow: hidden;
}

.table-card h3 {
    margin: 0;
    font-size: 1.16rem;
}

.table-scroll {
    overflow-x: auto;
    margin-top: 16px;
}

.dashboard-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 14px 14px;
    border-bottom: 1px solid rgba(36, 51, 64, 0.08);
    text-align: left;
}

.dashboard-table th {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dashboard-muted);
}

.dashboard-table tr:last-child td {
    border-bottom: none;
}

.recommendation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recommendation-card {
    padding: 22px;
    border-radius: var(--dashboard-radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 254, 252, 0.92));
}

.recommendation-card h3 {
    margin: 0;
    font-size: 1.18rem;
}

.recommendation-card p {
    margin: 12px 0 14px;
    color: var(--dashboard-muted);
    line-height: 1.7;
}

.recommendation-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(245, 249, 251, 0.96);
    border: 1px solid rgba(36, 51, 64, 0.08);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--dashboard-muted);
}

.empty-chart {
    display: grid;
    place-items: center;
    min-height: 220px;
    text-align: center;
    color: var(--dashboard-muted);
    background: rgba(247, 249, 251, 0.86);
    border-radius: 18px;
    border: 1px dashed rgba(36, 51, 64, 0.12);
}

@media (max-width: 1220px) {
    .kpi-grid,
    .visual-grid,
    .recommendation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero,
    .overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-shell {
        width: min(100vw - 18px, 1440px);
        gap: 14px;
        margin: 10px auto 28px;
    }

    .dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .dashboard-hero,
    .dashboard-panel,
    .table-card,
    .visual-card,
    .recommendation-card,
    .kpi-card {
        padding: 18px;
        border-radius: 22px;
    }

    .kpi-grid,
    .visual-grid,
    .recommendation-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h1 {
        font-size: 2.2rem;
    }

    .panel-head,
    .section-hero {
        flex-direction: column;
    }
}
