/* 新火年华 ERP - 全局样式 */
* {
  box-sizing: border-box;
}

html, body, #app {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #303133;
}

.layout {
  min-height: 100vh;
}

/* ========== Header ========== */
.app-header {
  background: #fff;
  border-bottom: 1px solid #e4e7ed;
  padding: 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 24px;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  color: #303133;
}

.brand-icon {
  font-size: 24px;
  margin-right: 8px;
}

.brand-text {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: 24px;
  flex: 1;
}

.nav-link {
  color: #606266;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.router-link-exact-active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 20px;
  transition: background 0.2s;
}

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

.avatar {
  background: linear-gradient(135deg, #ff6b35, #f7931e) !important;
  color: #fff !important;
}

.nickname {
  font-size: 14px;
  color: #303133;
}

/* ========== Main ========== */
.app-main {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 24px !important;
}

/* ========== Footer ========== */
.app-footer {
  text-align: center;
  color: #909399;
  font-size: 12px;
  height: 50px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== 卡片 ========== */
.page-card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ========== Auth 页面 ========== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  padding: 24px;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 28px;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-card .subtitle {
  text-align: center;
  color: #909399;
  margin-bottom: 32px;
  font-size: 14px;
}

.auth-card .el-button {
  width: 100%;
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  color: #909399;
  font-size: 14px;
}

.auth-switch a {
  color: #ff6b35;
  text-decoration: none;
  margin-left: 4px;
}

/* ========== Case 列表 ========== */
.case-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.case-list-header h2 {
  margin: 0;
  font-size: 20px;
}

.case-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.case-item {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.case-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left-color: #ff6b35;
  transform: translateX(2px);
}

.case-item-title {
  font-size: 16px;
  font-weight: 500;
  color: #303133;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-item-meta {
  font-size: 12px;
  color: #909399;
  display: flex;
  gap: 16px;
  align-items: center;
}

.case-item-meta .stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #909399;
}

.pagination-wrap {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

/* ========== Case 详情 ========== */
.case-detail-card {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 16px;
}

.case-detail-card .case-title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
}

.case-detail-card .case-meta {
  color: #909399;
  font-size: 13px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.case-detail-card .case-content {
  font-size: 15px;
  line-height: 1.8;
  color: #303133;
  white-space: pre-wrap;
  word-break: break-word;
}

.case-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #ebeef5;
}

/* 回复区 */
.replies-section {
  background: #fff;
  border-radius: 8px;
  padding: 24px 32px;
}

.replies-header {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  color: #303133;
}

.reply-item {
  padding: 16px 0;
  border-bottom: 1px solid #f0f2f5;
  position: relative;
}

.reply-item:last-child {
  border-bottom: none;
}

.reply-item.accepted {
  background: linear-gradient(90deg, rgba(103, 194, 58, 0.06), transparent);
  padding: 16px;
  border-radius: 6px;
  border-bottom: none;
  margin-bottom: 8px;
}

.reply-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #606266;
}

.reply-content {
  font-size: 14px;
  line-height: 1.7;
  color: #303133;
  white-space: pre-wrap;
  word-break: break-word;
}

.reply-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.accepted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #67c23a;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.reply-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #ebeef5;
}

.reply-form .el-button {
  margin-top: 12px;
}

/* 状态标签 */
.status-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.status-tag.open {
  background: #ecf5ff;
  color: #409eff;
}

.status-tag.resolved {
  background: #f0f9eb;
  color: #67c23a;
}

/* 个人中心 */
.profile-section {
  margin-bottom: 32px;
}

.profile-section h3 {
  margin: 0 0 16px;
  font-size: 16px;
  color: #303133;
}

.profile-form {
  max-width: 400px;
}

/* 邀请码管理 */
.invite-code {
  font-family: "Consolas", "Monaco", monospace;
  background: #f5f7fa;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}

/* 图片上传栏 */
.upload-bar {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-bar .upload-hint {
  font-size: 12px;
  color: #909399;
}

/* 正文/回复中的图片 */
.case-content,
.reply-content {
  white-space: pre-wrap;
  word-break: break-word;
}

.case-content .content-image,
.reply-content .content-image {
  display: block;
  max-width: 100%;
  max-height: 480px;
  margin: 12px 0;
  border-radius: 6px;
  border: 1px solid #ebeef5;
  cursor: zoom-in;
  background: #fafafa;
}

.case-content .content-image:hover,
.reply-content .content-image:hover {
  border-color: #ff6b35;
}

/* el-image 的容器也要限制宽度 */
.case-content .el-image,
.reply-content .el-image {
  max-width: 100%;
}

/* 审计日志 */
.filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.mono {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
}

/* 表情选择器 */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.emoji-item {
  font-size: 22px;
  padding: 6px 4px;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  line-height: 1;
  transition: background 0.15s;
}

.emoji-item:hover {
  background: #f5f7fa;
}

