* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #111827;
    --primary-dark: #0f172a;
    --bg: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --card: rgba(255, 255, 255, 0.98);
    --border: #e5e7eb;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    --line: #edf0f5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 24px;
}

body,
html {
    overflow-x: hidden;
}

.page-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    color: var(--text);
    border-radius: 28px;
    padding: 30px 34px;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    border: 1px solid var(--line);
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -20% -55% auto;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(17, 24, 39, 0.04), transparent 68%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    margin-bottom: 14px;
    color: #374151;
}

.hero-panel h1 {
    font-size: 34px;
    margin-bottom: 10px;
    letter-spacing: -0.6px;
}

.hero-panel .subtitle {
    font-size: 16px;
    color: var(--muted);
    max-width: 720px;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    background: var(--card);
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
}

form {
    display: block;
}

header {
    background: #ffffff;
    color: var(--text);
    padding: 24px 30px 22px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

header h1 {
    font-size: 26px;
    margin-bottom: 8px;
    letter-spacing: -0.4px;
}

.subtitle {
    font-size: 15px;
    color: var(--muted);
}

.form-section {
    padding: 28px 30px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 20px;
    color: #0f172a;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.form-section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 76px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
}

.form-section h3 {
    font-size: 18px;
    color: #374151;
    margin: 24px 0 14px 0;
}

.hint-text {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 15px;
}

/* 护照上传 */
.passport-upload-section {
    margin-bottom: 30px;
}

.upload-container {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.upload-container:hover {
    border-color: #d1d5db;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.upload-label {
    cursor: pointer;
    display: block;
}

.upload-icon {
    font-size: 42px;
    margin-bottom: 10px;
    filter: grayscale(1);
}

.upload-text {
    font-size: 16px;
    color: #111827;
    font-weight: 700;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 13px;
    color: #6b7280;
}

.upload-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}

.upload-status.success {
    background: #d4edda;
    color: #155724;
}

.upload-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* 表单行 */
.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 600;
}

.required {
    color: #f56c6c;
    margin-left: 3px;
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 14px;
    transition: all 0.25s ease;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #111827;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
    transform: translateY(-1px);
}

.form-group input[readonly] {
    background-color: #f8fafc;
    cursor: not-allowed;
}

/* 职业单选按钮组 */
.occupation-radio-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.occupation-radio {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.occupation-radio:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.occupation-radio input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.occupation-radio input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.occupation-radio:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.occupation-radio span {
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
}

/* 动态列表项 */
.companion-item,
.family-item {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    position: relative;
    background: #fafafa;
}

.companion-item h4,
.family-item h4 {
    margin-top: 0;
    color: #667eea;
}

.remove-companion-btn,
.remove-family-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.remove-companion-btn:hover,
.remove-family-btn:hover {
    background: #d32f2f;
}

/* 按钮 */
.form-actions {
    padding: 28px 30px 34px;
    display: flex;
    gap: 14px;
    justify-content: center;
    background: #ffffff;
    border-top: 1px solid var(--line);
}

.btn-primary,
.btn-secondary {
    padding: 13px 28px;
    font-size: 15px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 700;
    min-width: 140px;
}

.btn-primary {
    background: #111827;
    color: white;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #0f172a;
    box-shadow: 0 16px 32px rgba(17, 24, 39, 0.22);
}

.btn-secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 18px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    text-align: center;
    position: relative;
    animation: slideDown 0.3s ease;
}

/* 大尺寸模态框 */
.modal-content.large {
    max-width: 1000px;
    margin: 3% auto;
    padding: 0;
    text-align: left;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* 模态框头部 */
.modal-header {
    padding: 24px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 300;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* 模态框主体 */
.modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    background: #f8f9fb;
}

/* 自定义滚动条 */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
    transition: background 0.3s;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 详情容器 */
.detail-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 详情区块 */
.detail-section {
    background: #ffffff;
    border-radius: 10px;
    padding: 24px;
    border: 1px solid #e8ecf0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.detail-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d0d7de;
}

/* 主标题 */
.section-title {
    margin: 0 0 20px 0;
    color: #1890ff;
    font-size: 17px;
    font-weight: 600;
    border-bottom: 2px solid #1890ff;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
}

.section-title::before {
    content: '📋';
    margin-right: 8px;
    font-size: 18px;
}

/* 子标题 */
.subsection-title {
    margin: 24px 0 16px 0;
    color: #667eea;
    font-size: 15px;
    font-weight: 600;
    padding-left: 12px;
    border-left: 4px solid #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%);
    padding: 8px 12px;
    border-radius: 4px;
}

/* 详情网格 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1.4;
}

.detail-item span {
    font-size: 14px;
    color: #1f2937;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 8px;
    min-height: 42px;
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    transition: all 0.25s ease;
    font-weight: 500;
    word-break: break-word;
}

.detail-item span:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 模态框操作按钮 */
.modal-actions {
    padding: 20px 30px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* 详情编辑输入框 */
.detail-edit-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    font-weight: 500;
    color: #1f2937;
}

.detail-edit-input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.detail-edit-input:hover {
    border-color: #764ba2;
}

.detail-edit-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* 按钮样式增强 */
.btn-success {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(82, 196, 26, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.35);
    background: linear-gradient(135deg, #389e0d 0%, #237804 100%);
}

.btn-success:active {
    transform: translateY(0);
}

/* 改进按钮样式 */
.btn-primary,
.btn-secondary {
    padding: 10px 24px;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 16px;
    margin: 10px 0;
    color: #555;
}

.modal-content strong {
    color: #667eea;
    font-size: 18px;
}

/* 加载动画 */
.loading {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: white;
    margin-top: 20px;
    font-size: 16px;
}

/* 通知消息动画 */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 响应式 */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .page-shell {
        max-width: 100%;
    }

    .hero-panel {
        padding: 22px 18px;
        border-radius: 20px;
        margin-bottom: 12px;
    }

    .hero-panel h1 {
        font-size: 24px;
    }

    .container {
        border-radius: 20px;
    }

    header {
        padding: 20px 18px 18px;
    }

    header h1 {
        font-size: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .occupation-radio-group {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 20px 18px;
    }

    .form-section h2 {
        font-size: 18px;
    }

    .form-section h3 {
        font-size: 16px;
    }

    .form-actions {
        flex-direction: column;
        padding: 20px 18px 24px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 13px 20px;
        min-width: 0;
    }

    .notification {
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }

    /* 详情网格响应式 */
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .detail-section {
        padding: 18px;
        border-radius: 8px;
    }

    .section-title {
        font-size: 15px;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }

    .section-title::before {
        font-size: 16px;
        margin-right: 6px;
    }

    .subsection-title {
        font-size: 14px;
        margin: 18px 0 12px 0;
        padding: 6px 10px;
    }

    .detail-item label {
        font-size: 11px;
        letter-spacing: 0.6px;
    }

    .detail-item span {
        font-size: 13px;
        padding: 10px 12px;
        min-height: 38px;
    }

    .modal-content.large {
        width: 96%;
        margin: 2% auto;
        max-height: 96vh;
        border-radius: 10px;
    }

    .modal-header {
        padding: 18px 20px;
        border-radius: 10px 10px 0 0;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 24px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-actions {
        padding: 16px 20px;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-success {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    .detail-container {
        gap: 16px;
    }
}

/* Element Plus 风格增强 */
.el-card,
.el-dialog,
.el-input__wrapper,
.el-select__wrapper {
    border-radius: 12px;
}

.el-button {
    border-radius: 10px;
}

/* 单选按钮网格布局 */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

/* 单选按钮选项样式 */
.radio-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #fff;
}

.radio-option:hover {
    border-color: #667eea;
    background-color: #f5f7fa;
}

.radio-option.checked {
    border-color: #667eea;
    background-color: #ecf5ff;
}

.radio-option input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.radio-label {
    font-size: 14px;
    color: #606266;
    cursor: pointer;
}

.radio-option.checked .radio-label {
    color: #667eea;
    font-weight: 500;
}

/* 协助填表人 单选按钮 */
.helper-radio-group {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.helper-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    min-width: 80px;
    text-align: center;
}

.helper-radio:hover {
    border-color: #111827;
    background: #f9fafb;
}

.helper-radio.is-checked {
    border-color: #111827;
    background: #f8fafc;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.15);
}

.helper-radio input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #111827;
}

.helper-radio span {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.helper-radio.is-checked span {
    color: #111827;
    font-weight: 700;
}

/* 响应式：小屏幕单列显示 */
@media (max-width: 768px) {
    .radio-grid {
        grid-template-columns: 1fr;
    }

    .helper-radio-group {
        flex-direction: row;
    }

    .helper-radio {
        flex: 1;
    }
}
