* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: 'Microsoft YaHei', sans-serif; }
body { background: #f5f7fa; overflow: hidden; }
[v-cloak] { display: none; }
.el-button+.el-button {  margin-left: 6px;}
.flex-1 { flex: 1; }
.app-container { height: 100vh; display: flex; flex-direction: column; }
.app-header { background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 50%, #0d4f8b 100%); color: white; padding: 20px 30px; text-align: center; flex-shrink: 0; position: relative; overflow: hidden; }
.app-header h1 { font-size: 28px; font-weight: 600; margin-bottom: 8px; position: relative; }
.app-header p { font-size: 14px; opacity: 0.9; position: relative; }
.main-container { flex: 1; display: flex; padding: 20px; gap: 0; overflow: hidden; }
.panel { display: flex; flex-direction: column; background: white; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); overflow: hidden; min-width: 200px; }
.resize-handle { width: 20px; display: flex; align-items: center; justify-content: center; cursor: col-resize; color: #c0c4cc; font-size: 14px; user-select: none; flex-shrink: 0; }
.resize-handle:hover { color: #667eea; }
.panel-header { padding: 12px 16px; border-bottom: 1px solid #ebeef5; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; flex-wrap: wrap; gap: 4px;}
.panel-header .title { font-size: 14px; font-weight: 600; color: #303133; }
.panel-header .toolbar { display: flex; gap: 4px; }
.panel-body { flex: 1; padding: 16px; overflow: hidden; display: flex; flex-direction: column; }
.input-textarea { flex: 1; width: 100%; border: 1px solid #dcdfe6; border-radius: 8px; padding: 16px; font-size: 14px; line-height: 1.6; resize: none; outline: none; font-family: 'Consolas', 'Monaco', monospace; }
.input-textarea:focus { border-color: #667eea; box-shadow: 0 0 0 2px rgba(102,126,234,0.2); }
.preview-container { flex: 1; background: #fafafa; border-radius: 8px; padding: 20px; overflow-y: auto;}
.preview-paper { background: white; width: 100%; min-height: 100%; padding: 40px 50px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-radius: 4px; margin: 0 auto; }
.preview-content { font-size: 14px; line-height: 1.8; }
.template-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 12px 0; }
.template-card { border: 1px solid #ebeef5; border-radius: 6px; padding: 10px; cursor: pointer; transition: all 0.3s; background: white; }
.template-card:hover { border-color: #667eea; box-shadow: 0 2px 8px rgba(102,126,234,0.15); }
.template-card.active { border-color: #667eea; background: #f5f7ff; }
.template-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #303133; }
.template-preview-sample { padding: 6px; background: #fafafa; border-radius: 4px; margin-bottom: 6px; }
.template-preview-sample .sample-title { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.template-preview-sample .sample-text { font-size: 11px; line-height: 1.4; }
.template-card .category-tag { display: inline-block; font-size: 10px; padding: 1px 6px; background: #f0f2f5; border-radius: 3px; color: #606266; }
.category-tabs { margin-bottom: 16px; }
.template-name-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; background: linear-gradient(135deg, #1b7ed7, #40acff); color: white; border-radius: 16px; font-size: 12px; font-weight: 500; }
.template-name-badge .el-icon { font-size: 14px; }
.size-hint { background: #f0f7ff; border: 1px solid #b3d8ff; border-radius: 4px; padding: 6px 10px; margin-top: 8px; font-size: 12px; color: #409eff; line-height: 1.5; }
.size-hint-title { font-weight: 600; margin-bottom: 2px; color: #303133; }
.history-settings { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #ebeef5; }
.history-label { font-size: 14px; color: #606266; }
.history-count { font-size: 12px; color: #909399; margin-left: auto; }
.history-list { max-height: 400px; overflow-y: auto; }
.history-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px; border: 1px solid #ebeef5; border-radius: 8px; margin-bottom: 8px; transition: all 0.2s; }
.history-item:hover { border-color: #409eff; background: #f5f7fa; }
.history-item-info { flex: 1; min-width: 0; }
.history-item-title { font-size: 14px; font-weight: 600; color: #303133; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item-preview { font-size: 12px; color: #606266; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item-time { font-size: 11px; color: #909399; }
.history-item-actions { display: flex; flex-direction: column; gap: 4px; margin-left: 12px; }
.compact-form .el-form-item { margin-bottom: 8px; }
.compact-form .el-collapse-item__header { height: 36px; line-height: 36px; }
.compact-form .el-collapse-item__content { padding-bottom: 8px; }
.edit-form-section { margin-bottom: 24px; }
.edit-form-section h4 { font-size: 14px; font-weight: 600; color: #303133; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #ebeef5; }
.color-row { display: flex; align-items: center; margin-bottom: 12px; }
.color-row .label { width: 100px; font-size: 13px; color: #606266; }
.form-row { display: flex; align-items: center; margin-bottom: 12px; }
.form-row .label { width: 100px; font-size: 13px; color: #606266; }
.dialog-footer { text-align: right; padding-top: 20px; border-top: 1px solid #ebeef5; }
@media (max-width: 768px) {
  .main-container { flex-direction: column; padding: 10px; gap: 10px; }
  .panel { width: 100% !important; }
	.resize-handle { display: none; }
  .preview-paper { padding: 20px; }
}
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
::-webkit-scrollbar-thumb {
	background-color: #ddd;
	border-radius: 6px;
}