/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Arco Design 主题色 */
    --color-primary: #165DFF;
    --color-primary-hover: #4080FF;
    --color-primary-active: #0E42D2;
    --color-primary-light-1: #E8F3FF;
    --color-primary-light-2: #BEDAFF;
    
    /* 功能色 */
    --color-success: #00B42A;
    --color-warning: #FF7D00;
    --color-danger: #F53F3F;
    --color-info: #165DFF;
    
    /* 中性色 */
    --color-bg-1: #FFFFFF;
    --color-bg-2: #F7F8FA;
    --color-bg-3: #F2F3F5;
    --color-bg-4: #E5E6EB;
    
    --color-text-1: #1D2129;
    --color-text-2: #4E5969;
    --color-text-3: #86909C;
    --color-text-4: #C9CDD4;
    
    --color-border-1: #F2F3F5;
    --color-border-2: #E5E6EB;
    --color-border-3: #C9CDD4;
    --color-border-4: #A9AEB8;
    
    /* 阴影 */
    --shadow-1: 0 0 1px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.1);
    --shadow-2: 0 0 1px rgba(0,0,0,.3), 0 6px 16px -8px rgba(0,0,0,.08), 0 9px 28px rgba(0,0,0,.05), 0 12px 48px 16px rgba(0,0,0,.03);
    
    /* 圆角 */
    --border-radius-small: 2px;
    --border-radius-medium: 4px;
    --border-radius-large: 8px;
    
    /* 间距 */
    --spacing-mini: 4px;
    --spacing-small: 8px;
    --spacing-medium: 12px;
    --spacing-large: 16px;
    --spacing-xlarge: 20px;
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    font-family: var(--font-family);
    background: #f7f8fa;
    min-height: 100vh;
    color: var(--color-text-1);
    line-height: 1.5715;
}

/* ==================== 全局进度条 ==================== */
.global-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    z-index: 9999;
    overflow: hidden;
}

.global-progress.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: var(--color-primary);
    animation: progress-moving 1.5s ease-in-out infinite;
}

@keyframes progress-moving {
    0% { left: -30%; }
    100% { left: 100%; }
}

/* ==================== 主容器 ==================== */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
}

/* ==================== 顶部导航栏 ==================== */
.app-header {
    background: linear-gradient(135deg, #165DFF 0%, #0E42D2 100%);
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(22, 93, 255, 0.15);
    margin-bottom: 24px;
    overflow: hidden;
}

.header-content {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.mode-badge {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.mode-badge.dev-mode {
    background: rgba(255, 125, 0, 0.25);
    border-color: rgba(255, 125, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 125, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255, 125, 0, 0);
    }
}

/* 模式切换开关 */
.mode-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 16px;
}

.mode-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    transition: all 0.3s;
}

.mode-switch-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    top: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mode-switch input:checked + .mode-switch-slider {
    background-color: rgba(255, 125, 0, 0.3);
    border-color: rgba(255, 125, 0, 0.6);
}

.mode-switch input:checked + .mode-switch-slider:before {
    transform: translateX(20px);
    background-color: #ff7d00;
}

.mode-switch:hover .mode-switch-slider {
    background-color: rgba(255, 255, 255, 0.4);
}

.mode-switch input:checked:hover + .mode-switch-slider {
    background-color: rgba(255, 125, 0, 0.4);
}

.mode-switch-label {
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
    user-select: none;
}

/* 通用开关按钮样式 */
.arco-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.arco-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.arco-switch-slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: var(--color-border-3);
    border-radius: 12px;
    transition: all 0.3s;
}

.arco-switch-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: all 0.3s;
}

.arco-switch input:checked + .arco-switch-slider {
    background-color: var(--color-primary);
}

.arco-switch input:checked + .arco-switch-slider:before {
    transform: translateX(20px);
}

.arco-switch:hover .arco-switch-slider {
    opacity: 0.9;
}

.arco-switch-label {
    font-size: 14px;
    color: var(--color-text-1);
    user-select: none;
}

/* 自动完成组件样式 */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--color-border-2);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-1);
    transition: background-color 0.2s;
}

.autocomplete-item:hover {
    background-color: var(--color-fill-2);
}

.autocomplete-item.active {
    background-color: var(--color-primary-light-1);
    color: var(--color-primary);
}

.autocomplete-empty {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-3);
}

.kf-info {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.header-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==================== 按钮样式 ==================== */
.arco-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 15px;
    font-size: 14px;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.1s cubic-bezier(0, 0, 1, 1);
    font-weight: 400;
    line-height: 1.5715;
    white-space: nowrap;
    outline: none;
    user-select: none;
}

.arco-btn svg {
    width: 1em;
    height: 1em;
}

.arco-btn-primary {
    background-color: var(--color-primary);
    color: var(--color-bg-1);
}

.arco-btn-primary:hover {
    background-color: var(--color-primary-hover);
}

.arco-btn-primary:active {
    background-color: var(--color-primary-active);
}

.arco-btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.arco-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.arco-btn-large {
    padding: 8px 20px;
    font-size: 14px;
}

.arco-btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

/* ==================== 主内容区 ==================== */
.app-main {
    display: grid;
    gap: 24px;
}

/* ==================== 工单表单卡片 ==================== */
.ticket-form-card {
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-2);
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
}

.card-icon {
    flex-shrink: 0;
    color: var(--color-primary);
}

.card-title h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-1);
    margin-bottom: 4px;
}

.card-title p {
    font-size: 13px;
    color: var(--color-text-3);
}

/* ==================== 工单类型 Tabs ==================== */
.ticket-type-tabs {
    margin-bottom: 24px;
}

.tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px;
    background: var(--color-fill-2);
    border-radius: 4px;
}

.tab-item {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 2px;
    font-size: 14px;
    color: var(--color-text-2);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.tab-item svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tab-item:hover {
    background: var(--color-fill-3);
    color: var(--color-text-1);
}

.tab-item:hover svg {
    opacity: 1;
}

.tab-item.active {
    background: #ffffff;
    color: var(--color-primary);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-item.active svg {
    opacity: 1;
}

/* ==================== Tag 标签组 ==================== */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--color-fill-2);
    border: 1px solid var(--color-border-2);
    border-radius: 2px;
    font-size: 13px;
    color: var(--color-text-2);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.tag-item:hover {
    background: var(--color-fill-3);
    border-color: var(--color-border-3);
    color: var(--color-text-1);
}

.tag-item.active {
    background: var(--color-primary-light-1);
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 500;
}

/* Tag 选中样式（tag-selected） */
.tag-item.tag-selected {
    background: var(--color-primary-light-1);
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 500;
}

/* Loading 占位符 */
.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    font-size: 13px;
    color: var(--color-text-3);
    background: var(--color-fill-2);
    border-radius: 2px;
    animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ==================== 单选按钮组 ==================== */
.radio-button-group {
    display: inline-flex;
    gap: 0;
    background: var(--color-fill-2);
    border-radius: 2px;
    padding: 2px;
}

.radio-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.radio-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-button-text {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 2px;
    font-size: 13px;
    color: var(--color-text-2);
    background: transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.radio-button:hover .radio-button-text {
    color: var(--color-text-1);
    background: var(--color-fill-3);
}

.radio-button input[type="radio"]:checked + .radio-button-text {
    background: #ffffff;
    color: var(--color-primary);
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 联动子表单 */
.linkage-sub-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-2);
}

/* ==================== 表单样式 ==================== */
.ticket-form {
    padding: 24px;
}

.form-item {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--color-text-1);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-label-required::before {
    content: '*';
    color: var(--color-danger);
    margin-right: 4px;
}

.form-control {
    position: relative;
}

/* Input 样式 */
.arco-input-wrapper {
    position: relative;
    display: inline-flex;
    width: 100%;
}

.arco-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5715;
    color: var(--color-text-1);
    background-color: var(--color-bg-1);
    border: 1px solid var(--color-border-3);
    border-radius: 2px;
    transition: all 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
    outline: none;
}

.arco-input:hover {
    border-color: var(--color-primary);
}

.arco-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light-1);
    transform: translateY(-1px);
    transition: all 0.2s;
}

.arco-input:invalid:not(:placeholder-shown) {
    border-color: var(--color-danger);
}

.arco-input[type="tel"]:invalid:not(:placeholder-shown) {
    border-color: var(--color-danger);
}

.input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-3);
    font-size: 14px;
}

/* Select 样式 */
.arco-select-wrapper {
    position: relative;
    display: inline-flex;
    width: 100%;
}

.arco-select {
    width: 100%;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    line-height: 1.5715;
    color: var(--color-text-1);
    background-color: var(--color-bg-1);
    border: 1px solid var(--color-border-3);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
    outline: none;
    appearance: none;
}

.arco-select:hover {
    border-color: var(--color-primary);
}

.arco-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light-1);
    transform: translateY(-1px);
    transition: all 0.2s;
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-text-3);
}

/* Textarea 样式 */
.arco-textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5715;
    color: var(--color-text-1);
    background-color: var(--color-bg-1);
    border: 1px solid var(--color-border-3);
    border-radius: 2px;
    resize: vertical;
    font-family: var(--font-family);
    transition: all 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
    outline: none;
}

.arco-textarea:hover {
    border-color: var(--color-primary);
}

.arco-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light-1);
    transform: translateY(-1px);
    transition: all 0.2s;
}

/* ==================== 动态表单面板 ==================== */
.type-form-panel {
    padding: 20px;
    background: #f7f8fa;
    border-radius: 2px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border-2);
    animation: slideDown 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 表单操作区 ==================== */
.form-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid var(--color-border-2);
    display: flex;
    justify-content: flex-end;
    z-index: 999;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.form-actions .arco-btn-large {
    min-width: 200px;
    height: 48px;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(22, 93, 255, 0.3);
    transition: all 0.3s;
}

.form-actions .arco-btn-large:hover {
    box-shadow: 0 6px 20px rgba(22, 93, 255, 0.4);
    transform: translateY(-2px);
}

.form-actions .arco-btn-large:active {
    transform: translateY(0);
}

/* 给表单底部添加内边距，防止内容被按钮遮挡 */
.ticket-form {
    padding-bottom: 100px;
}

/* ==================== 图片上传区域 ==================== */
.image-upload-area {
    border: 2px dashed var(--color-border-3);
    border-radius: var(--border-radius-medium);
    background: var(--color-bg-2);
    transition: all 0.3s;
    overflow: hidden;
}

.image-upload-area:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light-1);
}

.image-upload-area.dragover {
    border-color: var(--color-primary);
    background: var(--color-primary-light-1);
    border-style: solid;
}

.upload-trigger {
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-trigger svg {
    color: var(--color-text-3);
    margin-bottom: 12px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.upload-text {
    color: var(--color-text-2);
    font-size: 14px;
}

.upload-text > div:first-child {
    margin-bottom: 4px;
    font-weight: 500;
}

.upload-hint {
    font-size: 12px;
    color: var(--color-text-3);
}

.image-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 16px;
    background: #fff;
    max-height: 400px;
    overflow-y: auto;
}

.image-preview-list:empty {
    display: none;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius-medium);
    overflow: hidden;
    border: 1px solid var(--color-border-2);
    background: var(--color-bg-2);
    transition: all 0.2s;
}

.image-preview-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
}

.image-preview-item:hover .image-preview-remove {
    opacity: 1;
}

.image-preview-remove:hover {
    background: var(--color-danger);
    transform: scale(1.1);
}

.image-preview-remove svg {
    width: 14px;
    height: 14px;
}

.image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-primary);
}

.image-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* 提交按钮 loading 状态 */
.arco-btn.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.arco-btn.loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-icon {
    margin-right: 4px;
}

/* ==================== 侧边栏 ==================== */
/* 右侧浮动触发器 */
.floating-trigger {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 72px;
    background: linear-gradient(135deg, #165DFF 0%, #0E42D2 100%);
    border-radius: 6px 0 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -2px 2px 12px rgba(22, 93, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
    z-index: 998;
    color: #ffffff;
}

.floating-trigger:hover {
    width: 42px;
    box-shadow: -4px 4px 20px rgba(22, 93, 255, 0.4);
}

.floating-trigger svg {
    transform: rotate(0deg);
    transition: transform 0.3s;
}

.floating-trigger:hover svg {
    transform: translateX(-3px);
}

.trigger-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    background: #f53f3f;
    color: #ffffff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.trigger-badge:empty {
    display: none;
}

.records-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    pointer-events: none;
}

.records-drawer.open {
    pointer-events: auto;
}

.drawer-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
}

.records-drawer.open .drawer-mask {
    opacity: 1;
}

.drawer-panel {
    position: absolute;
    top: 0;
    right: -460px;
    bottom: 0;
    width: 460px;
    background: #ffffff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
}

.records-drawer.open .drawer-panel {
    right: 0;
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-1);
}

.title-icon {
    color: var(--color-primary);
}

.drawer-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-medium);
    background: transparent;
    border: none;
    color: var(--color-text-3);
    cursor: pointer;
    transition: all 0.2s;
}

.drawer-close:hover {
    background: var(--color-bg-2);
    color: var(--color-text-1);
}

.drawer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 20px;
    background: #f7f8fa;
    border-bottom: 1px solid var(--color-border-2);
}

.stat-card {
    padding: 16px 12px;
    background: #ffffff;
    border-radius: 2px;
    text-align: center;
    border: 1px solid var(--color-border-2);
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.15);
}

.stat-card.stat-total {
    border-color: var(--color-primary);
}

.stat-card.stat-success {
    border-color: var(--color-success);
}

.stat-card.stat-failed {
    border-color: var(--color-danger);
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--color-text-3);
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-1);
    line-height: 1.2;
    margin-top: 4px;
}

.drawer-toolbar {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border-2);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

/* 滚动条样式 */
.drawer-body::-webkit-scrollbar {
    width: 6px;
}

.drawer-body::-webkit-scrollbar-track {
    background: transparent;
}

.drawer-body::-webkit-scrollbar-thumb {
    background: var(--color-border-3);
    border-radius: 3px;
}

.drawer-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-4);
}

/* ==================== 记录卡片 ==================== */
.record-card {
    background: #ffffff;
    border: 1px solid var(--color-border-2);
    border-radius: 2px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-left-width: 3px;
}

.record-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.15);
    transform: translateX(-4px);
}

.record-card.success {
    border-left-color: var(--color-success);
}

.record-card.failed {
    border-left-color: var(--color-danger);
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.record-order {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-1);
}

.record-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 2px;
    background: var(--color-bg-2);
    color: var(--color-text-2);
}

.record-status.success {
    background: rgba(0, 180, 42, 0.1);
    color: var(--color-success);
}

.record-status.failed {
    background: rgba(245, 63, 63, 0.1);
    color: var(--color-danger);
}

.record-body {
    font-size: 13px;
    color: var(--color-text-2);
    margin-bottom: 8px;
}

.record-type {
    display: inline-block;
    padding: 2px 8px;
    background: var(--color-bg-2);
    border-radius: var(--border-radius-small);
    font-size: 12px;
    color: var(--color-text-2);
    margin-bottom: 8px;
}

.record-time {
    font-size: 12px;
    color: var(--color-text-3);
}

.record-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-2);
}

.record-actions button {
    flex: 1;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-3);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-text {
    font-size: 14px;
    color: var(--color-text-3);
}

/* ==================== Modal 遮罩层 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== Modal 样式 ==================== */
.custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    min-width: 400px;
    max-width: 520px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
}

.custom-modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-2);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-1);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* 滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--color-border-3);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-4);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border-2);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==================== 设置面板 ==================== */
.settings-modal {
    min-width: 500px;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.setting-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border-2);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    display: flex;
    align-items: center;
    flex: 1;
    font-size: 14px;
    color: var(--color-text-1);
    font-weight: 500;
}

.setting-value {
    flex: 1;
    text-align: right;
    font-size: 14px;
    color: var(--color-text-2);
    margin-right: 16px;
}

/* ==================== Message 样式 ==================== */
.custom-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #ffffff;
    padding: 12px 20px;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
}

.custom-message.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.message-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.message-content {
    font-size: 14px;
    color: var(--color-text-1);
}

.message-success .message-icon {
    color: var(--color-success);
}

.message-error .message-icon {
    color: var(--color-danger);
}

.message-info .message-icon {
    color: var(--color-info);
}

.message-warning .message-icon {
    color: var(--color-warning);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .app-container {
        padding: 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .header-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .drawer-panel {
        width: 100%;
        right: -100%;
    }
    
    .custom-modal {
        min-width: 90%;
        max-width: 90%;
    }
    
    /* 移动端固定按钮优化 */
    .form-actions {
        padding: 12px 16px;
    }
    
    .form-actions .arco-btn-large {
        min-width: 100%;
        height: 44px;
        font-size: 15px;
    }
}

/* ==================== 补发商品选择 ==================== */
.goods-search-wrapper {
    position: relative;
}

.goods-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-bg-1);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-2);
    border: 1px solid var(--color-border-2);
    z-index: 100;
    max-height: 400px;
    overflow: hidden;
}

.goods-search-header {
    padding: 12px;
    border-bottom: 1px solid var(--color-border-1);
    background: var(--color-bg-2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.goods-search-header .arco-select {
    width: 140px;
    flex-shrink: 0;
}

.goods-search-header .arco-input {
    flex: 1;
}

.goods-search-result {
    max-height: 280px;
    overflow-y: auto;
}

.goods-item {
    padding: 12px;
    border-bottom: 1px solid var(--color-border-1);
    cursor: pointer;
    transition: all 0.2s;
}

.goods-item:hover {
    background: var(--color-primary-light-1);
}

.goods-item:last-child {
    border-bottom: none;
}

.goods-item-name {
    font-weight: 500;
    color: var(--color-text-1);
    font-size: 14px;
    margin-bottom: 4px;
}

.goods-item-info {
    font-size: 12px;
    color: var(--color-text-3);
}

.goods-empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--color-text-3);
    font-size: 14px;
}

/* 已选商品列表 */
.selected-goods-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--color-border-2);
    border-radius: var(--border-radius-medium);
    background: var(--color-bg-2);
}

.selected-goods-item {
    background: var(--color-bg-1);
    border: 1px solid var(--color-border-2);
    border-radius: var(--border-radius-medium);
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s;
}

.selected-goods-item:last-child {
    margin-bottom: 0;
}

.selected-goods-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.1);
}

.selected-goods-info {
    flex: 1;
    min-width: 0;
}

.selected-goods-name {
    font-weight: 500;
    color: var(--color-text-1);
    font-size: 14px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-goods-meta {
    font-size: 12px;
    color: var(--color-text-3);
}

.selected-goods-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.goods-quantity-control {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--color-bg-2);
    border-radius: var(--border-radius-small);
    padding: 2px;
}

.goods-quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--color-border-3);
    background: var(--color-bg-1);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text-2);
    font-size: 14px;
}

.goods-quantity-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.goods-quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.goods-quantity-btn:disabled:hover {
    background: var(--color-bg-1);
    border-color: var(--color-border-3);
    color: var(--color-text-2);
}

.goods-quantity-input {
    width: 40px;
    height: 24px;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--color-text-1);
    font-size: 14px;
    font-weight: 500;
}

.goods-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--border-radius-small);
    border: 1px solid var(--color-border-3);
    background: var(--color-bg-1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text-3);
}

.goods-remove-btn:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: #fff;
}

.goods-loading-state {
    text-align: center;
    padding: 24px 16px;
    color: var(--color-text-3);
    font-size: 14px;
}

.goods-loading-state i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
