﻿:root {
    --bg: #f3efe7;
    --surface: #fffdf9;
    --surface-strong: #fdf7ee;
    --line: #d6cdc2;
    --text: #1f2933;
    --muted: #6b7280;
    --brand: #0f766e;
    --brand-strong: #115e59;
    --accent: #d97706;
    --danger: #b91c1c;
    --shadow: 0 20px 40px rgba(31, 41, 51, 0.08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(217, 119, 6, 0.12), transparent 24%),
        radial-gradient(circle at right center, rgba(15, 118, 110, 0.12), transparent 18%),
        linear-gradient(180deg, #f7f1e7 0%, #f3efe7 100%);
}

a { color: inherit; text-decoration: none; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
    background: rgba(243, 239, 231, 0.86);
    border-bottom: 1px solid rgba(214, 205, 194, 0.8);
}
.shell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}
.brand { font-size: 1.1rem; font-weight: 800; letter-spacing: 0.04em; }
.top-nav { display: flex; gap: 16px; color: var(--muted); }
.top-nav a:hover { color: var(--brand-strong); }
.page-shell { padding: 32px 0 48px; }
.eyebrow { margin: 0 0 10px; color: var(--brand-strong); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; }
.lead { color: var(--muted); line-height: 1.7; }
.hero-card, .panel, .question-card, .success-card, .stat-card, .section-banner, .search-bar {
    background: rgba(255, 253, 249, 0.9);
    border: 1px solid rgba(214, 205, 194, 0.9);
    box-shadow: var(--shadow);
}
.hero-card {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 24px;
    border-radius: 28px;
    padding: 28px;
}
.hero-panel { display: flex; align-items: stretch; }
.panel-card {
    width: 100%;
    border-radius: 22px;
    padding: 24px;
    background: linear-gradient(160deg, #0f766e, #134e4a);
    color: white;
    display: grid;
    gap: 10px;
}
.panel-card span { opacity: 0.75; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.12em; }
.panel-card strong { font-size: 1.25rem; }
.plain-list { padding-left: 20px; line-height: 1.9; }
.hero-actions, .form-actions, .action-links { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: white; }
.btn-secondary { background: #efe6d8; color: var(--text); }
.section-head { margin-bottom: 20px; }
.questionnaire-form { display: grid; gap: 18px; }
.question-section { display: grid; gap: 18px; }
.section-banner {
    padding: 14px 18px;
    border-radius: 18px;
    font-weight: 700;
    color: var(--brand-strong);
}
.question-card {
    border-radius: 24px;
    padding: 22px;
}
.question-card.is-hidden { display: none; }
.question-card.has-error { border-color: rgba(185, 28, 28, 0.5); }
.question-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.question-head h2 { margin: 0; font-size: 1.05rem; line-height: 1.7; }
.question-no {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #efe6d8;
    font-weight: 800;
    color: var(--brand-strong);
    flex: none;
}
.option-list { display: grid; gap: 10px; }
.option-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-strong);
    border: 1px solid rgba(214, 205, 194, 0.8);
}
.text-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    background: white;
}
.hint, .meta-line { margin: 10px 0 0; color: var(--muted); font-size: 0.94rem; }
.error-text { color: var(--danger); margin: 10px 0 0; font-weight: 700; }
.flash-stack { display: grid; gap: 12px; margin-bottom: 18px; }
.flash { border-radius: 16px; padding: 13px 16px; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.success-card {
    border-radius: 28px;
    padding: 36px;
    max-width: 780px;
}
.detail-line { color: var(--muted); }
.stat-grid, .dashboard-grid, .detail-grid { display: grid; gap: 18px; }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 20px; }
.stat-card { border-radius: 22px; padding: 20px; }
.stat-card span { color: var(--muted); display: block; margin-bottom: 10px; }
.stat-card strong { font-size: 2rem; }
.dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.panel { border-radius: 24px; padding: 22px; }
.panel h2 { margin-top: 0; }
.bar-row {
    display: grid;
    grid-template-columns: 120px 1fr 74px;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}
.bar-track {
    height: 14px;
    border-radius: 999px;
    background: #d8edea;
    overflow: hidden;
}
.bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #14b8a6);
}
.bar-track.warm { background: #f7e4bf; }
.bar-track.warm span { background: linear-gradient(90deg, #d97706, #f59e0b); }
.bar-track.neutral { background: #e5e7eb; }
.bar-track.neutral span { background: linear-gradient(90deg, #475569, #64748b); }
.bar-label, .bar-value { font-size: 0.95rem; }
.table-wrap { overflow-x: auto; }
.compact-table table td, .compact-table table th { white-space: nowrap; }
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}
.table-wrap th, .table-wrap td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf0f3;
    text-align: left;
    vertical-align: top;
}
.table-wrap th { background: #f8fafc; }
.search-bar { border-radius: 24px; padding: 16px; display: flex; gap: 12px; margin-bottom: 18px; }
.info-list { display: grid; gap: 14px; margin: 0; }
.info-list dt { font-weight: 700; margin-bottom: 6px; }
.info-list dd { margin: 0; color: var(--muted); }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.score-grid div {
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-strong);
    border: 1px solid rgba(214, 205, 194, 0.8);
}
.score-grid span { display: block; color: var(--muted); margin-bottom: 6px; }
.score-grid strong { font-size: 1.35rem; }
.radar-card { margin-top: 18px; background: #f8fbfd; border-radius: 20px; padding: 14px; }
.radar-svg { width: 100%; max-width: 340px; display: block; margin: 0 auto; }

@media (max-width: 900px) {
    .hero-card, .detail-grid { grid-template-columns: 1fr; }
    .shell-header { flex-direction: column; gap: 10px; padding: 12px 0; }
    .top-nav { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 640px) {
    .shell { width: min(100% - 20px, 1120px); }
    .question-head { flex-direction: column; }
    .search-bar, .hero-actions, .form-actions { flex-direction: column; }
    .bar-row { grid-template-columns: 1fr; }
}
.inline-form { margin: 0; }
.link-button {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
}
.link-button:hover { color: var(--brand-strong); }
.login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 180px);
}
.login-card {
    width: min(520px, 100%);
    padding: 30px;
    border-radius: 28px;
    background: rgba(255, 253, 249, 0.92);
    border: 1px solid rgba(214, 205, 194, 0.9);
    box-shadow: var(--shadow);
}
.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}
.flash-success { background: #ecfdf5; color: #166534; border: 1px solid #86efac; }
.sync-panel { margin-bottom: 18px; }
.sync-form { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.sync-field { min-width: 280px; flex: 1; }
.sync-input { max-width: 360px; }
.action-links-wide {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 14px;
    min-width: max-content;
}
.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: none;
}
.dropdown summary {
    list-style: none;
    cursor: pointer;
    white-space: nowrap;
}
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown-inline summary {
    color: var(--brand-strong);
    font-weight: 700;
}
.dropdown[open] .dropdown-menu { display: flex !important; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(181, 167, 151, 0.95);
    background: #fffaf2;
    box-shadow: 0 18px 32px rgba(31, 41, 51, 0.16);
    z-index: 20;
}
.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    background: transparent;
}
.dropdown-menu a:hover {
    background: #e8f3f1;
    color: var(--brand-strong);
}
.dropdown-menu-vertical {
    min-width: 300px;
    white-space: normal;
}
.table-wrap td:last-child,
.table-wrap th:last-child {
    white-space: nowrap;
}
.sync-dialog {
    width: min(520px, calc(100% - 24px));
    border: 0;
    padding: 0;
    background: transparent;
}
.sync-dialog::backdrop,
.success-dialog::backdrop {
    background: rgba(31, 41, 51, 0.45);
}
.sync-dialog-card,
.success-dialog-card {
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 253, 249, 0.98);
    border: 1px solid rgba(214, 205, 194, 0.9);
    box-shadow: var(--shadow);
}
.sync-dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.severity-scale {
    display: block;
    margin: 0 0 14px;
}
.severity-image {
    display: block;
    width: 105px;
    max-width: 100%;
    height: auto;
}
.success-backdrop {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.success-dialog {
    width: min(680px, calc(100% - 24px));
    border: 0;
    padding: 0;
    background: transparent;
}
.success-dialog-card h1 {
    margin: 0 0 14px;
    font-size: 2rem;
    font-weight: 800;
}
.success-dialog-card p {
    margin: 0 0 14px;
    line-height: 1.8;
}

@media (max-width: 640px) {
    .action-links-wide {
        display: flex;
        flex-wrap: wrap;
        white-space: normal;
        min-width: 0;
    }
    .dropdown-menu {
        position: static;
        min-width: 0;
    }
}
