/* ===== Form Page Styles ===== */

        :root {
            --primary: #1a56db;
            --primary-hover: #1347b8;
            --primary-light: #e8f0fe;
            --bg: #f0f4f8;
            --card-bg: #ffffff;
            --text: #1a1a2e;
            --text-secondary: #5f6b7a;
            --border: #dde1e8;
            --border-focus: #1a56db;
            --error: #d93025;
            --success: #0d7d44;
            --warning: #e6a817;
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
            --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
            --radius: 12px;
            --radius-sm: 7px;
            --radius-xs: 5px;
            --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
            --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei',
                'Helvetica Neue', sans-serif;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: var(--font-stack);
            background: linear-gradient(170deg, #eef2f7 0%, #f4f7fa 25%, #f0f3f8 50%, #e8ecf3 100%);
            background-attachment: fixed;
            min-height: 100vh;
            color: var(--text);
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            padding-bottom: 40px;
        }

        body::before {
            content: '';
            position: fixed;
            top: -200px;
            right: -160px;
            width: 600px;
            height: 600px;
            background: radial-gradient(circle, rgba(26, 86, 219, 0.05) 0%, transparent 70%);
            border-radius: 50%;
            pointer-events: none;
            z-index: 0;
        }

        body::after {
            content: '';
            position: fixed;
            bottom: -180px;
            left: -120px;
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, rgba(26, 86, 219, 0.03) 0%, transparent 70%);
            border-radius: 50%;
            pointer-events: none;
            z-index: 0;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px 14px 50px;
            position: relative;
            z-index: 1;
        }

        /* 头部 */
        .header {
            text-align: center;
            margin-bottom: 22px;
            padding: 10px 0;
        }

        .header .icon-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, #e0eaff, #c8d9f8);
            margin-bottom: 8px;
            font-size: 26px;
            box-shadow: var(--shadow-sm);
        }

        .header h1 {
            font-size: clamp(1.2rem, 2.2vw, 1.5rem);
            font-weight: 700;
            color: #111827;
            letter-spacing: -0.3px;
        }

        .header .subtitle {
            color: var(--text-secondary);
            font-size: 0.85rem;
            margin-top: 2px;
        }

        /* 卡片 */
        .card {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: clamp(18px, 3.5vw, 28px);
            box-shadow: var(--shadow-md);
            margin-bottom: 16px;
            border: 1px solid #e8ecf1;
            transition: all var(--transition);
            position: relative;
        }

        .card:hover {
            box-shadow: var(--shadow-lg);
        }

        /* 人员类型选择器 */
        .type-selector {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
            margin-bottom: 4px;
        }

        .type-option {
            position: relative;
            cursor: pointer;
        }

        .type-option input {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
            pointer-events: none;
        }

        .type-option .type-label {
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 13px 6px;
            border-radius: var(--radius-sm);
            border: 2px solid var(--border);
            background: #fafbfc;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-secondary);
            transition: all var(--transition);
            user-select: none;
            min-height: 50px;
            cursor: pointer;
            letter-spacing: -0.2px;
            gap: 5px;
            line-height: 1.3;
        }

        .type-option .type-icon {
            font-size: 1rem;
            flex-shrink: 0;
        }

        .type-option input:checked+.type-label {
            background: var(--primary-light);
            border-color: var(--primary);
            color: var(--primary);
            box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.08);
        }

        .type-option .type-label:hover {
            border-color: #bcc7d6;
            background: #f2f5f9;
        }

        .type-option input:checked+.type-label:hover {
            background: var(--primary-light);
            border-color: var(--primary);
        }

        /* 区块标题 */
        .section-title {
            font-size: 0.95rem;
            font-weight: 700;
            color: #1a1a2e;
            margin-bottom: 16px;
            padding-bottom: 9px;
            border-bottom: 2px solid #eef1f6;
            display: flex;
            align-items: center;
            gap: 7px;
            letter-spacing: -0.1px;
        }

        .section-title .dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--primary);
            flex-shrink: 0;
        }

        /* 表单网格 */
        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px 18px;
        }

        .form-grid.col-1 {
            grid-template-columns: 1fr;
        }

        .form-grid.col-3 {
            grid-template-columns: 1fr 1fr 1fr;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .form-group.full-width {
            grid-column: 1 / -1;
        }

        .form-group label {
            font-size: 0.82rem;
            font-weight: 600;
            color: #333;
            letter-spacing: -0.1px;
            display: flex;
            align-items: center;
            gap: 3px;
            flex-wrap: wrap;
        }

        .form-group label .required-star {
            color: var(--error);
            font-weight: 700;
            font-size: 0.9rem;
            line-height: 1;
        }

        .form-group label .optional-tag {
            font-size: 0.7rem;
            color: #999;
            font-weight: 400;
            background: #f5f6f8;
            padding: 1px 7px;
            border-radius: 10px;
            margin-left: 2px;
        }

        .form-group .hint {
            font-size: 0.72rem;
            color: #999;
            font-weight: 400;
        }

        input[type="text"],
        input[type="tel"],
        input[type="email"],
        input[type="date"],
        select {
            width: 100%;
            padding: 10px 13px;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-xs);
            font-size: 0.88rem;
            font-family: inherit;
            color: var(--text);
            background: #fafbfc;
            transition: all var(--transition);
            outline: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            min-height: 42px;
        }

        select {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%235f6b7a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 11px center;
            padding-right: 34px;
            cursor: pointer;
        }

        input:focus,
        select:focus {
            border-color: var(--border-focus);
            box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.07);
            background: #fff;
            outline: none;
        }

        input.error,
        select.error {
            border-color: var(--error);
            box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.06);
            background: #fffafa;
        }

        input[readonly],
        select[disabled] {
            background: #f1f3f6;
            color: #555;
            cursor: default;
            border-style: solid;
        }

        .error-msg {
            font-size: 0.72rem;
            color: var(--error);
            display: none;
            align-items: center;
            gap: 3px;
        }

        .error-msg.show {
            display: flex;
        }

        /* 单选按钮组 */
        .radio-group {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
            min-height: 42px;
        }

        .radio-group .radio-item {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            font-size: 0.84rem;
            padding: 7px 14px;
            border-radius: 20px;
            border: 1.5px solid var(--border);
            background: #fafbfc;
            transition: all var(--transition);
            user-select: none;
            font-weight: 500;
        }

        .radio-group .radio-item:hover {
            border-color: #bcc7d6;
            background: #f5f7fa;
        }

        .radio-group input[type="radio"] {
            accent-color: var(--primary);
            width: 16px;
            height: 16px;
            cursor: pointer;
        }

        .radio-group .radio-item:has(input:checked) {
            background: var(--primary-light);
            border-color: var(--primary);
            color: var(--primary);
            font-weight: 600;
        }

        /* 地址组 */
        .address-group {
            background: #f9fafc;
            border-radius: var(--radius-sm);
            padding: 15px 16px;
            border: 1px dashed #dde3ea;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px 14px;
            transition: all var(--transition);
        }

        .address-group .full-addr {
            grid-column: 1 / -1;
        }

        .address-group .same-as-above {
            grid-column: 1 / -1;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.82rem;
            color: var(--primary);
            cursor: pointer;
            user-select: none;
            font-weight: 500;
        }

        .address-group .same-as-above input {
            width: 15px;
            height: 15px;
            accent-color: var(--primary);
            cursor: pointer;
        }

        /* 照片上传 */
        .photo-upload-area {
            border: 2px dashed #c8d3e0;
            border-radius: var(--radius-sm);
            padding: 22px 18px;
            text-align: center;
            cursor: pointer;
            transition: all var(--transition);
            background: #fafbfc;
            position: relative;
            min-height: 150px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .photo-upload-area:hover {
            border-color: var(--primary);
            background: #f8faff;
        }

        .photo-upload-area.has-image {
            border-style: solid;
            border-color: #c8d3e0;
            padding: 10px;
            min-height: auto;
        }

        .photo-upload-area .upload-icon {
            font-size: 38px;
            opacity: 0.45;
            transition: all var(--transition);
        }

        .photo-upload-area.has-image .upload-icon {
            display: none;
        }

        .photo-upload-area .upload-text {
            font-size: 0.85rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .photo-upload-area .upload-hints {
            font-size: 0.72rem;
            color: #999;
            line-height: 1.5;
        }

        .photo-upload-area img.preview {
            max-width: 100%;
            max-height: 260px;
            border-radius: 4px;
            object-fit: contain;
            display: none;
        }

        .photo-upload-area.has-image img.preview {
            display: block;
        }

        .photo-upload-area.has-image .upload-text,
        .photo-upload-area.has-image .upload-hints {
            display: none;
        }

        .photo-upload-area .remove-photo {
            position: absolute;
            top: 8px;
            right: 10px;
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            cursor: pointer;
            font-size: 15px;
            display: none;
            align-items: center;
            justify-content: center;
            color: #666;
            z-index: 2;
            transition: all var(--transition);
            line-height: 1;
        }

        .photo-upload-area.has-image .remove-photo {
            display: flex;
        }

        .photo-upload-area .remove-photo:hover {
            background: #fef0f0;
            border-color: #e88;
            color: #d33;
        }

        .photo-requirements {
            font-size: 0.73rem;
            color: #888;
            margin-top: 7px;
            display: flex;
            flex-wrap: wrap;
            gap: 6px 14px;
            list-style: none;
            padding: 0;
        }

        .photo-requirements li {
            display: flex;
            align-items: center;
            gap: 3px;
        }

        .photo-requirements li::before {
            content: '•';
            color: var(--primary);
            font-weight: bold;
            font-size: 1.1rem;
            line-height: 1;
        }

        .photo-validation-result {
            font-size: 0.76rem;
            margin-top: 5px;
            font-weight: 500;
        }

        .photo-validation-result.pass {
            color: var(--success);
        }

        .photo-validation-result.fail {
            color: var(--error);
        }

        /* 复选框行 */
        .checkbox-row {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 0.84rem;
            font-weight: 500;
            cursor: pointer;
            user-select: none;
            padding: 6px 0;
        }

        .checkbox-row input {
            width: 16px;
            height: 16px;
            accent-color: var(--primary);
            cursor: pointer;
        }

        /* 固定值显示 */
        .fixed-value {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 13px;
            background: #f1f4f8;
            border-radius: var(--radius-xs);
            border: 1.5px solid #dde3ea;
            font-weight: 600;
            color: #444;
            font-size: 0.88rem;
            min-height: 42px;
        }

        .fixed-value .fixed-icon {
            font-size: 0.9rem;
            color: var(--primary);
        }

        /* 按钮 */
        .btn-row {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 6px;
        }

        .btn {
            padding: 11px 32px;
            border-radius: 24px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            border: none;
            transition: all var(--transition);
            letter-spacing: 0.2px;
            min-width: 130px;
            font-family: inherit;
        }

        .btn-primary {
            background: var(--primary);
            color: #fff;
            box-shadow: 0 2px 8px rgba(26, 86, 219, 0.28);
        }

        .btn-primary:hover {
            background: var(--primary-hover);
            box-shadow: 0 4px 14px rgba(26, 86, 219, 0.38);
            transform: translateY(-1px);
        }

        .btn-secondary {
            background: #fff;
            color: var(--text);
            border: 1.5px solid var(--border);
        }

        .btn-secondary:hover {
            background: #f5f7fa;
            border-color: #bcc7d6;
        }

        .btn:active {
            transform: scale(0.96);
        }

        /* 提示条 */
        .info-banner {
            background: #fffdf5;
            border: 1px solid #f0e4a8;
            border-radius: var(--radius-xs);
            padding: 10px 14px;
            font-size: 0.78rem;
            color: #7a6e3a;
            display: flex;
            align-items: flex-start;
            gap: 7px;
            margin-bottom: 14px;
            line-height: 1.5;
        }

        .info-banner .info-icon {
            flex-shrink: 0;
            font-size: 1rem;
        }

        /* Toast */
        .toast {
            position: fixed;
            top: 18px;
            left: 50%;
            transform: translateX(-50%) translateY(-130px);
            background: #1a1a2e;
            color: #fff;
            padding: 11px 22px;
            border-radius: 24px;
            font-size: 0.85rem;
            font-weight: 500;
            z-index: 9999;
            pointer-events: none;
            transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
            white-space: nowrap;
        }

        .toast.show {
            transform: translateX(-50%) translateY(0);
        }

        .toast.success {
            background: #0d7d44;
        }

        .toast.error {
            background: #d93025;
        }

        /* 隐藏表单 */
        .form-panel {
            animation: fadeSlideIn 0.35s ease;
        }

        @keyframes fadeSlideIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .hidden-file-input {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
            pointer-events: none;
        }

        /* 响应式 */
        @media (max-width: 768px) {
            .type-selector {
                grid-template-columns: repeat(2, 1fr);
                gap: 6px;
            }

            .type-option .type-label {
                padding: 10px 5px;
                font-size: 0.74rem;
                min-height: 42px;
                border-radius: var(--radius-xs);
            }

            .form-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .form-grid.col-3 {
                grid-template-columns: 1fr 1fr;
            }

            .address-group {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .radio-group {
                gap: 6px;
            }

            .radio-group .radio-item {
                padding: 6px 11px;
                font-size: 0.78rem;
            }

            .btn {
                padding: 10px 22px;
                font-size: 0.88rem;
                min-width: 110px;
            }

            .card {
                padding: 14px;
            }

            .container {
                padding: 10px 6px 36px;
            }

            .header h1 {
                font-size: 1.15rem;
            }

            .photo-upload-area {
                min-height: 120px;
                padding: 16px 12px;
            }
        }

        @media (max-width: 400px) {
            .type-selector {
                grid-template-columns: 1fr 1fr;
                gap: 5px;
            }

            .type-option .type-label {
                font-size: 0.7rem;
                padding: 8px 3px;
                min-height: 36px;
            }

            .form-grid.col-3 {
                grid-template-columns: 1fr;
            }

            .radio-group {
                flex-direction: column;
                gap: 5px;
            }

            .radio-group .radio-item {
                width: 100%;
                justify-content: center;
            }
        }

        @media (min-width: 1024px) {
            .container {
                max-width: 840px;
            }

            .form-grid {
                gap: 18px 22px;
            }
        }

        ::-webkit-scrollbar {
            width: 5px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: #cdd4de;
            border-radius: 3px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #aab4c0;
        }
    

