/* 工作台样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
}

#app {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav .el-menu {
    border-right: none;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.user-info:hover {
    background: #f5f7fa;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
}

/* 顶部栏 */
.topbar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h2 {
    font-size: 1.5em;
    color: #333;
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* 表单卡片 */
.form-card {
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-desc {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.form-meta {
    color: #999;
    font-size: 0.85em;
    margin-bottom: 15px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 模板卡片 */
.templates-view h3 {
    margin-bottom: 20px;
    color: #333;
}

.template-card {
    height: 100%;
}

.template-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-icon {
    font-size: 1.5em;
}

.template-name {
    font-weight: 600;
    font-size: 1.1em;
}

.template-desc {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    line-height: 1.5;
}

.template-fields {
    color: #999;
    font-size: 0.85em;
    margin-bottom: 15px;
}

/* 数据视图 */
.data-view {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.data-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.data-header h3 {
    margin: 0;
    color: #333;
}

.data-actions {
    display: flex;
    gap: 10px;
}

.data-field {
    margin-bottom: 8px;
    padding: 8px;
    background: #f5f7fa;
    border-radius: 4px;
}

/* 统计视图 */
.stats-view {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.stats-header h3 {
    margin: 0;
    color: #333;
}

.stat-card {
    text-align: center;
    padding: 20px;
}

.stat-card .el-card__body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.stat-icon {
    font-size: 3em;
}

.stat-info {
    text-align: left;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.stat-label {
    font-size: 0.9em;
    color: #999;
    margin-top: 5px;
}

.field-stat h4 {
    color: #333;
    margin-bottom: 15px;
}

.chart-container {
    padding: 15px;
    background: #f5f7fa;
    border-radius: 8px;
}

.stat-item {
    margin-bottom: 12px;
}

.stat-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-bar-wrapper .stat-label {
    min-width: 100px;
    color: #666;
    font-size: 0.9em;
}

.stat-bar {
    flex: 1;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.stat-bar-wrapper .stat-count {
    min-width: 120px;
    text-align: right;
    color: #666;
    font-size: 0.85em;
}

.rate-stats {
    padding: 10px;
}

.rate-average {
    display: flex;
    align-items: center;
    gap: 10px;
}

.average-label {
    color: #666;
    font-size: 0.9em;
}

.average-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
}

/* 分享对话框 */
.share-container {
    padding: 10px;
}

.share-container h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1em;
}

.qrcode-container {
    text-align: center;
    padding: 20px;
    background: #f5f7fa;
    border-radius: 8px;
}

.qrcode-box {
    display: inline-block;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qrcode-hint {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
}

.embed-hint {
    margin-top: 8px;
    color: #999;
    font-size: 0.85em;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
}

/* 数据管理表格样式 */
.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.detail-table tr:last-child {
    border-bottom: none;
}

.detail-table td {
    padding: 12px 15px;
    vertical-align: top;
}

.detail-table .field-label {
    width: 150px;
    font-weight: bold;
    color: #667eea;
    background: #f8f9ff;
    white-space: nowrap;
}

.detail-table .field-value {
    color: #333;
    word-break: break-all;
}

/* 列头筛选器样式 */
.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.filter-icon {
    cursor: pointer;
    font-size: 14px;
    color: #c0c4cc;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.3s;
    display: inline-block;
    vertical-align: middle;
}

.filter-icon:hover {
    color: #409eff;
    background: #ecf5ff;
}

.filter-icon.active {
    color: #409eff;
}

.filter-popover {
    padding: 0;
}

.filter-values {
    max-height: 250px;
    overflow-y: auto;
    padding: 4px 0;
}

.select-all-checkbox {
    font-weight: bold;
    margin-bottom: 4px;
}

.filter-checkbox {
    display: block;
    margin: 6px 0;
    line-height: 1.5;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ebeef5;
}

/* 信息中心消息列表 */
.msg-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 6px;
    margin-bottom: 4px;
}
.msg-item:hover {
    background: #f5f7fa;
}
.msg-item.msg-unread {
    background: #ecf5ff;
    border-left: 3px solid #409eff;
}
.msg-item.msg-unread:hover {
    background: #d9ecff;
}
.msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.msg-title {
    font-size: 15px;
    font-weight: 500;
    color: #303133;
}
.msg-unread .msg-title {
    font-weight: 600;
}
.msg-time {
    font-size: 12px;
    color: #909399;
    flex-shrink: 0;
    margin-left: 12px;
}
.msg-content {
    font-size: 13px;
    color: #606266;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.msg-content img {
    max-width: 100%;
    height: auto;
}
/* 消息详情弹窗富文本样式 */
.msg-detail-dialog .el-dialog__body {
    padding-top: 10px;
}
.msg-detail-body {
    line-height: 1.8;
    color: #303133;
    font-size: 14px;
    max-height: 400px;
    overflow-y: auto;
}
.msg-detail-body p {
    margin: 0 0 8px 0;
}
.msg-detail-body img {
    max-width: 100%;
    height: auto;
}
.msg-detail-body ul,
.msg-detail-body ol {
    padding-left: 20px;
}
.msg-detail-body a {
    color: #409eff;
}
