:root {
    --bg: #f4f8fd;
    --bg-soft: rgba(255, 255, 255, 0.86);
    --panel: rgba(255, 255, 255, 0.9);
    --panel-light: rgba(248, 252, 255, 0.96);
    --line: rgba(126, 161, 201, 0.22);
    --text: #16324f;
    --muted: #6a809a;
    --accent: #4ea9ff;
    --accent-2: #ffd38a;
    --danger: #ef6f88;
    --shadow: 0 18px 50px rgba(81, 117, 160, 0.14);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(78, 169, 255, 0.12), transparent 28%),
        radial-gradient(circle at 88% 10%, rgba(255, 211, 138, 0.22), transparent 20%),
        linear-gradient(180deg, #f9fbff 0%, #f1f6fc 50%, #edf4fb 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(112, 144, 180, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 144, 180, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.55;
}

body.modal-open {
    overflow: hidden;
}

.site-shell {
    position: relative;
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.ambient {
    position: fixed;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    filter: blur(24px);
    opacity: 0.5;
    pointer-events: none;
}

.ambient-a {
    top: 80px;
    right: -80px;
    background: rgba(78, 169, 255, 0.16);
}

.ambient-b {
    bottom: 50px;
    left: -90px;
    background: rgba(255, 211, 138, 0.22);
}

.hero-card,
.card,
.admin-shell,
.sidebar,
.topbar,
.table-wrap,
.login-card,
.modal-card {
    backdrop-filter: blur(12px);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-card {
    border-radius: var(--radius-xl);
    padding: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 24px;
    align-items: center;
    margin-bottom: 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #4289d6;
    margin-bottom: 14px;
    font-weight: 700;
}

h1, h2, h3, h4 {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    margin: 0;
}

.hero-card h1,
.result-panel h1 {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.15;
    margin-bottom: 16px;
}

.lead,
.result-copy,
.admin-intro,
.stat-card span,
.table-wrap,
.hero-badge span,
.section-head p,
.empty-box,
.agreement-box p,
.sidebar a,
.topbar-sub,
.login-tip,
.metric-copy,
.result-range,
.mini-tip {
    color: var(--muted);
}

.hero-badge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(78, 169, 255, 0.12), rgba(255, 255, 255, 0.75));
    border: 1px solid rgba(78, 169, 255, 0.18);
}

.hero-badge strong,
.score-ring strong,
.metric-card strong,
.stat-card strong {
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
}

.assessment-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 22px;
}

.assessment-single {
    display: block;
}

.card,
.result-panel,
.login-card,
.sidebar,
.topbar,
.table-wrap,
.modal-card {
    border-radius: var(--radius-xl);
}

.card,
.result-panel,
.login-card,
.table-wrap,
.modal-card {
    padding: 28px;
}

.intro-card {
    position: sticky;
    top: 18px;
    align-self: start;
}

.grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

label {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="file"],
input[type="password"],
textarea,
select {
    width: 100%;
    border: 1px solid rgba(126, 161, 201, 0.2);
    background: #fdfefe;
    color: var(--text);
    padding: 14px 16px;
    border-radius: 16px;
    outline: none;
    font: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(78, 169, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(78, 169, 255, 0.12);
}

.agreement-box {
    padding: 18px;
    border-radius: 22px;
    background: rgba(244, 249, 255, 0.92);
    border: 1px solid rgba(126, 161, 201, 0.14);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.section-head {
    margin-bottom: 18px;
}

.section-head-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.question-list {
    display: grid;
    gap: 16px;
}

.question-item {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(248, 252, 255, 0.96);
    border: 1px solid rgba(126, 161, 201, 0.14);
}

.question-no {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, rgba(255, 211, 138, 0.45), rgba(78, 169, 255, 0.18));
    color: var(--text);
    font-weight: 700;
}

.question-body h3 {
    margin-bottom: 14px;
    font-size: 22px;
    line-height: 1.5;
}

.option-pill {
    position: relative;
    display: flex;
    margin-bottom: 12px;
}

.option-pill input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.option-pill span {
    width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(126, 161, 201, 0.18);
    background: #ffffff;
    transition: 0.22s ease;
}

.option-pill input:checked + span,
.option-pill:hover span {
    border-color: rgba(78, 169, 255, 0.5);
    background: rgba(78, 169, 255, 0.08);
    transform: translateY(-1px);
}

.primary-btn,
.ghost-btn,
.outline-btn,
.danger-btn,
.modal-close {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    padding: 14px 22px;
    border-radius: 999px;
    transition: 0.2s ease;
}

.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, #69b5ff, #85c9ff);
    color: #10365d;
    font-weight: 700;
    margin-top: 14px;
}

.primary-btn:hover,
.ghost-btn:hover,
.outline-btn:hover,
.danger-btn:hover,
.modal-close:hover {
    transform: translateY(-1px);
}

.ghost-btn,
.outline-btn {
    background: #ffffff;
    border: 1px solid rgba(126, 161, 201, 0.26);
    color: var(--text);
}

.danger-btn {
    background: rgba(239, 111, 136, 0.1);
    color: #c04d68;
    border: 1px solid rgba(239, 111, 136, 0.18);
}

.alert-box,
.success-box {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 20px;
}

.alert-box {
    background: rgba(239, 111, 136, 0.08);
    border: 1px solid rgba(239, 111, 136, 0.18);
}

.success-box {
    background: rgba(71, 179, 126, 0.08);
    border: 1px solid rgba(71, 179, 126, 0.18);
}

.result-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.result-panel {
    width: min(760px, 100%);
    text-align: center;
}

.score-ring {
    width: 180px;
    height: 180px;
    margin: 28px auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.98) 47%, transparent 48%),
        conic-gradient(from 220deg, #69b5ff, #ffd38a, #69b5ff);
    box-shadow: inset 0 0 16px rgba(127, 160, 201, 0.18), 0 14px 36px rgba(127, 160, 201, 0.18);
}

.score-ring-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    transform: translateY(2px);
}

.score-ring span {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
}

.result-image {
    width: min(100%, 360px);
    border-radius: 24px;
    margin: 20px auto;
    display: block;
    border: 1px solid rgba(126, 161, 201, 0.12);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.text-link {
    color: #4289d6;
    text-decoration: none;
    padding-top: 14px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(22, 50, 79, 0.34);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
}

.modal-overlay.is-visible {
    display: flex;
}

.modal-card {
    width: min(640px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.modal-close {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(126, 161, 201, 0.2);
    color: var(--text);
    flex: 0 0 auto;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 18px;
}

.modal-submit {
    width: auto;
    margin-top: 0;
}

.admin-shell {
    width: min(calc(100% - 28px), 1320px);
    margin: 18px auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.sidebar {
    padding: 26px 20px;
    position: sticky;
    top: 16px;
    align-self: start;
}

.brand-mark {
    padding-bottom: 20px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(126, 161, 201, 0.12);
}

.brand-mark h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.sidebar nav {
    display: grid;
    gap: 10px;
}

.sidebar a {
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(248, 252, 255, 0.96);
    border: 1px solid transparent;
}

.sidebar a.active,
.sidebar a:hover {
    color: var(--text);
    border-color: rgba(78, 169, 255, 0.22);
    background: rgba(78, 169, 255, 0.08);
}

.topbar {
    padding: 24px 26px;
    margin-bottom: 18px;
}

.topbar h1 {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 8px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card,
.stat-card {
    padding: 22px;
    border-radius: 22px;
    background: rgba(248, 252, 255, 0.96);
    border: 1px solid rgba(126, 161, 201, 0.14);
}

.metric-card strong,
.stat-card strong {
    font-size: 36px;
}

.actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.table-wrap {
    overflow: hidden;
}

.table-scroll {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(126, 161, 201, 0.1);
    vertical-align: top;
}

th {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid .full,
.form-actions,
.notice-box {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.notice-box,
.empty-box {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(248, 252, 255, 0.96);
    border: 1px dashed rgba(126, 161, 201, 0.22);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: min(460px, 100%);
}

.inline-form {
    display: inline;
}

@media (max-width: 1024px) {
    .assessment-layout,
    .admin-shell,
    .hero-card,
    .section-head-flex {
        grid-template-columns: 1fr;
    }

    .intro-card,
    .sidebar {
        position: static;
    }

    .metrics,
    .form-grid,
    .grid-two {
        grid-template-columns: 1fr;
    }

    .section-head-flex {
        display: grid;
    }
}

@media (max-width: 720px) {
    .site-shell {
        width: min(calc(100% - 20px), var(--container));
        padding: 18px 0 28px;
    }

    .hero-card,
    .card,
    .result-panel,
    .login-card,
    .table-wrap,
    .sidebar,
    .topbar,
    .modal-card {
        padding: 20px;
        border-radius: 22px;
    }

    .question-item {
        grid-template-columns: 1fr;
    }

    .question-no {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .question-body h3 {
        font-size: 19px;
    }

    .result-actions,
    .form-actions,
    .actions-row,
    .modal-actions {
        flex-direction: column;
    }

    .result-actions a,
    .form-actions a,
    .form-actions button,
    .actions-row a,
    .actions-row button,
    .modal-actions button {
        width: 100%;
    }

    .modal-overlay {
        padding: 12px;
    }
}
