/* ==============================
   市场调研系统 - 全局样式
   ============================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #edf1f7 50%, #e8ecf4 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* 修复 iOS Safari 输入框缩放问题 */
@media screen and (max-width: 640px) {
    input, textarea, select, button {
        font-size: 16px !important;
    }
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: #fff;
    padding: 28px 20px 24px;
    margin: 0 -16px 24px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 6px 24px rgba(26,115,232,0.28);
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.header-inner {
    position: relative;
    z-index: 1;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.header-top h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex: 1;
    min-width: 0;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.header-user-name {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.95;
    white-space: nowrap;
}

.header-logout-btn {
    padding: 5px 14px;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.25);
    transition: all 0.2s;
    white-space: nowrap;
}

.header-logout-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
}

.header-subtitle {
    margin-top: 10px;
    font-size: 13px;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* Form */
.survey-form {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.02);
    border: 1px solid #eef0f3;
    transition: box-shadow 0.3s ease;
}

.survey-form:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
}

.form-group {
    margin-bottom: 22px;
    animation: fadeSlideUp 0.4s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.required-mark {
    color: #e53935;
    font-weight: 700;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #dde1e6;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
    background: #fff;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* 日期时间选择器 - 保留原生控件图标 */
input[type="datetime-local"].form-input {
    -webkit-appearance: auto;
    appearance: auto;
    min-height: 44px;
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-file {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1.5px dashed #dde1e6;
    border-radius: 10px;
    font-size: 14px;
    background: #fafbfc;
    cursor: pointer;
}

.file-upload-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #888;
    line-height: 1.5;
}

/* 图片预览容器（拍照后即时预览） */
.file-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 4px 0;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 15px;
    color: #444;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a73e8;
}

/* Agreement */
.agreement-box {
    border: 1.5px solid #dde1e6;
    border-radius: 10px;
    overflow: hidden;
}

.agreement-content {
    max-height: 180px;
    overflow-y: auto;
    padding: 14px;
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    background: #fafbfc;
    border-bottom: 1px solid #eee;
}

.agreement-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
}

.agreement-check input {
    width: 18px;
    height: 18px;
    accent-color: #1a73e8;
}

/* ==============================
   手写签字板样式
   ============================== */

.signature-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signature-block .agreement-box {
    margin-bottom: 0;
}

.signature-pad-wrap {
    border: 1.5px solid #dde1e6;
    border-radius: 10px;
    overflow: hidden;
}

.signature-pad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fafbfc;
    border-bottom: 1px solid #eee;
}

.signature-pad-label {
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.sig-clear-btn {
    padding: 5px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.sig-clear-btn:hover {
    background: #fce4e4;
    border-color: #e53935;
    color: #e53935;
}

.signature-canvas-wrap {
    position: relative;
    padding: 8px;
}

.signature-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 500px;
    border: 1.5px dashed #ccc;
    border-radius: 8px;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
    transition: border-color 0.2s;
}

.signature-canvas:active {
    border-color: #1a73e8;
}

.sig-required-hint {
    display: block;
    padding: 6px 14px 10px;
    font-size: 12px;
    color: #e53935;
}

/* 修改模式下签字锁定提示 */
.sig-locked-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
}

.sig-locked-icon {
    font-size: 18px;
}

/* ==============================
   新题型样式
   ============================== */

/* 问卷说明 */
.questionnaire-desc {
    background: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    border-left: 4px solid #1a73e8;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

/* 星级评分 */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #fbbc04;
}

/* 排序题 */
.sort-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sort-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fafbfc;
    border: 1px solid #e8eaed;
    border-radius: 8px;
}

.sort-handle {
    color: #bbb;
    font-size: 16px;
    cursor: grab;
}

.sort-text {
    flex: 1;
    font-size: 14px;
}

.sort-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}

/* 矩阵量表 */
.matrix-table-wrap {
    overflow-x: auto;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.matrix-table th {
    background: #f5f7fa;
    padding: 10px 6px;
    text-align: center;
    font-weight: 500;
    color: #555;
    border: 1px solid #e0e0e0;
    min-width: 60px;
    white-space: nowrap;
}

.matrix-table td {
    padding: 8px 6px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.matrix-row-label {
    text-align: left !important;
    font-weight: 500;
    color: #333;
    width: 120px;
}

.matrix-radio input {
    width: 16px;
    height: 16px;
    accent-color: #1a73e8;
}

/* ==============================
   分页 / section 大类标题样式
   ============================== */

/* 步骤指示器 */
.step-indicator-wrapper {
    margin-bottom: 24px;
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: 16px 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    cursor: pointer;
    position: relative;
    padding: 0 10px;
    transition: opacity 0.2s;
}

.step-item::after {
    content: '';
    position: absolute;
    top: 17px;
    left: 60%;
    width: calc(100% + 20px);
    height: 2px;
    background: #dde1e6;
    z-index: 0;
}

.step-item:last-child::after {
    display: none;
}

.step-item.completed::after {
    background: #1a73e8;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8eaed;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    z-index: 1;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.step-item.active .step-circle {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}

.step-item.completed .step-circle {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

.step-label {
    font-size: 12px;
    color: #999;
    text-align: center;
    max-width: 90px;
    word-break: break-all;
    line-height: 1.3;
}

.step-item.active .step-label {
    color: #1a73e8;
    font-weight: 600;
}

.step-item.completed .step-label {
    color: #1a73e8;
}

.step-progress-text {
    text-align: center;
    font-size: 13px;
    color: #888;
    padding: 4px 0;
    letter-spacing: 0.5px;
}

.step-progress-text strong {
    color: #1a73e8;
    font-weight: 700;
    font-size: 15px;
}

/* Section 分类标题 */
.section-header {
    padding: 14px 0 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8f0fe;
    position: relative;
    text-align: center;
}

.section-header::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -2px;
    width: 48px;
    height: 3px;
    background: linear-gradient(135deg, #1a73e8, #4a90d9);
    border-radius: 2px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a73e8;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.section-title::before {
    content: '📂';
    font-size: 20px;
}

.section-desc {
    display: none;
}

/* 分步导航按钮 */
.step-nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    justify-content: center;
}

.step-prev-btn,
.step-next-btn {
    padding: 12px 28px;
    border: 1.5px solid #dde1e6;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #555;
    flex: 1;
    max-width: 200px;
}

.step-prev-btn:hover {
    background: #f5f7fa;
    border-color: #bbb;
}

.step-next-btn {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(26,115,232,0.3);
}

.step-next-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,115,232,0.35);
}

.step-next-btn:active {
    transform: scale(0.97);
}

.step-nav .submit-btn {
    flex: 1;
    max-width: 200px;
}

.step-nav .reset-btn {
    flex: 1;
    max-width: 120px;
    background: #f5f5f5;
    border: 1.5px solid #dde1e6;
    color: #666;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.step-nav .reset-btn:hover {
    background: #eee;
}

/* ==============================
   保留原有 .form-actions（无分页时使用）
   ============================== */

/* Buttons */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.submit-btn,
.reset-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,115,232,0.3);
    transition: all 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,115,232,0.4);
}

.submit-btn:active {
    transform: scale(0.97);
}

.reset-btn {
    background: #f5f5f5;
    color: #666;
}

.reset-btn:active {
    background: #eee;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 32px 0 20px;
    font-size: 13px;
    color: #999;
    line-height: 1.8;
}

/* Success / Error */
.success-box,
.error-box {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    margin-top: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #34a853, #1e8e3e);
    color: #fff;
    font-size: 36px;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(52,168,83,0.3);
}

.success-box h2 {
    font-size: 22px;
    margin-bottom: 12px;
    color: #333;
}

.success-box p {
    font-size: 15px;
    color: #666;
}

.error-box h2 {
    font-size: 22px;
    margin-bottom: 16px;
    color: #e53935;
}

.error-box ul {
    list-style: none;
    color: #e53935;
    font-size: 14px;
    line-height: 2;
}

/* ==============================
   登录页面
   ============================== */

.login-page-body {
    background: linear-gradient(135deg, #e8f0fe 0%, #f0f5ff 30%, #fafbfc 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* 背景装饰圆 */
.login-bg-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.login-bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
}

.login-bg-circle-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #1a73e8, #4a90d9);
    top: -160px;
    right: -120px;
    animation: floatCircle 8s ease-in-out infinite;
}

.login-bg-circle-2 {
    width: 320px;
    height: 320px;
    background: linear-gradient(135deg, #1557b0, #1a73e8);
    bottom: -100px;
    left: -80px;
    animation: floatCircle 10s ease-in-out infinite reverse;
}

.login-bg-circle-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #4a90d9, #82b1ff);
    top: 45%;
    left: 10%;
    animation: floatCircle 6s ease-in-out infinite;
}

@keyframes floatCircle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -15px) scale(1.05); }
    50% { transform: translate(-10px, 10px) scale(0.97); }
    75% { transform: translate(15px, 8px) scale(1.03); }
}

/* 登录页面包裹 */
.login-page-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 24px 20px 40px;
}

/* Logo 区域 */
.login-logo-area {
    text-align: center;
    margin-bottom: 28px;
    animation: fadeSlideUp 0.6s ease;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(26,115,232,0.2);
    transition: transform 0.3s;
}

.login-logo-icon:hover {
    transform: scale(1.05);
}

.login-logo-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.login-site-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.login-site-subtitle {
    font-size: 14px;
    color: #7a8ba3;
    font-weight: 400;
}

/* 登录卡片 */
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 28px;
    box-shadow:
        0 4px 24px rgba(0,0,0,0.06),
        0 1px 4px rgba(0,0,0,0.04);
    animation: fadeSlideUp 0.7s ease;
    border: 1px solid rgba(255,255,255,0.8);
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录错误提示 */
.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fef1f1;
    border: 1px solid #fdcaca;
    border-radius: 12px;
    color: #c53030;
    font-size: 14px;
    margin-bottom: 20px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.login-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e53e3e;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* 登录表单 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
}

.login-label svg {
    color: #a0aec0;
}

.login-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e8edf2;
    border-radius: 12px;
    font-size: 15px;
    color: #2d3748;
    background: #fafbfc;
    transition: all 0.25s;
    outline: none;
}

.login-input::placeholder {
    color: #a0aec0;
}

.login-input:focus {
    border-color: #1a73e8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26,115,232,0.1);
}

.login-submit-btn {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(26,115,232,0.3);
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,115,232,0.35);
}

.login-submit-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}

.login-submit-btn svg {
    transition: transform 0.25s;
}

.login-submit-btn:hover svg {
    transform: translateX(4px);
}

/* 登录页 footer */
.login-footer {
    text-align: center;
    padding-top: 24px;
    font-size: 12px;
    color: #a0aec0;
    line-height: 1.8;
    animation: fadeSlideUp 0.8s ease;
}

/* 保留旧版兼容 */
.login-box {
    max-width: 400px;
    margin: 60px auto 0;
    background: #fff;
    border-radius: 16px;
    padding: 40px 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    text-align: center;
}

.login-box h1 {
    font-size: 22px;
    color: #1a73e8;
    margin-bottom: 4px;
}

.login-box h2 {
    font-size: 16px;
    color: #666;
    font-weight: 400;
    margin-bottom: 28px;
}

.login-form {
    text-align: left;
}

.error-msg {
    background: #fce4e4;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

/* Empty */
.empty-notice {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

/* 分步动画 */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   管理后台样式 - 侧边栏布局
   ============================== */

/* 侧边栏 */
body {
    background: #f0f2f5;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    background: #fff;
    border-right: 1px solid #e8eaed;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(0,0,0,0.04);
}

.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-title h2 {
    font-size: 16px;
    color: #1a73e8;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-title span {
    font-size: 12px;
    color: #999;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    position: relative;
}

.sidebar-nav-item:hover {
    background: #f5f7fa;
    color: #333;
}

.sidebar-nav-item.active {
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 600;
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: #1a73e8;
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    white-space: nowrap;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #4a90d9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-name {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.sidebar-logout {
    padding: 6px 14px;
    border-radius: 6px;
    background: #f5f5f5;
    color: #888;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.15s;
}

.sidebar-logout:hover {
    background: #fce4e4;
    color: #e53935;
}

/* 主内容区 */
.admin-main {
    margin-left: 240px;
    min-height: 100vh;
    background: #f0f2f5;
}

.admin-header {
    background: #fff;
    padding: 20px 28px;
    border-bottom: 1px solid #e8eaed;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.admin-header h1 {
    font-size: 22px;
    color: #222;
    font-weight: 700;
}

.admin-header p {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.admin-content {
    padding: 24px 28px 40px;
}

/* 兼容旧版 admin-wrap */
.admin-wrap {
    /* 已弃用，保留为兼容 */
}

/* ==============================
   仪表盘样式
   ============================== */

/* 指标卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.stat-card-blue::before { background: #1a73e8; }
.stat-card-green::before { background: #1e8e3e; }
.stat-card-orange::before { background: #e37400; }
.stat-card-red::before { background: #c5221f; }

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card-blue .stat-icon { background: #e8f0fe; }
.stat-card-green .stat-icon { background: #e6f4ea; }
.stat-card-orange .stat-icon { background: #fef7e0; }
.stat-card-red .stat-icon { background: #fce8e6; }

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
}

/* 仪表盘双栏 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-col-left,
.dashboard-col-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 仪表盘卡片 */
.dashboard-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    overflow: visible;
    transition: box-shadow 0.2s;
}

.dashboard-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.card-link {
    font-size: 13px;
    color: #1a73e8;
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 22px;
}

/* 当前问卷 */
.current-qnr {
    font-size: 18px;
    color: #1a73e8;
    font-weight: 600;
    margin-bottom: 8px;
}

.current-qnr-sub {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

/* 最近提交表格 */
.recent-table {
    width: 100%;
    border-collapse: collapse;
}

.recent-header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: #f8f9fb;
    border-bottom: 2px solid #e8eaed;
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-row {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
    font-size: 13px;
}

.recent-row:last-child {
    border-bottom: none;
}

.recent-row:hover {
    background: #fafbfc;
}

.recent-col-id {
    flex: 0 0 64px;
    color: #1a73e8;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.recent-col-qnr {
    flex: 2;
    min-width: 0;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-col-status {
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.status-submitted { background: #1a73e8; }
.status-dot.status-reviewing { background: #e37400; }
.status-dot.status-approved { background: #34a853; }
.status-dot.status-returned { background: #e53935; }
.status-dot.status-draft { background: #999; }
.status-dot.status-incomplete { background: #ffa726; }

.recent-col-user {
    flex: 1;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-col-time {
    flex: 0 0 80px;
    color: #999;
    white-space: nowrap;
    text-align: right;
    font-size: 12px;
}

/* 仪表盘问卷迷你卡片列表 */
.qnr-list-mini {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qnr-mini-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.qnr-mini-card:hover {
    border-color: #d2e3fc;
    box-shadow: 0 2px 10px rgba(26,115,232,0.06);
}

.qnr-mini-card.qnr-mini-active {
    border-color: #c8e6c9;
    background: #f9fef9;
}

.qnr-mini-card.qnr-mini-active:hover {
    box-shadow: 0 2px 10px rgba(52,168,83,0.08);
}

.qnr-mini-indicator {
    width: 4px;
    flex-shrink: 0;
    background: #e0e0e0;
    transition: background 0.2s;
}

.qnr-mini-indicator.mini-ind-active {
    background: #52c41a;
}

.qnr-mini-body {
    flex: 1;
    padding: 10px 14px;
    min-width: 0;
}

.qnr-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.qnr-mini-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.mini-active-dot {
    color: #52c41a;
    font-size: 10px;
    margin-right: 5px;
}

.qnr-mini-meta {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.qnr-mini-stat {
    font-size: 11px;
    color: #999;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.qnr-mini-desc {
    font-size: 12px;
    color: #999;
    margin: 6px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qnr-mini-links {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.qnr-mini-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    text-decoration: none;
    background: #f5f7fa;
    color: #666;
    border: 1px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}

.qnr-mini-link:hover {
    background: #e8f0fe;
    color: #1a73e8;
    border-color: #a8c8fa;
    text-decoration: none;
}

.qnr-mini-excel:hover { background: #e8f5e9; color: #2e7d32; border-color: #81c784; }
.qnr-mini-chart:hover { background: #fff3e0; color: #e65100; border-color: #ffb74d; }
.qnr-mini-list:hover { background: #f3e5f5; color: #6a1b9a; border-color: #ce93d8; }
.qnr-mini-edit { background: #e8f0fe; color: #1a73e8; border-color: #a8c8fa; }
.qnr-mini-edit:hover { background: #d2e3fc; border-color: #1a73e8; }

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 8px;
    background: #f8f9fb;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}

.quick-btn:hover {
    background: #e8f0fe;
    color: #1a73e8;
    transform: translateY(-1px);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    background: #f0f0f0;
    color: #888;
    margin-left: 8px;
}

/* Tag 标签 */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    background: #f0f0f0;
    color: #666;
    margin: 1px 3px;
}

.tag-green {
    background: #e6f4ea;
    color: #1e7e34;
}

.tag-gray {
    background: #f0f0f0;
    color: #888;
}

.tag-blue {
    background: #e8f0fe;
    color: #1a73e8;
}

/* 题型标签 */
.type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 500;
}

/* 题型网格 */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.type-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 13px;
}

.type-item strong {
    color: #333;
    flex: 1;
}

.type-code {
    color: #aaa;
    font-size: 11px;
    font-family: monospace;
}

/* 统计迷你行 */
.stats-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
}

.stats-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
}

.stats-mini-label {
    color: #888;
    font-weight: 500;
}

/* 成功消息 */
.success-msg {
    background: #e6f4ea;
    color: #1e7e34;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.empty-text {
    text-align: center;
    padding: 24px;
    color: #999;
    font-size: 14px;
}

/* ==============================
   保留原有管理样式（兼容）
   ============================== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0 16px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.topbar h1 {
    font-size: 22px;
    color: #222;
}

.topbar p {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.topbar-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar-links a,
.topbar-links button {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.topbar-links a:hover,
.topbar-links button:hover {
    background: #e8e8e8;
}

/* 筛选 */
.filter-wrap {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.card-body .filter-wrap {
    background: #fafbfc;
    border-radius: 8px;
    box-shadow: none;
    margin-bottom: 16px;
    border: 1px solid #eee;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.filter-grid label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: #555;
    gap: 4px;
}

.filter-grid input,
.filter-grid select {
    padding: 9px 10px;
    border: 1.5px solid #dde1e6;
    border-radius: 8px;
    font-size: 14px;
    background: #fafbfc;
}

.filter-grid input:focus,
.filter-grid select:focus {
    outline: none;
    border-color: #1a73e8;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-actions .submit-btn {
    padding: 9px 20px;
    font-size: 14px;
    flex: 0 0 auto;
}

.action-link {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #1a73e8;
    text-decoration: none;
    background: #e8f0fe;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.action-link:hover {
    background: #d2e3fc;
}

/* 统计 */
.summary-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.summary-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.summary-card h2 {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.summary-card ul {
    list-style: none;
}

.summary-card li {
    font-size: 14px;
    color: #555;
    padding: 4px 0;
}

/* Table */
.table-wrap {
    background: #fff;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 900px;
}

.table-wrap th {
    background: #fafbfc;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.table-wrap td {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-wrap tr:hover td {
    background: #fafbfc;
}

.action-btns {
    display: flex;
    gap: 6px;
}

.action-btns a,
.action-btns button {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    background: #fff;
    transition: all 0.15s;
}

.action-btns a:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

.action-btns .btn-del:hover {
    background: #fce4e4;
    border-color: #e53935;
    color: #e53935;
}

/* 内联表单按钮伪造成链接样式（用于 CSRF POST 替代 GET 链接） */
.link-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    background: #fff;
    transition: all 0.15s;
    font-family: inherit;
}
.link-btn:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    transition: all 0.15s;
}

.page-item.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

.page-item:hover:not(.active) {
    background: #f0f0f0;
}

/* 下拉菜单 */
.export-group {
    position: relative;
    z-index: 200;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    z-index: 9999;
    min-width: 160px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    animation: dropdownIn 0.15s ease;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 14px;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 8px;
}

/* 表单页面 */
.form-page {
    max-width: 600px;
    margin: 20px auto;
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.form-page h2 {
    font-size: 20px;
    margin-bottom: 24px;
    color: #222;
    text-align: center;
}

.form-page .form-group {
    margin-bottom: 18px;
}

.form-page .form-label {
    font-size: 14px;
}

.form-page .form-input,
.form-page .form-textarea,
.form-page .form-select {
    padding: 10px 12px;
    font-size: 14px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #1a73e8;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

/* ==============================
   问卷管理页 - 卡片式布局
   ============================== */

/* 创建卡片 */
.qnr-create-card {
    margin-bottom: 20px;
}

.qnr-create-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-toggle-import {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px dashed #1a73e8;
    background: #e8f0fe;
    color: #1a73e8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle-import:hover {
    background: #d2e3fc;
    border-style: solid;
}

.qnr-create-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.qnr-create-field {
    flex: 1;
    min-width: 200px;
}

.qnr-create-desc {
    flex: 2;
    min-width: 250px;
}

.qnr-create-btn {
    flex: 0 0 auto;
    padding: 12px 28px;
    white-space: nowrap;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

.btn-cancel-import {
    flex: 0 0 auto;
    padding: 12px 20px;
    border: 1.5px solid #dde1e6;
    border-radius: 10px;
    background: #f5f5f5;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cancel-import:hover {
    background: #eee;
}

/* 导入面板 */
.qnr-import-panel {
    margin-top: 16px;
    padding-top: 16px;
}

.import-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #999;
    font-size: 13px;
}

.import-divider::before,
.import-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* 统计概览 */
.qnr-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.qnr-stat-item {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.qnr-stat-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.qnr-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.qnr-stat-label {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

/* 问卷卡片列表 */
.qnr-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qnr-empty-state {
    background: #fff;
    border-radius: 16px;
    padding: 64px 32px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.qnr-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.qnr-empty-state h3 {
    font-size: 18px;
    color: #555;
    margin-bottom: 8px;
}

.qnr-empty-state p {
    font-size: 14px;
    color: #999;
}

/* 单张问卷卡片 */
.qnr-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    display: flex;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
    border: 1px solid #f0f0f0;
}

.qnr-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.qnr-card-active {
    border-color: #c6e0b7;
    background: #fafff8;
    box-shadow: 0 2px 10px rgba(52,168,83,0.06);
}

/* 左侧指示条 */
.qnr-card-indicator {
    width: 5px;
    flex-shrink: 0;
    background: #e0e0e0;
    transition: background 0.3s, width 0.2s;
}

.qnr-card:hover .qnr-card-indicator {
    width: 6px;
}

.indicator-active {
    background: linear-gradient(180deg, #34a853, #1e8e3e);
}

.qnr-card-active .qnr-card-indicator {
    background: linear-gradient(180deg, #34a853, #1e8e3e);
}

/* 卡片主体 */
.qnr-card-body {
    flex: 1;
    padding: 18px 20px;
    min-width: 0;
}

.qnr-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.qnr-card-info {
    flex: 1;
    min-width: 200px;
}

.qnr-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.qnr-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    line-height: 1.4;
    margin: 0;
}

.qnr-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.qnr-badge-active {
    background: #e6f4ea;
    color: #1e7e34;
}

.qnr-badge-inactive {
    background: #f5f5f5;
    color: #999;
}

.qnr-card-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    margin: 4px 0 0;
}

/* 快捷操作链接条 */
.qnr-quick-links {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.qnr-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all .15s;
    border: 1px solid #e0e0e0;
    background: #fafbfc;
    color: #555;
    white-space: nowrap;
}

.qnr-quick-link:hover {
    background: #e8f0fe;
    border-color: #a8c8fa;
    color: #1a73e8;
}

.qnr-quick-link-excel {
    border-color: #c8e6c9;
    color: #2e7d32;
}

.qnr-quick-link-excel:hover {
    background: #e8f5e9;
    border-color: #81c784;
    color: #1b5e20;
}

.qnr-quick-link-chart {
    border-color: #ffe0b2;
    color: #e65100;
}

.qnr-quick-link-chart:hover {
    background: #fff3e0;
    border-color: #ffb74d;
    color: #bf360c;
}

.qnr-quick-link-list {
    border-color: #e1bee7;
    color: #6a1b9a;
}

.qnr-quick-link-list:hover {
    background: #f3e5f5;
    border-color: #ce93d8;
    color: #4a148c;
}

/* 元信息 */
.qnr-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.qnr-meta-item {
    font-size: 12px;
    color: #777;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.qnr-meta-time {
    color: #aaa;
}

/* 操作按钮区 */
.qnr-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.qnr-actions-left,
.qnr-actions-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* 按钮 */
.qnr-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: 1.5px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
    line-height: 1.4;
    font-family: inherit;
}

.qnr-btn-primary {
    background: #edf4ff;
    color: #1a73e8;
    border-color: #d2e3fc;
}

.qnr-btn-primary:hover {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26,115,232,0.25);
    transform: translateY(-1px);
}

.qnr-btn-success {
    background: #e6f4ea;
    color: #1e7e34;
    border-color: #c6e6ce;
}

.qnr-btn-success:hover {
    background: #1e7e34;
    color: #fff;
    border-color: #1e7e34;
    box-shadow: 0 2px 8px rgba(30,126,52,0.25);
    transform: translateY(-1px);
}

.qnr-btn-warning {
    background: #fef7e0;
    color: #e37400;
    border-color: #feefc3;
}

.qnr-btn-warning:hover {
    background: #e37400;
    color: #fff;
    border-color: #e37400;
    box-shadow: 0 2px 8px rgba(227,116,0,0.25);
    transform: translateY(-1px);
}

.qnr-btn-info {
    background: #f0f4ff;
    color: #1967d2;
    border-color: #d2e3fc;
}

.qnr-btn-info:hover {
    background: #1967d2;
    color: #fff;
    border-color: #1967d2;
    box-shadow: 0 2px 8px rgba(25,103,210,0.25);
    transform: translateY(-1px);
}

.qnr-btn-default {
    background: #f8f9fb;
    color: #555;
    border-color: #e0e0e0;
}

.qnr-btn-default:hover {
    background: #eee;
    color: #333;
    border-color: #ccc;
    transform: translateY(-1px);
}

.qnr-btn-danger {
    background: #fff;
    color: #999;
    border-color: #e0e0e0;
}

.qnr-btn-danger:hover {
    background: #fde8e8;
    color: #e53935;
    border-color: #e53935;
    transform: translateY(-1px);
}

.qnr-btn-export {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
}

.qnr-btn-export:hover {
    background: linear-gradient(135deg, #1557b0, #0d47a1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}

/* 下拉菜单 */
.qnr-dropdown {
    position: relative;
    display: inline-block;
}

.qnr-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    z-index: 9999;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    animation: dropdownIn 0.15s ease;
}

.qnr-dropdown-menu.show {
    display: block;
}

.qnr-dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s;
    border-bottom: 1px solid #f5f5f5;
    white-space: nowrap;
}

.qnr-dropdown-item:last-child {
    border-bottom: none;
}

.qnr-dropdown-item:hover {
    background: #f5f7fa;
    color: #1a73e8;
}

/* 响应式 */
@media (max-width: 768px) {
    .qnr-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .qnr-card-top {
        flex-direction: column;
        gap: 10px;
    }
    .qnr-card-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    .qnr-actions-right {
        width: 100%;
        justify-content: flex-start;
    }
    .qnr-create-row {
        flex-direction: column;
    }
    .qnr-create-field {
        min-width: 100%;
    }
    .qnr-create-btn,
    .btn-cancel-import {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .qnr-stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .qnr-stat-item {
        padding: 14px 12px;
    }
    .qnr-stat-num {
        font-size: 22px;
    }
    .qnr-card-body {
        padding: 14px;
    }
    .qnr-actions-left,
    .qnr-actions-right {
        flex-wrap: wrap;
        gap: 4px;
    }
    .qnr-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* ==============================
   数据卡片列表（替代表格溢出）
   ============================== */

.stats-mini-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fafbfc;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
}

.data-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #bbb;
}

.data-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.data-empty-state p {
    font-size: 14px;
    color: #999;
}

.data-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.data-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-color: #e0e0e0;
}

.data-card-expanded {
    box-shadow: 0 2px 12px rgba(26,115,232,0.08);
    border-color: #d2e3fc;
}

/* 主体行 */
.data-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.data-card-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 2;
    min-width: 0;
}

.data-card-id {
    font-size: 13px;
    color: #1a73e8;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 40px;
}

.data-card-user {
    font-size: 12px;
    color: #666;
    font-weight: 400;
    flex: 0 0 auto;
    padding: 0 6px;
    border-right: 1px solid #eee;
    margin-right: 4px;
}

.data-card-qnr {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-card-mid {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.data-card-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.data-card-time {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}
}

.data-card-actions {
    display: flex;
    gap: 4px;
}

.data-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    padding: 0;
}

.data-card-btn-edit:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
}

.data-card-btn-del {
    color: #999;
}

.data-card-btn-del:hover {
    background: #fce4e4;
    border-color: #e53935;
    color: #e53935;
}

.data-card-expand-icon {
    font-size: 12px;
    color: #ccc;
    transition: transform 0.25s;
    flex-shrink: 0;
}

.data-card-expanded .data-card-expand-icon {
    transform: rotate(180deg);
    color: #1a73e8;
}

/* 展开详情区 */
.data-card-detail {
    display: none;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
    animation: fadeSlideIn 0.25s ease;
}

.data-card-expanded .data-card-detail {
    display: block;
}

.data-card-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px 16px;
    padding: 14px 20px;
}

.detail-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dashed #eee;
}

.detail-item-full {
    grid-column: 1 / -1;
}

.detail-label {
    color: #999;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
}

.detail-value {
    color: #333;
    word-break: break-all;
}

/* 响应式 */
@media (max-width: 768px) {
    .data-card-main {
        flex-wrap: wrap;
        gap: 8px;
    }
    .data-card-mid {
        order: 3;
        width: 100%;
        padding-left: 42px;
    }
    .data-card-right {
        margin-left: auto;
    }
    .data-card-detail-grid {
        grid-template-columns: 1fr;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .data-card-left {
        flex: 1 1 100%;
    }
    .data-card-right {
        width: 100%;
        justify-content: flex-end;
    }
    .data-card-qnr {
        max-width: 120px;
    }
}

/* ==============================
   用户中心
   ============================== */

/* 用户中心 Header 微调 */
.uc-header .header-subtitle {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.75;
}

/* 用户中心 - 统计卡片 */
.uc-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.uc-stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px 14px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid #f0f2f5;
    transition: transform 0.2s, box-shadow 0.2s;
}

.uc-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.uc-stat-num {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}

.uc-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

.uc-stat-total .uc-stat-num { color: #1a3a5c; }
.uc-stat-pending .uc-stat-num { color: #1a73e8; }
.uc-stat-submitted .uc-stat-num { color: #e37400; }
.uc-stat-approved .uc-stat-num { color: #1e7e34; }

/* 用户中心 - 快速操作 */
.uc-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.uc-quick-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s;
    border: 1.5px solid transparent;
}

.uc-quick-fill {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,115,232,0.3);
}

.uc-quick-fill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,115,232,0.4);
    color: #fff;
}



.uc-quick-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* 用户中心 - 空状态 */
.uc-empty {
    background: #fff;
    border-radius: 16px;
    padding: 40px 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #f0f2f5;
    margin-bottom: 18px;
}

.uc-empty-icon {
    margin-bottom: 16px;
    opacity: 0.6;
}

.uc-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.uc-empty-desc {
    font-size: 13px;
    color: #94a3b8;
}

/* 用户中心 - 底部导航 */
.uc-bottom-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.uc-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    color: #1a3a5c;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s;
}

.uc-nav-btn:hover {
    border-color: #1a73e8;
    color: #1a73e8;
    background: #f8faff;
}

.uc-nav-logout {
    color: #94a3b8;
}

.uc-nav-logout:hover {
    color: #e53935;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Header 用户可点击链接 */
.header-user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    padding: 2px 8px 2px 2px;
    border-radius: 20px;
    transition: background 0.2s;
}

.header-user-link:hover {
    background: rgba(255,255,255,0.15);
}

/* ==============================
   问卷分配列表（前台）
   ============================== */

.assignment-list {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #f0f2f5;
}

.assignment-list-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 问卷列表表格 */
.assignment-table-header {
    display: flex;
    align-items: center;
    padding: 10px 12px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f2f5;
    margin-bottom: 4px;
}

.ath-name { flex: 1; min-width: 0; }
.ath-status { width: 80px; text-align: center; flex-shrink: 0; }
.ath-action { width: 90px; text-align: center; flex-shrink: 0; }

.assignment-row {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    border-radius: 10px;
    transition: all 0.2s;
    margin-bottom: 2px;
    border: 2px solid transparent;
    background: #fafbfc;
}

.assignment-row:last-child {
    margin-bottom: 0;
}

.assignment-row:hover {
    background: #f0f4ff;
    border-color: #d6e4ff;
    transform: translateX(2px);
}

.assignment-cell {
    display: flex;
    align-items: center;
}

.assignment-cell-name {
    flex: 1;
    min-width: 0;
}

.assignment-name-text {
    font-size: 14px;
    font-weight: 600;
    color: #1a3a5c;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignment-cell-status {
    width: 80px;
    justify-content: center;
    flex-shrink: 0;
}

.assignment-cell-action {
    width: 90px;
    justify-content: center;
    flex-shrink: 0;
}

/* 操作按钮 */
.assignment-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1.5px solid transparent;
}

.assignment-action-go {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,115,232,0.25);
}

.assignment-action-go:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26,115,232,0.35);
    color: #fff;
}

.assignment-action-edit {
    background: #fff;
    color: #e67e22;
    border-color: #f0c78e;
}

.assignment-action-edit:hover {
    background: #fff8f0;
    border-color: #e67e22;
    color: #e67e22;
    transform: translateY(-1px);
}

.assignment-action-pending {
    background: #fff;
    color: #7a8ba3;
    border-color: #dde3ea;
}

.assignment-action-pending:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #556475;
}

.assignment-action-view {
    background: #fff;
    color: #22c55e;
    border-color: #bbf7d0;
}

.assignment-action-view:hover {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #16a34a;
    transform: translateY(-1px);
}

.assignment-action-closed {
    background: #f5f5f5;
    color: #bbb;
    border-color: #e8e8e8;
    pointer-events: none;
    cursor: not-allowed;
}



/* ==============================
   协议签署 (agreement_sign)
   ============================== */

.agreement-sign-block {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.agreement-sign-block .agreement-box {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
    border-radius: 0;
}

.agreement-sign-block .agreement-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    background: #fafbfc;
}

.agreement-sign-block .agreement-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    background: #f9fafb;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.agreement-sign-block .agreement-check:hover {
    background: #f0f4ff;
}

.agreement-sign-block .agreement-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1a73e8;
}

/* 协议确认 (agreement) 保留兼容 */

.agreement-box {
    background: #f9fafb;
    border: 1.5px solid #e8edf2;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.agreement-content {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
}

.agreement-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    background: #f0f4ff;
    border-top: 1px solid #e0e7f0;
    transition: background 0.2s;
}

.agreement-check:hover {
    background: #e3ecfb;
}

.agreement-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1a73e8;
}

/* 签名板 */
.signature-pad-wrap {
    padding: 16px 20px;
    background: #fff;
}

.signature-pad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.signature-pad-label {
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.sig-clear-btn,
.sig-re-sign-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.sig-clear-btn:hover,
.sig-re-sign-btn:hover {
    background: #fee;
    border-color: #e53935;
    color: #e53935;
}

/* 签名按钮行：确认签字 + 清除重签 */
.sig-btn-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sig-confirm-btn {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(26,115,232,0.25);
}

.sig-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,0.35);
}

.sig-confirm-btn:active {
    transform: scale(0.96);
}

.signature-canvas-wrap {
    position: relative;
}

.signature-canvas {
    width: 100%;
    height: 160px;
    border: 2px dashed #d0d5dd;
    border-radius: 10px;
    cursor: crosshair;
    background: #fdfdfd;
    display: block;
    touch-action: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.signature-canvas:active,
.signature-canvas:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

/* 签名预览图 */
.signature-preview-wrap {
    text-align: center;
    padding: 10px 0;
}

.signature-preview-img {
    max-width: 100%;
    max-height: 140px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sig-re-sign-btn {
    display: inline-block;
    margin-top: 8px;
}

.sig-required-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #e53935;
}

/* 响应式 */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 200px;
    }

    .admin-main {
        margin-left: 200px;
    }

    .sidebar-brand {
        padding: 18px 14px;
    }

    .sidebar-logo {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .sidebar-title h2 {
        font-size: 14px;
    }

    .sidebar-nav-item {
        padding: 10px 12px;
        font-size: 13px;
    }

    .nav-icon {
        font-size: 16px;
    }

    .admin-header {
        padding: 16px 20px;
    }

    .admin-header h1 {
        font-size: 18px;
    }

    .admin-content {
        padding: 16px 20px 32px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 22px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .page-wrap {
        padding: 0 12px 30px;
    }

    .site-header {
        margin: 0 -12px 20px;
        padding: 20px 14px 18px;
    }

    .site-header h1 {
        font-size: 18px;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-user {
        width: 100%;
    }

    .survey-form {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .form-actions {
        flex-direction: column;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .sidebar-brand {
        width: 100%;
        padding: 8px 0;
        border-bottom: none;
        justify-content: space-between;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 4px;
        overflow-y: visible;
        gap: 4px;
    }

    .sidebar-nav-item {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 6px;
    }

    .sidebar-nav-item.active::before {
        display: none;
    }

    .sidebar-nav-item.active {
        background: #1a73e8;
        color: #fff;
    }

    .nav-icon {
        font-size: 14px;
        width: auto;
    }

    .sidebar-footer {
        display: none;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-header {
        padding: 12px 16px;
    }

    .admin-header h1 {
        font-size: 18px;
    }

    .admin-content {
        padding: 12px 14px 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 14px;
        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 10px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 11px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-col-left,
    .dashboard-col-right {
        gap: 12px;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    .type-grid {
        grid-template-columns: 1fr 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-links {
        width: 100%;
    }

    /* 登录页面响应式 */
    .login-page-body {
        align-items: flex-start;
        padding-top: 60px;
    }
    .login-page-wrap {
        padding: 20px 16px 30px;
    }
    .login-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    .login-site-title {
        font-size: 22px;
    }

    /* 问卷列表响应式 */
    .assignment-table-header {
        display: none;
    }
    .assignment-row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 14px 12px;
    }
    .assignment-cell-name {
        flex: 1 1 100%;
    }
    .assignment-cell-status {
        width: auto;
        justify-content: flex-start;
    }
    .assignment-cell-action {
        width: auto;
        justify-content: flex-start;
    }

    /* 用户中心响应式 */
    .uc-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .uc-stat-card {
        padding: 14px 10px;
    }
    .uc-stat-num {
        font-size: 24px;
    }
    .uc-quick-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .uc-bottom-nav {
        flex-direction: column;
    }
}

/* ==============================
   状态徽章
   ============================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge-sm {
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 10px;
}

.status-submitted {
    background: #e8f0fe;
    color: #1a73e8;
}

.status-reviewing {
    background: #fef7e0;
    color: #e37400;
}

.status-approved {
    background: #e6f4ea;
    color: #1e7e34;
}

.status-returned {
    background: #fce8e6;
    color: #c5221f;
}

.status-incomplete {
    background: #f0f0f0;
    color: #888;
}

.status-pending {
    background: #e8f0fe;
    color: #1a73e8;
}

.status-closed {
    background: #f0f0f0;
    color: #999;
}

.status-default {
    background: #f0f2f5;
    color: #666;
}

.status-draft {
    background: #f3e8ff;
    color: #7c3aed;
}

/* 暂存草稿按钮 */
.save-draft-btn {
    flex: 1;
    max-width: 140px;
    padding: 12px 16px;
    border: 1.5px dashed #c4b5fd;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #faf5ff;
    color: #7c3aed;
}

.save-draft-btn:hover {
    background: #ede9fe;
    border-color: #a78bfa;
    color: #6d28d9;
    transform: translateY(-1px);
}

.save-draft-btn:active {
    transform: scale(0.97);
}

.save-draft-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==============================
   状态通知卡片（前台）
   ============================== */

.status-notice-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border-left: 4px solid #1a73e8;
    align-items: flex-start;
}

.status-notice-approved {
    border-left-color: #34a853;
}

.status-notice-pending {
    border-left-color: #fbbc04;
}

.status-notice-returned {
    border-left-color: #e37400;
    background: #fffdf5;
}

.status-notice-submitted {
    border-left-color: #1a73e8;
    background: #f0f7ff;
}

.status-notice-closed {
    border-left-color: #9e9e9e;
    background: #f5f5f5;
}

.status-notice-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fb;
}

.status-notice-content {
    flex: 1;
}

.status-notice-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.status-notice-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 12px;
}

.status-notice-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #999;
    flex-wrap: wrap;
}

/* ==============================
   只读回答展示（前台）
   ============================== */

.readonly-response {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border: 1px solid #e8f0fe;
}

.readonly-response-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a73e8;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8f0fe;
}

.readonly-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 12px;
}

.readonly-item:last-child {
    border-bottom: none;
}

.readonly-label {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    min-width: 100px;
    flex-shrink: 0;
}

.readonly-value {
    font-size: 14px;
    color: #333;
    word-break: break-all;
    line-height: 1.6;
}

.readonly-empty {
    color: #ccc;
    font-style: italic;
}

/* ==============================
   回答详情页（后台）
   ============================== */

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 4px 20px;
}

.detail-info-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    gap: 8px;
    align-items: baseline;
}

.detail-info-full {
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 6px;
}

.detail-info-label {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 70px;
}

.detail-info-value {
    font-size: 14px;
    color: #333;
    word-break: break-all;
    line-height: 1.6;
}

/* 问卷题目列表 */
.response-question-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.response-question-item {
    background: #fafbfc;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 14px 18px;
    transition: border-color 0.2s;
}

.response-question-item:hover {
    border-color: #dde1e6;
}

.rq-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.rq-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e8f0fe;
    color: #1a73e8;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.rq-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.rq-type-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #f0f0f0;
    color: #999;
    font-family: monospace;
    flex-shrink: 0;
    margin-left: auto;
}

.rq-value {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    padding-left: 32px;
    word-break: break-all;
}

.rq-empty {
    color: #ccc;
    font-style: italic;
}

.rq-sig-indicator {
    color: #1a73e8;
    font-weight: 500;
}

.rq-pdf-download {
    display: inline-block;
    margin-left: 12px;
    padding: 4px 12px;
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.rq-pdf-download:hover {
    background: #ffe0b2;
    color: #bf360c;
    border-color: #ff9800;
}

.rq-agreement-indicator {
    color: #555;
}

.rq-agreement-indicator em {
    color: #ccc;
}

/* 附件列表 */
.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.attachment-item:hover {
    background: #f5f7fa;
    border-color: #e0e0e0;
    color: #1a73e8;
}

.attachment-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.attachment-name {
    flex: 1;
    word-break: break-all;
}

.attachment-size {
    font-size: 12px;
    color: #bbb;
    flex-shrink: 0;
}

/* 附件缩略图 */
.attachment-item-image {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
}

.attachment-thumb {
    width: 100%;
    max-width: 200px;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}

.attachment-thumb-table {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
    vertical-align: middle;
}

.attachment-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 编辑页附件列表 */
.edit-attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.edit-attachment-image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #1a73e8;
    font-size: 13px;
    max-width: 160px;
}

.edit-attachment-image-item:hover .attachment-thumb {
    border-color: #1a73e8;
}

.edit-attachment-name {
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
}

/* 审核操作 */
.review-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.review-status-approved,
.review-status-returned {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    padding: 8px 14px;
    border-radius: 8px;
    background: #f5f7fa;
}

.review-status-approved {
    background: #e6f4ea;
    color: #1e7e34;
}

.review-status-returned {
    background: #fce8e6;
    color: #c5221f;
}

.review-icon {
    font-size: 18px;
}

/* 查看按钮样式 */
.data-card-btn-view {
    color: #1a73e8;
}

.data-card-btn-view:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
}

/* ==============================
   分析页 - 状态筛选标签
   ============================== */

.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: #666;
    background: #f5f5f5;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.filter-tag:hover {
    background: #e8f0fe;
    color: #1a73e8;
}

.filter-tag-active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

.filter-tag-active:hover {
    background: #1557b0;
    color: #fff;
}

/* ==============================
   分析页 - 小号统计卡片
   ============================== */

.stat-card-sm .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.stat-card-sm .stat-value {
    font-size: 18px;
}

.stat-card-sm .stat-label {
    font-size: 11px;
}

/* 可点击的统计卡片 */
a.stat-card {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
a.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ==============================
   分析页 - 回答列表表格
   ============================== */

.analysis-response-table-wrap {
    overflow-x: auto;
}

.analysis-response-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.analysis-response-table thead {
    background: #f8f9fb;
    border-bottom: 2px solid #eef0f3;
}

.analysis-response-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #888;
    font-size: 12px;
    white-space: nowrap;
}

.analysis-response-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

.analysis-row {
    cursor: pointer;
    transition: background 0.15s;
}

.analysis-row:hover {
    background: #f8f9fb;
}

.cell-id {
    font-size: 12px;
    color: #bbb;
    font-weight: 600;
    font-family: monospace;
}

.cell-answer {
    color: #555;
    font-size: 12px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-time {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

.cell-actions {
    white-space: nowrap;
}

.analysis-actions-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ==============================
   分析页 - 分页
   ============================== */

.analysis-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    font-size: 13px;
    color: #999;
}

.pagination-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ==============================
   编辑模式 - 已有附件展示
   ============================== */

.existing-files-section {
    background: #f8f9fb;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.existing-files-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.existing-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.existing-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s;
    max-width: 280px;
}

.existing-file-item:hover {
    border-color: #d0d5dd;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.existing-file-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.existing-file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #f0f4ff;
    border-radius: 6px;
    flex-shrink: 0;
}

.existing-file-name {
    flex: 1;
    min-width: 0;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.existing-file-delete-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #999;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    transition: all 0.15s;
}

.existing-file-delete-btn:hover {
    background: #fce4e4;
    border-color: #e53935;
    color: #e53935;
}

.existing-file-item.deleted {
    opacity: 0.4;
    text-decoration: line-through;
    pointer-events: none;
}

/* ==============================
   条件显示逻辑（任意题型通用属性）
   ============================== */

/* 含逻辑配置的表单组过渡动画 */
.form-group.logic-group {
    transition: opacity 0.3s ease;
}

/* 逻辑配置面板 */
#logicConfigRow {
    transition: opacity 0.2s;
}

/* 逻辑配置面板展开 */
#logicConfigPanel {
    animation: logicFadeIn 0.3s ease;
}

@keyframes logicFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 逻辑标签 */
.tag-logic {
    background: #fff8e1;
    color: #e37400;
    border: 1px solid #ffc107;
}

/* ==============================
   数据分析模块
   ============================== */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.chart-card {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s;
}

.chart-card:hover {
    border-color: #d0d5dd;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fafbfc;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    user-select: none;
    gap: 8px;
}

.chart-card-header:hover {
    background: #f3f5f8;
}

.chart-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.chart-card-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8f0fe;
    color: #1a73e8;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.chart-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.chart-card-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.chart-badge-radio, .chart-badge-select {
    background: #e8f0fe;
    color: #1a73e8;
}

.chart-badge-checkbox {
    background: #e6f4ea;
    color: #1e7e34;
}

.chart-badge-rating {
    background: #fef7e0;
    color: #e37400;
}

.chart-badge-matrix {
    background: #f3e8fd;
    color: #8e24aa;
}

.chart-badge-sort {
    background: #fce4ec;
    color: #c51162;
}

.chart-card-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.chart-card-count {
    font-size: 12px;
    color: #999;
}

.chart-collapse-icon {
    font-size: 10px;
    color: #bbb;
    transition: transform 0.25s;
}

.chart-collapsed .chart-collapse-icon {
    transform: rotate(-90deg);
}

.chart-card-body {
    padding: 16px;
    transition: all 0.3s;
}

.chart-collapsed .chart-card-body {
    display: none;
}

.chart-wrapper {
    position: relative;
    height: 260px;
    margin-bottom: 16px;
}

.chart-legend-table {
    border-top: 1px solid #f5f5f5;
    padding-top: 12px;
}

.chart-legend-table table {
    width: 100%;
    border-collapse: collapse;
}

.chart-legend-table th {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    padding: 4px 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.chart-legend-table td {
    font-size: 12px;
    color: #555;
    padding: 6px 8px;
    border-bottom: 1px solid #fafafa;
    vertical-align: middle;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.legend-bar-wrap {
    display: inline-block;
    width: 100%;
    max-width: 60px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 4px;
    overflow: hidden;
}

.legend-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.legend-pct {
    font-size: 11px;
    color: #888;
    vertical-align: middle;
    width: 36px;
    display: inline-block;
    text-align: right;
}

.chart-avg-score {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    min-width: 36px;
    text-align: center;
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================
   网站设置页 - 系统信息面板
   ============================== */

/* 头部操作按钮 */
.sys-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sys-expand-all-btn {
    padding: 5px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fb;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sys-expand-all-btn:hover {
    background: #e8f0fe;
    border-color: #c5d9f7;
    color: #1a73e8;
}

/* ====== 健康评分仪表盘 ====== */
.sys-health-gauge {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4f8 100%);
    border-radius: 14px;
    border: 1px solid #eef0f3;
}

.sys-gauge-ring {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.sys-gauge-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.sys-gauge-arc {
    transition: stroke-dasharray 0.8s ease;
}

.sys-gauge-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sys-gauge-score {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.sys-gauge-unit {
    font-size: 11px;
    color: #999;
    font-weight: 500;
    margin-top: 2px;
}

.sys-gauge-info {
    flex: 1;
    min-width: 0;
}

.sys-gauge-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.sys-gauge-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}

.sys-gauge-ok {
    color: #1e7e34;
    font-weight: 600;
}

.sys-gauge-fail {
    color: #c5221f;
    font-weight: 600;
}

/* ====== 分类面板 ====== */
.sys-info-panel {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sys-info-section {
    border: 1px solid #eef0f3;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.sys-info-section:hover {
    border-color: #dde1e6;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.sys-info-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: #fafbfc;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    border-bottom: 1px solid transparent;
}

.sys-info-section-title:hover {
    background: #f0f4f8;
}

.sys-section-arrow {
    font-size: 9px;
    color: #bbb;
    width: 12px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.sys-section-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.sys-section-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.sys-section-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
    flex-shrink: 0;
}

.sys-badge-ok {
    background: #e6f4ea;
    color: #1e7e34;
}

.sys-badge-warn {
    background: #fce8e6;
    color: #c5221f;
}

/* ====== 条目行 ====== */
.sys-info-items {
    display: flex;
    flex-direction: column;
}

.sys-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    gap: 12px;
    transition: background 0.15s;
    border-bottom: 1px solid #f5f5f7;
}

.sys-info-item:last-child {
    border-bottom: none;
}

.sys-info-item:hover {
    background: #fafcfd;
}

.sys-info-item-warn {
    background: #fffcf5;
}

.sys-info-item-warn:hover {
    background: #fff9eb;
}

.sys-info-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sys-info-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-ok {
    background: #34a853;
    box-shadow: 0 0 0 3px rgba(52,168,83,0.15);
}

.dot-warn {
    background: #ea4335;
    box-shadow: 0 0 0 3px rgba(234,67,53,0.15);
    animation: dotPulse 2s ease infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(234,67,53,0.15); }
    50% { box-shadow: 0 0 0 6px rgba(234,67,53,0.06); }
}

.sys-info-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.sys-info-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sys-info-value {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.sys-info-value-ok {
    color: #1e8e3e;
    background: #e6f4ea;
}

.sys-info-value-warn {
    color: #c5221f;
    background: #fce8e6;
}

.sys-info-hint {
    font-size: 11px;
    color: #b0b8c1;
    white-space: nowrap;
}

/* ====== 状态栏 ====== */
.sys-info-status-bar {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sys-status-icon {
    font-size: 16px;
}

.sys-status-ok {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #ceead6;
}

.sys-status-warn {
    background: #fef7e0;
    color: #92600e;
    border: 1px solid #feefc3;
}

.sys-status-warn strong {
    color: #c5221f;
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
    .sys-health-gauge {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }
    .sys-gauge-ring {
        width: 80px;
        height: 80px;
    }
    .sys-gauge-score {
        font-size: 24px;
    }
    .sys-gauge-stats {
        justify-content: center;
    }
    .sys-info-item {
        flex-wrap: wrap;
        gap: 6px;
    }
    .sys-info-item-right {
        margin-left: 18px;
    }
    .sys-info-hint {
        display: none;
    }
}

/* ====== Logo / Icon 上传配置 ====== */
.logo-upload-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.logo-preview-box {
    width: 200px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fafbfc;
    flex-shrink: 0;
}

.logo-preview-box-icon {
    width: 64px;
    min-height: 64px;
}

.logo-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
    color: #bbb;
}

.logo-placeholder-icon {
    font-size: 28px;
}

.logo-placeholder-text {
    font-size: 11px;
    font-weight: 500;
}

.logo-upload-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.logo-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.logo-upload-btn:hover {
    background: #f0f4f8;
    border-color: #1a73e8;
    color: #1a73e8;
}

.logo-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    background: #fff;
    color: #c62828;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.logo-remove-btn:hover {
    background: #ffebee;
    border-color: #ef5350;
}

.logo-upload-hint {
    font-size: 11px;
    color: #aaa;
    width: 100%;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .logo-upload-row {
        flex-direction: column;
    }
    .logo-preview-box {
        width: 100%;
        max-width: 200px;
    }
}

/* ====== 系统消息模块 ====== */
.sys-message-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    background: #e8f0fe;
    color: #1a73e8;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.sys-message-badge:hover {
    background: #d2e3fc;
}

.sys-message-intro {
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f8f9fb;
    border-radius: 8px;
    border-left: 3px solid #1a73e8;
}
.sys-message-intro p {
    font-size: 12.5px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.sys-message-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sys-message-item {
    border: 1px solid #eef0f3;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.sys-message-item:hover {
    border-color: #dde1e6;
}

.sys-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fafbfc;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.sys-msg-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.sys-msg-label {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}
.sys-msg-scene {
    font-size: 11.5px;
    color: #999;
    margin-left: auto;
    white-space: nowrap;
}

.sys-msg-textarea {
    display: block;
    width: 100%;
    margin: 12px 16px 8px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: #333;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    font-family: inherit;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
}
.sys-msg-textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}
.sys-msg-textarea::placeholder {
    color: #c0c4cc;
}

/* 预览卡片 */
.sys-msg-preview {
    margin: 0 16px 12px;
    animation: msgPreviewFadeIn 0.3s ease;
}
@keyframes msgPreviewFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.sys-msg-preview-card {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px dashed #d0d0d0;
}
.sys-msg-preview-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.msg-preview-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    border-radius: 50%;
    flex-shrink: 0;
}
.msg-preview-body {
    flex: 1;
    min-width: 0;
}
.msg-preview-body h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px;
}
.msg-preview-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    word-break: break-word;
}

.sys-msg-hint {
    padding: 8px 16px 12px;
    font-size: 11.5px;
    color: #999;
    border-top: 1px solid #f5f5f5;
}

/* 旧版 settings-info 样式（保留兼容） */
.settings-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.settings-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.settings-info-item:last-child,
.settings-info-item:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
}

.settings-info-label {
    color: #888;
    font-weight: 500;
}

.settings-info-value {
    color: #333;
    font-weight: 600;
}

.settings-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f7fa;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    transition: background 0.2s, transform 0.15s;
    border: 1px solid #eef0f3;
}

.settings-action-btn:hover {
    background: #e8f0fe;
    color: #1a73e8;
    border-color: #c5d9f7;
    transform: translateY(-1px);
}

.required-mark {
    color: #e53935;
    font-weight: 700;
}

/* ==============================
   性能与美化增强
   ============================== */

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 仪表盘卡片入场动画 */
.stats-grid .stat-card {
    animation: fadeInUp 0.4s ease both;
}
.stats-grid .stat-card:nth-child(1) { animation-delay: 0s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.15s; }

.dashboard-card {
    animation: fadeInUp 0.5s ease both;
}

.qnr-mini-card {
    animation: fadeInLeft 0.3s ease both;
}
.qnr-mini-card:nth-child(1) { animation-delay: 0s; }
.qnr-mini-card:nth-child(2) { animation-delay: 0.04s; }
.qnr-mini-card:nth-child(3) { animation-delay: 0.08s; }
.qnr-mini-card:nth-child(4) { animation-delay: 0.12s; }
.qnr-mini-card:nth-child(5) { animation-delay: 0.16s; }

.data-card {
    animation: fadeInUp 0.3s ease both;
}
.data-card:nth-child(1) { animation-delay: 0s; }
.data-card:nth-child(2) { animation-delay: 0.03s; }
.data-card:nth-child(3) { animation-delay: 0.06s; }
.data-card:nth-child(4) { animation-delay: 0.09s; }
.data-card:nth-child(5) { animation-delay: 0.12s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 优化焦点环（无障碍 + 美观） */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 1px;
    border-radius: 4px;
}

/* 减弱动画偏好（尊重用户设置） */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* 打印样式 */
@media print {
    body { background: #fff; color: #000; }
    .qnr-mini-links, .data-card-actions, .card-actions,
    .export-group, .pagination, .recent-col-time,
    button, .action-link { display: none !important; }
    .dashboard-card, .stat-card, .qnr-mini-card,
    .data-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}
