:root {
    --bg: #ebe6dc;
    --bg-deep: #ddd5c7;
    --panel: rgba(252, 250, 246, 0.94);
    --panel-soft: rgba(248, 244, 236, 0.92);
    --panel-strong: #fffdf8;
    --ink: #1a1f1d;
    --muted: #66706b;
    --line: rgba(20, 28, 25, 0.1);
    --line-strong: rgba(20, 28, 25, 0.18);
    --accent: #165f52;
    --accent-2: #b56d2d;
    --accent-soft: rgba(22, 95, 82, 0.08);
    --danger-soft: rgba(181, 109, 45, 0.08);
    --shadow: 0 18px 48px rgba(33, 28, 20, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(22, 95, 82, 0.12), transparent 26%),
        radial-gradient(circle at bottom right, rgba(181, 109, 45, 0.1), transparent 24%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

button,
input,
select,
textarea {
    font: inherit;
}

.page-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100vh;
    padding: 28px 22px;
    background: rgba(246, 240, 231, 0.8);
    border-right: 1px solid rgba(20, 28, 25, 0.08);
    backdrop-filter: blur(14px);
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.sidebar h1,
.panel h2,
.panel h3,
.panel h4 {
    margin: 0;
    line-height: 1.08;
}

.sidebar h1 {
    font-size: 30px;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.sidebar-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
    font-size: 14px;
}

.nav-grid {
    display: grid;
    gap: 10px;
}

.nav-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    color: var(--ink);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(20, 28, 25, 0.08);
    border-radius: 16px;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(22, 95, 82, 0.22);
    box-shadow: 0 10px 22px rgba(33, 28, 20, 0.07);
}

.nav-link.is-active {
    background: linear-gradient(135deg, rgba(22, 95, 82, 0.12), rgba(255, 255, 255, 0.9));
    border-color: rgba(22, 95, 82, 0.24);
    box-shadow: 0 14px 28px rgba(22, 95, 82, 0.1);
}

.nav-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(20, 28, 25, 0.08);
    border-radius: 12px;
}

.nav-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.nav-eyebrow {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav-label {
    font-size: 15px;
    line-height: 1.15;
    font-weight: 600;
}

.nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.nav-link:hover .nav-arrow,
.nav-link.is-active .nav-arrow {
    color: var(--accent);
    background: rgba(22, 95, 82, 0.08);
    transform: translate(1px, -1px);
}

.status-card {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(20, 28, 25, 0.08);
    box-shadow: var(--shadow);
}

.status-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.status-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 13px;
}

.status-good {
    background: rgba(224, 238, 233, 0.96);
}

.status-warn {
    background: rgba(253, 239, 223, 0.96);
}

.status-muted {
    background: rgba(255, 255, 255, 0.58);
}

.content {
    padding: 28px;
    display: grid;
    gap: 18px;
}

.panel {
    padding: 22px;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.panel-soft {
    background: var(--panel-soft);
}

.panel-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    background:
        linear-gradient(135deg, rgba(255, 253, 248, 0.95), rgba(230, 241, 237, 0.72)),
        var(--panel);
}

.panel-hero h2,
.page-intro h2 {
    font-size: 38px;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
}

.panel-hero p,
.page-intro p:last-child {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions,
.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.primary,
.secondary {
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 10px 22px rgba(22, 95, 82, 0.18);
}

.secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(20, 28, 25, 0.08);
}

.primary:hover,
.secondary:hover {
    transform: translateY(-1px);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--accent);
    text-decoration: none;
    background: rgba(22, 95, 82, 0.07);
    border: 1px solid rgba(22, 95, 82, 0.14);
    border-radius: 999px;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.text-link::after {
    content: "↗";
    font-size: 13px;
}

.text-link:hover {
    transform: translateY(-1px);
    background: rgba(22, 95, 82, 0.11);
    border-color: rgba(22, 95, 82, 0.2);
}

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

.stat-card {
    padding: 18px;
    border-radius: 20px;
    background: var(--panel-strong);
    border: 1px solid rgba(20, 28, 25, 0.06);
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 30px;
    letter-spacing: -0.03em;
}

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

.module-link {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    color: var(--ink);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(20, 28, 25, 0.08);
    border-radius: 18px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.module-link::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 0;
    width: 4px;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(180deg, var(--accent), rgba(22, 95, 82, 0.32));
    opacity: 0;
    transition: opacity 0.18s ease;
}

.module-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(22, 95, 82, 0.22);
    box-shadow: 0 14px 30px rgba(33, 28, 20, 0.08);
}

.module-link:hover::before {
    opacity: 1;
}

.module-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: rgba(246, 240, 231, 0.9);
    border: 1px solid rgba(20, 28, 25, 0.08);
}

.module-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.module-eyebrow {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.module-label {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.16;
}

.module-desc {
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

.module-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 14px;
    color: var(--muted);
    background: rgba(22, 95, 82, 0.06);
    border-radius: 999px;
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.module-link:hover .module-arrow {
    color: var(--accent);
    background: rgba(22, 95, 82, 0.1);
    transform: translate(1px, -1px);
}

.section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 18px;
}

.section-grid-balanced {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-head.compact {
    margin-bottom: 12px;
}

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

.form-grid label {
    display: grid;
    gap: 8px;
}

.form-grid span {
    font-size: 13px;
    color: var(--muted);
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 12px 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(20, 28, 25, 0.08);
    border-radius: 14px;
    outline: none;
}

.form-grid textarea {
    resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    border-color: rgba(22, 95, 82, 0.26);
    box-shadow: 0 0 0 4px rgba(22, 95, 82, 0.08);
}

.wide {
    grid-column: 1 / -1;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.checkbox-row input {
    width: auto;
}

.table-card {
    min-width: 0;
}

.table-wrap {
    overflow: auto;
    border: 1px solid rgba(20, 28, 25, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(20, 28, 25, 0.06);
    vertical-align: top;
}

th {
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--accent-soft);
}

.badge.badge-node {
    background: rgba(225, 230, 243, 0.92);
}

.badge.badge-pending {
    background: rgba(253, 237, 220, 0.95);
}

.badge.badge-done {
    background: rgba(224, 238, 233, 0.95);
}

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

.metric-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(20, 28, 25, 0.08);
}

.metric-card h4,
.metric-card p {
    margin: 0;
}

.metric-card h4 {
    margin-bottom: 10px;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.metric-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

.metric-list strong {
    color: var(--ink);
}

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

.quick-list p,
.quick-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.docs-panel {
    background:
        linear-gradient(135deg, rgba(255, 249, 241, 0.9), rgba(248, 242, 233, 0.96)),
        var(--panel);
}

.code-block {
    margin: 0;
    padding: 16px 18px;
    overflow: auto;
    color: #f5f2e9;
    background: #212825;
    border-radius: 18px;
}

.doc-list {
    margin: 0;
    padding-left: 18px;
    line-height: 1.9;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    min-width: 220px;
    max-width: 360px;
    padding: 14px 16px;
    color: #fff;
    background: rgba(26, 31, 29, 0.9);
    border-radius: 16px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1180px) {
    .page-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(20, 28, 25, 0.08);
    }

    .stats-grid,
    .monitor-grid,
    .section-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .content,
    .sidebar {
        padding: 18px;
    }

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

    .panel-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .panel-hero h2,
    .page-intro h2 {
        font-size: 30px;
    }

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

    .module-link,
    .nav-link {
        grid-template-columns: auto 1fr auto;
    }
}
