:root {
    --bg: #f5f3ee;
    --panel: rgba(255, 255, 255, 0.98);
    --panel-strong: #ffffff;
    --line: #ece6dc;
    --text: #162031;
    --muted: #6b7285;
    --brand: #1f4b3d;
    --brand-strong: #173a2f;
    --brand-soft: #e8f0eb;
    --accent: #b77b4a;
    --danger: #bb5a44;
    --shadow: 0 16px 42px rgba(26, 33, 45, 0.06);
    --shadow-soft: 0 8px 18px rgba(26, 33, 45, 0.04);
    --radius: 20px;
    --radius-lg: 24px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(183, 123, 74, 0.08), transparent 18%),
        radial-gradient(circle at top right, rgba(31, 75, 61, 0.07), transparent 22%),
        linear-gradient(180deg, #f8f6f2 0%, #f5f3ee 100%),
        var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.text-link { color: var(--brand); font-weight: 700; }

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

.sidebar,
.guest-panel,
.project-card,
.stat-card {
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft);
}

.sidebar {
    padding: 20px 14px;
    background: rgba(255, 255, 255, 0.84);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand,
.guest-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand strong,
.guest-brand strong {
    display: block;
    font-size: 1.06rem;
    letter-spacing: 0.02em;
}

.brand span,
.guest-brand span,
.muted,
.helper-text,
.eyebrow,
.info-block span,
.list-row span,
.project-head p,
.project-meta span,
.sidebar-user span { color: var(--muted); }

.brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

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

.nav a {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid transparent;
    font-weight: 600;
}

.nav a.active {
    background: linear-gradient(135deg, var(--brand-strong), var(--brand));
    color: #fff;
    box-shadow: 0 12px 24px rgba(31, 75, 61, 0.16);
}

.card,
.project-card,
.stat-card,
.guest-panel,
.import-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.card,
.project-card,
.import-card { padding: 24px; }

.sidebar-user {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.sidebar-user-copy {
    display: grid;
    gap: 2px;
}

.sidebar-user-label {
    font-size: 0.78rem;
}

.content {
    padding: 18px 24px 28px;
}

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

.topbar-main {
    display: grid;
    gap: 6px;
}

.topbar-side {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: var(--muted);
    font-size: 0.88rem;
}

.topbar h1,
.project-card h2,
.card h2 {
    margin: 0;
    letter-spacing: -0.02em;
}

.page-content,
.stack-form,
.news-list { display: grid; gap: 18px; }

.page-frame {
    max-width: none;
    width: 100%;
}

.menu-toggle,
.link-button {
    background: none;
    border: none;
    color: var(--brand);
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.menu-toggle {
    display: none;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line);
}

.stats-grid,
.card-grid,
.content-grid,
.grid.two,
.page-actions { display: grid; gap: 18px; }

.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card {
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(252, 250, 246, 0.98));
}

.stat-card span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f3efe8;
    color: #756d63;
    font-size: 0.8rem;
}

.stat-card strong {
    font-size: 1.85rem;
    display: block;
    margin-top: 14px;
}

.content-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
}
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-actions { grid-template-columns: 1fr auto; align-items: center; }

.search-form { display: flex; gap: 12px; }

.search-form input,
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffdfa;
    color: var(--text);
    font: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.search-form input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(31, 75, 61, 0.32);
    box-shadow: 0 0 0 4px rgba(31, 75, 61, 0.08);
    background: #ffffff;
}

.field { display: grid; gap: 10px; }
.field small { color: var(--muted); }
.checkbox { display: flex; align-items: center; gap: 10px; }

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    background: linear-gradient(135deg, var(--brand-strong), var(--brand));
    color: #fff;
    box-shadow: 0 14px 24px rgba(31, 75, 61, 0.14);
}

.button.secondary {
    background: #edf3ef;
    color: var(--brand);
}

.button.ghost {
    background: transparent;
    border-color: var(--line);
}

.button.danger {
    background: rgba(187, 90, 68, 0.1);
    color: var(--danger);
}

.button.full { width: 100%; }

.form-actions,
.card-actions,
.section-head,
.news-head,
.list-row,
.project-head,
.project-meta,
.chip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.section-head { margin-bottom: 16px; }

.badge,
.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf4ef;
    color: var(--brand-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

.badge.success { background: rgba(23, 78, 61, 0.12); }
.badge.warning { background: rgba(200, 122, 53, 0.16); color: var(--accent); }

.alert {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 22px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert.success {
    background: rgba(23, 78, 61, 0.09);
    color: var(--brand);
    border-color: rgba(23, 78, 61, 0.1);
}

.alert.danger {
    background: rgba(190, 79, 56, 0.08);
    color: #7e2e1d;
    border-color: rgba(190, 79, 56, 0.1);
}

.alert ul { margin: 8px 0 0; padding-left: 18px; }

.project-card,
.news-card { display: grid; gap: 14px; }

.stack-list {
    display: grid;
    gap: 0;
}

.card,
.project-card,
.import-card,
.guest-panel {
    box-shadow: var(--shadow);
}

.list-row {
    padding: 16px 0;
    border-bottom: 1px solid #efe9df;
}

.list-row:last-child { border-bottom: none; }

.project-meta { justify-content: flex-start; }

.client-logo-box {
    width: 120px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.info-block strong {
    display: block;
    margin-top: 6px;
    font-size: 1.05rem;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
    background: #f4efe7;
    color: #735c43;
}

.guest-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.guest-panel {
    width: min(1120px, 100%);
    padding: 16px;
    background: rgba(255, 255, 255, 0.76);
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(360px, 0.9fr);
    gap: 16px;
}

.auth-aside {
    min-height: 560px;
    padding: 28px;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(25, 66, 54, 0.96), rgba(27, 51, 44, 0.92)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 24%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-aside .guest-brand span,
.auth-copy p {
    color: rgba(255, 255, 255, 0.78);
}

.auth-copy {
    display: grid;
    gap: 10px;
    max-width: 420px;
}

.auth-copy h1 {
    margin: 0;
    font-size: 2.15rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.auth-form {
    display: grid;
    align-content: center;
    gap: 16px;
    min-height: 560px;
    padding: 30px;
    background: rgba(255, 252, 248, 0.96);
}

.auth-form-head {
    display: grid;
    gap: 6px;
    margin-bottom: 6px;
}

.auth-form-head h2 {
    margin: 0;
    font-size: 1.7rem;
}

.auth-form-head p {
    margin: 0;
    color: var(--muted);
}

.report-preview { display: grid; gap: 18px; }
.report-section { background: rgba(255, 255, 255, 0.96); }

.news-card {
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
}

.news-head h3 { margin: 0; font-size: 1.05rem; }
.news-meta,
.empty { color: var(--muted); }

.error-panel {
    margin-top: 12px;
    border-top: 1px dashed var(--line);
    padding-top: 12px;
}

.error-panel ul { margin: 12px 0 0; padding-left: 18px; }

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.preview-link-panel {
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;
    background: #f7f5f0;
    border: 1px solid var(--line);
    display: grid;
    gap: 14px;
}

.preview-link-panel h3 {
    margin: 0;
    font-size: 1rem;
}

.copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
}

.copy-field input {
    width: 100%;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font: inherit;
}

.report-public-shell {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(63, 195, 227, 0.18), transparent 20%),
        radial-gradient(circle at top right, rgba(24, 144, 255, 0.14), transparent 18%),
        linear-gradient(180deg, #f3fbff 0%, #eef5fb 42%, #f7fafc 100%);
    color: #162031;
}

.report-public-frame {
    width: min(1380px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.report-public-hero,
.report-public-section,
.report-public-sidebar-card,
.report-public-empty {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(211, 230, 242, 0.96);
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(17, 45, 78, 0.08);
}

.report-public-hero {
    padding: 28px;
    display: grid;
    gap: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 255, 0.98)),
        #fff;
}

.report-public-topbar,
.report-public-brand,
.report-public-item-head,
.report-public-item-meta,
.report-public-section-head,
.report-public-sidebar-head,
.report-public-anchor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.report-public-brand {
    justify-content: flex-start;
}

.report-public-system-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #eef8ff);
    border: 1px solid #dcecf6;
}

.report-public-kicker {
    display: inline-flex;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: #5f7f96;
}

.report-public-heading {
    display: block;
}

.report-public-heading-main {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 12px;
    padding: 18px 0 6px;
}

.report-public-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ebfeff, #edf5ff);
    color: #2b6b82;
    font-size: 0.84rem;
    font-weight: 700;
}

.report-public-heading h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 3.9rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: #10253d;
}

.report-public-summary,
.report-public-item-meta span,
.report-public-item-head time,
.report-public-note-copy,
.report-public-empty p,
.report-public-empty-text {
    color: #678196;
}

.report-public-summary {
    margin: 0;
    max-width: 880px;
    font-size: 1rem;
    line-height: 1.8;
}

.report-public-layout {
    display: block;
    margin-top: 20px;
}

.report-public-section h2,
.report-public-empty h2 {
    margin: 0;
    letter-spacing: -0.02em;
}

.report-public-content {
    display: grid;
    gap: 20px;
}

.report-public-section {
    padding: 24px 26px;
}

.report-public-section-head {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5f2f8;
}

.report-public-section-head > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-public-section-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3fc3e3, #1890ff);
    color: #fff;
    font-weight: 700;
}

.report-public-section-head > span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f0fbff;
    border: 1px solid #d7f0f7;
    color: #1677a1;
    font-size: 0.82rem;
    font-weight: 700;
}

.report-public-list {
    display: grid;
    gap: 14px;
}

.report-public-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fdff 100%);
    border: 1px solid #e1f0f7;
}

.report-public-item-order {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #eefdff;
    color: #1c82aa;
    font-weight: 700;
    border: 1px solid #d5eef7;
}

.report-public-item-body {
    display: grid;
    gap: 10px;
}

.report-public-item-head h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.5;
    color: #162a42;
}

.report-public-item-head a:hover,
.report-public-item-meta a:hover {
    color: #1890ff;
}

.report-public-item-meta {
    justify-content: flex-start;
    gap: 14px;
    font-size: 0.92rem;
}

.report-public-item-meta a {
    color: #1677a1;
    font-weight: 700;
}

.report-public-item-body p {
    margin: 0;
    line-height: 1.8;
    color: #31475d;
}

.report-public-empty {
    padding: 28px;
}

.empty-state h2 {
    margin-bottom: 8px;
}

.pagination-wrap nav {
    display: flex;
    justify-content: center;
}

.log-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f5f0e8;
    color: #8d775f;
    font-size: 0.76rem;
    white-space: nowrap;
}

@media (max-width: 1080px) {
    .stats-grid,
    .card-grid,
    .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(88vw, 320px);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 20;
    }

    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: inline-flex; }
}

@media (max-width: 720px) {
    .stats-grid,
    .card-grid,
    .content-grid,
    .grid.two,
    .page-actions { grid-template-columns: 1fr; }

    .copy-field,
    .report-public-heading,
    .report-public-meta,
    .report-public-item {
        grid-template-columns: 1fr;
    }

    .search-form,
    .form-actions,
    .card-actions,
    .section-head,
    .list-row,
    .news-head,
    .project-head,
    .topbar,
    .report-public-topbar,
    .report-public-item-head,
    .report-public-item-meta,
    .report-public-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .content { padding: 16px; }

    .sidebar,
    .card,
    .project-card,
    .guest-panel { padding: 18px; }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-aside,
    .auth-form {
        min-height: auto;
        padding: 24px;
    }

    .auth-copy h1 {
        font-size: 2rem;
    }

    .report-public-frame {
        width: min(100%, calc(100% - 24px));
        padding: 16px 0 28px;
    }

    .report-public-hero,
    .report-public-section,
    .report-public-empty {
        padding: 20px;
        border-radius: 22px;
    }

    .report-public-item-order {
        width: 48px;
        height: 48px;
    }
}
