/* ==================== 顶部进度条 ==================== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 99999;
}

.progress-bar.hidden {
    display: none;
}

.progress-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.progress-bar.indeterminate .progress-bar-inner {
    width: 30%;
    animation: progressIndeterminate 1.5s ease-in-out infinite;
}

@keyframes progressIndeterminate {
    0% {
        width: 0%;
        margin-left: 0%;
    }
    50% {
        width: 30%;
        margin-left: 35%;
    }
    100% {
        width: 0%;
        margin-left: 100%;
    }
}

/* ==================== 更新日志弹窗 (iOS Style Animation) ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
    opacity: 1;
    /* iOS 风格缓动 */
    transition: opacity 0.4s cubic-bezier(0.32, 0.72, 0, 1), backdrop-filter 0.4s ease;
    will-change: opacity, backdrop-filter;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(0px); /* 性能优化 */
    -webkit-backdrop-filter: blur(0px);
}

.modal-content {
    background: #ffffff;
    border-radius: 20px; /* iOS 大圆角 */
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 
        0 20px 40px -8px rgba(0, 0, 0, 0.12),
        0 10px 20px -5px rgba(0, 0, 0, 0.08);
    transform: scale(1) translateY(0);
    opacity: 1;
    /* 平滑的 Spring 仿真曲线 */
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1),
                opacity 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform, opacity;
    border: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition-duration: 0.25s; /* 退出稍快 */
}

/* 内容错峰进场动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-overlay:not(.hidden) .update-section {
    animation: fadeInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s backwards;
}

.modal-overlay:not(.hidden) .modal-divider {
    animation: fadeInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s backwards;
}

.modal-overlay:not(.hidden) .notice-section {
    animation: fadeInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s backwards;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 16px;
    background: #ffffff;
    border-bottom: none;
}

.modal-header::before,
.modal-header::after {
    display: none;
}

.modal-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.01em;
}

.modal-body {
    padding: 0 24px 24px;
}

.update-section,
.notice-section {
    margin-bottom: 24px;
}

.update-section:last-child,
.notice-section:last-child {
    margin-bottom: 0;
}

.update-section h3,
.notice-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* 移除图标背景容器，改为纯图标 */
.update-section h3 .section-icon-wrapper,
.notice-section h3 .section-icon-wrapper {
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    display: inline-flex;
}

.update-section h3 .section-icon-wrapper svg {
    width: 16px;
    height: 16px;
    color: var(--success-color);
}

.notice-section h3 .section-icon-wrapper svg {
    width: 16px;
    height: 16px;
    color: var(--warning-color);
}

.modal-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.modal-body ul li {
    position: relative;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    padding: 4px 0 4px 18px;
    transition: color 0.2s;
}

.modal-body ul li:hover {
    color: #111827;
}

/* 极简圆点 */
.modal-body ul li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d1d5db;
    box-shadow: none;
}

.modal-footer {
    padding: 8px 24px 24px;
    display: flex;
    justify-content: center;
}

.modal-close-btn {
    width: 100%;
    height: 48px;
    padding: 0 20px;
    justify-content: center;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    border: none;
    transition: transform 0.1s cubic-bezier(0.3, 0, 0.5, 1),
                background-color 0.2s ease,
                box-shadow 0.2s ease;
    will-change: transform;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.modal-close-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.modal-close-btn:active:not(:disabled) {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

/* 分割线 */
.modal-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 20px 0;
}

/* 响应式优化 */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 16px;
        align-items: center;
    }
    
    .modal-content {
        border-radius: 20px;
        max-width: 100%;
        margin-bottom: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    }

    .modal-overlay.hidden .modal-content {
        transform: scale(0.95);
    }
    
    .modal-header {
        padding: 24px 20px 16px;
    }
    
    .modal-body {
        padding: 0 20px 20px;
    }
    
    .modal-footer {
        padding: 0 20px 24px;
    }
}

/* 尊重用户动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal-content,
    .modal-close-btn {
        transition: none;
    }
}

/* ==================== 变量定义 ==================== */
:root {
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #1a1a2e;
    --text-secondary: #5a5a72;
    --text-muted: #8e8e9a;
    --border-color: #e8eaed;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --success-color: #059669;
    --success-light: #ecfdf5;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --input-bg: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

/* ==================== 基础样式 ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-color);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    color: var(--text-color);
    padding: 16px;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    display: flex;
    justify-content: center;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 560px;
}

/* ==================== 头部样式 ==================== */
.header {
    text-align: center;
    padding: 24px 0 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    border-radius: 16px;
    margin-bottom: 12px;
}

.logo svg {
    width: 28px;
    height: 28px;
    color: white;
}

.header h1 { 
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
}

.header .subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==================== 卡片样式 ==================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.step-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-color);
}

/* ==================== 用户信息条 ==================== */
.user-info-bar {
    display: flex;
    align-items: center;
    background: var(--success-light);
    color: var(--success-color);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.875rem;
    font-weight: 500;
}

.bar-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* ==================== 表单样式 ==================== */
.form-group { 
    margin-bottom: 16px; 
    position: relative; 
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row > .form-group,
.form-row > div {
    flex: 1;
    min-width: 0;
}

label { 
    display: flex;
    align-items: center;
    margin-bottom: 6px; 
    font-size: 0.875rem; 
    color: var(--text-secondary);
    font-weight: 500;
}

.label-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    flex-shrink: 0;
    opacity: 0.7;
}

label small {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
    font-size: 0.75rem;
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input:disabled, select:disabled, textarea:disabled {
    background-color: #f8f9fa;
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: transparent;
}

input::placeholder, textarea::placeholder {
    color: #b8bcc4;
}

/* ==================== 美化下拉列表 ==================== */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-muted);
    pointer-events: none;
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background: var(--input-bg);
}

/* 自定义下拉选项样式（部分浏览器支持） */
select option {
    padding: 12px;
    background: white;
    color: var(--text-color);
}

select option:checked {
    background: var(--primary-light);
    color: var(--primary-color);
}

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* ==================== 搜索输入框 ==================== */
.search-input-wrapper {
    display: flex;
    gap: 8px;
}

.search-input-wrapper input {
    flex: 1;
}

.search-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

.search-btn:hover {
    background: var(--primary-hover);
}

.search-btn:active {
    transform: scale(0.96);
}

/* ==================== 已选择企业 ==================== */
.selected-company {
    display: flex;
    align-items: center;
    background: var(--primary-light);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-top: 10px;
}

.selected-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    margin-right: 10px;
    flex-shrink: 0;
}

.selected-company span:nth-child(2) {
    flex: 1;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.9375rem;
    word-break: break-all;
}

.clear-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}

.clear-btn svg {
    width: 14px;
    height: 14px;
}

.clear-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ==================== 按钮样式 ==================== */
button {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:active:not(:disabled) { 
    transform: scale(0.98); 
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary { 
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) { 
    background: var(--primary-hover);
}

.btn-arrow {
    width: 18px;
    height: 18px;
}

.btn-success { 
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #047857;
}

.btn-success svg {
    width: 18px;
    height: 18px;
}

.btn-secondary { 
    background: #f3f4f6; 
    color: var(--text-secondary);
}

.btn-secondary:hover:not(:disabled) { 
    background: #e5e7eb;
}

/* AI重新生成链接 */
.ai-link {
    margin-left: auto;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    width: auto;
    transition: all 0.2s;
}

.ai-link svg {
    width: 14px;
    height: 14px;
}

.ai-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

/* ==================== 分区样式 ==================== */
.section {
    margin-bottom: 4px;
}

.section-title {
    display: flex;
    align-items: center;
    margin: 24px 0 16px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-color);
}

.section:first-child .section-title {
    margin-top: 0;
}

.section-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.auto-tag {
    margin-left: 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--success-color);
    background: var(--success-light);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ==================== 工具类 ==================== */
.hidden { 
    display: none !important; 
}

/* ==================== 搜索联想列表 ==================== */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    list-style: none;
    margin: 4px 0 0;
    box-shadow: var(--shadow-lg);
    -webkit-overflow-scrolling: touch;
}

.suggestions li {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-color);
    transition: background 0.15s;
}

.suggestions li:last-child {
    border-bottom: none;
}

.suggestions li:hover,
.suggestions li:active { 
    background: var(--primary-light);
}

.suggestions li strong {
    display: block;
    font-weight: 500;
    margin-bottom: 2px;
}

.suggestions li small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.suggestions li.loading-item,
.suggestions li.no-result {
    color: var(--text-muted);
    cursor: default;
    text-align: center;
}

.suggestions li.loading-item:hover,
.suggestions li.no-result:hover {
    background: transparent;
}

/* ==================== 提示文字 ==================== */
.hint-text {
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.code-tag {
    display: inline-block;
    background: #f3f4f6;
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
    margin-left: 6px;
}

/* ==================== Toast 弹窗 ==================== */
.toast-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: var(--text-color);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    margin-bottom: 8px;
    animation: toastIn 0.3s ease;
    max-width: 90%;
    text-align: center;
    pointer-events: auto;
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--error-color);
}

.toast.hide {
    animation: toastOut 0.25s ease forwards;
}

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

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

/* ==================== 加载遮罩 ==================== */
.loading-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
}

.loading-overlay.hidden { 
    display: none; 
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

#loadingText { 
    color: var(--text-secondary); 
    font-weight: 500;
    font-size: 0.9375rem;
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 16px 0 8px;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ==================== Flatpickr 自定义样式 ==================== */
.date-picker {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e8e9a' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.flatpickr-calendar {
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--border-color) !important;
    font-family: inherit !important;
}

.flatpickr-months {
    padding: 8px 0;
}

.flatpickr-day.selected {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.flatpickr-day:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}

/* ==================== 响应式设计 - 手机优化 ==================== */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    
    body { 
        padding: 12px;
        padding-bottom: env(safe-area-inset-bottom, 12px);
    }
    
    .header {
        padding: 16px 0 12px;
    }
    
    .logo {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    
    .logo svg {
        width: 24px;
        height: 24px;
    }
    
    .header h1 {
        font-size: 1.375rem;
    }
    
    .card { 
        padding: 16px;
        border-radius: 10px;
    }
    
    .card-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .step-badge {
        width: 26px;
        height: 26px;
        font-size: 0.8125rem;
    }
    
    .step-title {
        font-size: 1rem;
    }
    
    .form-group { 
        margin-bottom: 14px; 
    }
    
    input, select, textarea { 
        padding: 11px 12px;
        font-size: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    button {
        padding: 13px 16px;
    }
    
    .section-title {
        margin: 20px 0 14px;
        font-size: 0.9rem;
    }
    
    .suggestions {
        max-height: 200px;
    }
    
    .suggestions li {
        padding: 11px 12px;
    }
    
    /* 日期选择器手机适配 */
    .flatpickr-calendar {
        width: calc(100vw - 24px) !important;
        max-width: 340px !important;
    }
}

/* 小屏幕优化 */
@media (max-width: 360px) {
    body {
        padding: 8px;
    }
    
    .card {
        padding: 14px;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
}

/* 横屏优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 12px 0 8px;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
}

/* ==================== 自定义下拉列表 ==================== */
.custom-select {
    position: relative;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-select-trigger:hover {
    border-color: var(--primary-color);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-trigger span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-trigger span.placeholder {
    color: #b8bcc4;
}

.select-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.2s;
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch;
}

.custom-select-option {
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f3f4f6;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover,
.custom-select-option:active {
    background: var(--primary-light);
}

.custom-select-option.selected {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

/* ==================== 可折叠区块 ==================== */
.collapsed-section .section-content {
    display: none;
}

.collapsed-section.expanded .section-content {
    display: block;
}

.section-collapsible {
    cursor: pointer;
    user-select: none;
}

.section-collapsible:hover {
    color: var(--primary-color);
}

.collapse-arrow {
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.collapsed-section.expanded .collapse-arrow {
    transform: rotate(180deg);
}

.section-content {
    padding-top: 8px;
}

/* 手机端可折叠区块 */
@media (max-width: 480px) {
    .custom-select-options {
        max-height: 200px;
    }
    
    .custom-select-option {
        padding: 11px 12px;
    }
}
