/* ========================================
   ERP 新建申请页面 - 移动端样式
   Version: 1.0.0 | 2026-06-13
   ======================================== */

.create-application-page {
  padding: 0;
  background: #f5f7fa;
  min-height: 100vh;
}

.create-application-page .page-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.create-application-page .page-header .back-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #409eff;
  padding: 6px 12px 6px 0;
  cursor: pointer;
}

.create-application-page .page-header h1 {
  font-size: 17px;
  font-weight: 600;
  color: #303133;
  margin: 0;
}

.create-application-page .form-container {
  padding: 16px;
}

.create-application-page .form-item {
  margin-bottom: 18px;
}

.create-application-page .form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #303133;
  margin-bottom: 8px;
}

.create-application-page .form-label .required {
  color: #F56C6C;
}

.create-application-page .form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  -webkit-appearance: none;
}

.create-application-page .form-input:focus {
  border-color: #409eff;
}

/* 类型选择器 */
.create-application-page .type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.create-application-page .type-option {
  padding: 12px 10px;
  border: 2px solid #e4e7ed;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.create-application-page .type-option:active {
  transform: scale(0.97);
}

.create-application-page .type-option.active {
  border-color: #409eff;
  background: #ecf5ff;
  color: #409eff;
}

/* 富文本编辑器 */
.create-application-page .editor-toolbar {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #f5f7fa;
  border: 1px solid #dcdfe6;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.create-application-page .toolbar-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.create-application-page .toolbar-btn:active {
  background: #ecf5ff;
  border-color: #409eff;
}

.create-application-page .editor-content {
  min-height: 150px;
  max-height: 300px;
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid #dcdfe6;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  -webkit-overflow-scrolling: touch;
  word-break: break-word;
}

.create-application-page .editor-content:empty::before {
  content: attr(placeholder);
  color: #c0c4cc;
}

.create-application-page .editor-content:focus {
  border-color: #409eff;
}

/* 图片上传区域 */
.create-application-page .image-upload-area {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.create-application-page .image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.create-application-page .image-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
}

.create-application-page .image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.create-application-page .image-preview-item .image-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.create-application-page .upload-btn {
  width: 80px;
  height: 80px;
  border: 2px dashed #dcdfe6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s;
  background: #fafafa;
}

.create-application-page .upload-btn:active {
  border-color: #409eff;
}

.create-application-page .upload-icon {
  font-size: 24px;
  color: #909399;
}

.create-application-page .upload-text {
  font-size: 11px;
  color: #909399;
  margin-top: 2px;
}

/* 操作按钮 */
.create-application-page .form-actions {
  display: flex;
  gap: 12px;
  padding: 20px 0;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.create-application-page .btn-save-draft {
  flex: 1;
  padding: 12px;
  border: 1px solid #dcdfe6;
  border-radius: 10px;
  background: #fff;
  color: #606266;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.create-application-page .btn-save-draft:active {
  background: #f5f7fa;
}

.create-application-page .btn-submit {
  flex: 2;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #409eff, #337ecc);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.create-application-page .btn-submit:active {
  transform: scale(0.98);
}

.create-application-page .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Toast动画 */
@keyframes wzkToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes wzkToastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* 小屏优化 */
@media screen and (max-width: 375px) {
  .create-application-page .type-selector {
    grid-template-columns: 1fr;
  }

  .create-application-page .type-option {
    padding: 10px;
  }

  .create-application-page .form-actions {
    flex-direction: column;
  }

  .create-application-page .btn-save-draft,
  .create-application-page .btn-submit {
    flex: none;
  }
}

