

/* =========================================
   详情对话框样式 - Detail Dialog Styles
   与表单界面保持一致的简洁风格
========================================= */

/* =========================================
   详情弹窗皮肤 - 覆盖 Layui 默认弹窗样式
========================================= */

/* 详情弹窗容器 - 移除 layui 默认边框和圆角 */
.detail-dialog-skin.layui-layer {
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
  border: none !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

/* 移除 layui 默认标题栏（我们使用自定义标题） */
.detail-dialog-skin .layui-layer-title {
  display: none !important;
}

/* 移除 layui 默认关闭按钮区域 */
.detail-dialog-skin .layui-layer-setwin {
  display: none !important;
}

/* 内容区域移除 layui 默认内边距 */
.detail-dialog-skin.layui-layer .layui-layer-content {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* 详情弹窗遮罩层 */
.layui-layer-shade {
  background: rgba(0, 0, 0, 0.4) !important;
}

/* 详情对话框容器 */
.detail-confirm-dialog {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 详情对话框头部 - 与表单弹窗标题栏一致 */
.detail-confirm-dialog .detail-header {
  display: flex;
  align-items: center;
  padding: 12px 50px 12px 20px;
  min-height: 50px;
  border-bottom: 1px solid #ebeef5;
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
  position: relative;
}

.detail-confirm-dialog .detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #ecf5ff;
  border-radius: 6px;
  color: #409eff;
  font-size: 16px;
  margin-right: 10px;
  flex-shrink: 0;
}

.detail-confirm-dialog .detail-icon i {
  font-size: 16px;
}

.detail-confirm-dialog .detail-header-content {
  flex: 1;
  min-width: 0;
}

.detail-confirm-dialog .detail-title {
  font-size: 15px;
  font-weight: 600;
  color: #303133;
  margin: 0;
  line-height: 1.4;
  letter-spacing: 0.3px;
}

.detail-confirm-dialog .detail-subtitle {
  font-size: 12px;
  color: #909399;
  margin: 0;
  line-height: 1.4;
}

.detail-confirm-dialog .detail-close {
  position: absolute;
  right: 10px;
  top: 13px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #909399;
  transition: all 0.2s;
  flex-shrink: 0;
}

.detail-confirm-dialog .detail-close:hover {
  background: #ecf5ff;
  color: #f56c6c;
}

.detail-confirm-dialog .detail-close i {
  font-size: 14px;
}

/* 详情对话框主体 */
.detail-confirm-dialog .detail-body {
  padding: 20px 24px;
  max-height: 65vh;
  overflow-y: auto;
  background: #ffffff;
}

/* 表单分组样式 */
.detail-confirm-dialog .form-section-modern {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #ebeef5;
}

.detail-confirm-dialog .form-section-modern:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* 分组头部 */
.detail-confirm-dialog .section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.detail-confirm-dialog .section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #ecf5ff;
  border-radius: 6px;
  color: #409eff;
  font-size: 16px;
  flex-shrink: 0;
}

.detail-confirm-dialog .section-icon i {
  font-size: 16px;
}

.detail-confirm-dialog .section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #303133;
  letter-spacing: 0.3px;
}

/* 分组内容 */
.detail-confirm-dialog .section-body {
  padding: 0;
}

/* 滚动条美化 */
.detail-confirm-dialog .detail-body::-webkit-scrollbar {
  width: 6px;
}

.detail-confirm-dialog .detail-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.detail-confirm-dialog .detail-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.detail-confirm-dialog .detail-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 详情对话框底部 */
.detail-confirm-dialog .detail-footer {
  padding: 20px 24px;
  border-top: 1px solid #ebeef5;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #ffffff;
}

.detail-confirm-dialog .detail-btn {
  min-width: 80px;
  height: 36px;
  padding: 0 20px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.detail-confirm-dialog .detail-btn:active {
  transform: scale(0.98);
}

.detail-confirm-dialog .detail-btn-primary {
  background: #409eff;
  color: #ffffff;
}

.detail-confirm-dialog .detail-btn-primary:hover {
  background: #66b1ff;
}

/* 字段网格布局 */
.detail-confirm-dialog .field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 28px;
}

.detail-confirm-dialog .field-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.detail-confirm-dialog .field-item:last-child {
  border-bottom: none;
}

.detail-confirm-dialog .field-item.full-width {
  grid-column: 1 / -1;
}

/* 字段标签 */
.detail-confirm-dialog .field-label {
  font-size: 12px;
  color: #909399;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 详情值样式 - 现代简洁的纯文本展示 */
.detail-value {
  color: #303133;
  font-size: 16px;
  line-height: 1.6;
  padding: 6px 0;
  background: transparent;
  border: none;
  word-break: break-all;
  font-weight: 400;
  transition: color 0.2s;
}

.detail-value:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.detail-value.highlight {
  font-weight: 600;
  color: #409eff;
  background: transparent;
  border: none;
}

.detail-value.empty {
  color: #c0c4cc;
  font-style: italic;
  font-weight: 400;
}

/* 详情链接 */
.detail-link {
  color: #409eff;
  text-decoration: none;
  transition: color 0.2s;
}

.detail-link:hover {
  color: #66b1ff;
  text-decoration: underline;
}

/* 状态徽章 - 与表单界面一致 */
.status-badge {
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-badge.status-success,
.status-badge.status-available,
.status-badge.status-enabled {
  background: #e6f7e6;
  color: #1f7a1f;
}

.status-badge.status-success::before,
.status-badge.status-available::before,
.status-badge.status-enabled::before {
  background: #1f7a1f;
}

.status-badge.status-danger,
.status-badge.status-disabled {
  background: #fef0f0;
  color: #f56c6c;
}

.status-badge.status-danger::before,
.status-badge.status-disabled::before {
  background: #f56c6c;
}

.status-badge.status-warning {
  background: #fdf6ec;
  color: #e6a23c;
}

.status-badge.status-warning::before {
  background: #e6a23c;
}

.status-badge.status-info {
  background: #ecf5ff;
  color: #909399;
}

.status-badge.status-info::before {
  background: #909399;
}

.status-badge.status-unavailable,
.status-badge.status-none {
  background: #f5f7fa;
  color: #909399;
}

.status-badge.status-unavailable::before,
.status-badge.status-none::before {
  background: #909399;
}

/* 图片预览 */
.image-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  cursor: pointer;
}

.image-preview-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.image-preview-container img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.image-preview-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.image-preview-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 图片列表 */
.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.image-item {
  width: 120px;
  height: 120px;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f7fa;
  border: 1px solid #dcdfe6;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.image-item:hover {
  border-color: #409eff;
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-item.is-default {
  border-color: #409eff;
}

.default-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #409eff;
  color: #ffffff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 1;
}

.item-remark {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 11px;
  padding: 4px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 加载动画 */
.detail-image-loading {
  text-align: center;
  padding: 40px 20px;
  color: #909399;
  font-size: 14px;
}

.detail-image-loading i {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
  color: #409eff;
}

/* 响应式 */
@media (max-width: 768px) {
  .detail-confirm-dialog .detail-header {
    padding: 0 40px 0 16px;
    height: 46px;
    line-height: 46px;
  }
  
  .detail-confirm-dialog .detail-body {
    padding: 16px;
  }
  
  .detail-confirm-dialog .detail-footer {
    padding: 16px;
  }
  
  .image-item {
    width: 100px;
    height: 100px;
  }
}

/* =========================================
   兼容旧版详情样式 - 全局统一
   支持 .form-group、.form-label、.form-value 旧类名
   自动应用新的现代化详情展示样式
========================================= */

/* 兼容旧版表单组 */
.detail-confirm-dialog .form-group {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  align-items: start;
  /* 覆盖 form-unified.css 的 50% max-width，确保详情弹窗字段横向撑满 */
  flex: 1 1 100%;
  max-width: 100%;
}

.detail-confirm-dialog .form-group:last-child {
  border-bottom: none;
}

/* 兼容旧版标签 */
.detail-confirm-dialog .form-label {
  font-size: 14px;
  color: #909399;
  font-weight: 500;
  line-height: 1.6;
  text-align: right;
  white-space: nowrap;
}

/* 兼容旧版值展示 */
.detail-confirm-dialog .form-value {
  color: #303133;
  font-size: 15px;
  line-height: 1.6;
  padding: 2px 0;
  background: transparent;
  border: none;
  word-break: break-all;
  font-weight: 400;
}

.detail-confirm-dialog .form-value.highlight {
  font-weight: 600;
  color: #409eff;
}

.detail-confirm-dialog .form-value.empty {
  color: #c0c4cc;
  font-style: italic;
  font-weight: 400;
}

/* =========================================
   校徽列表样式 - Badge List
========================================= */

/* 校徽区块 */
.badge-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ebeef5;
}

.badge-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f5f5f5;
}

.badge-section-title i {
  color: #409eff;
  font-size: 16px;
}

/* 校徽列表 */
.badge-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 校徽项 */
.badge-item {
  background: #f5f7fa;
  border-radius: 6px;
  padding: 14px 16px;
  border: 1px solid #e4e7ed;
  transition: all 0.2s;
}

.badge-item:hover {
  background: #ffffff;
  border-color: #409eff;
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.1);
}

/* 校徽项头部 */
.badge-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e4e7ed;
}

.badge-item-index {
  font-size: 13px;
  font-weight: 600;
  color: #409eff;
}

/* 校徽项内容 */
.badge-item-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge-field {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.badge-field-label {
  font-size: 12px;
  color: #909399;
  font-weight: 500;
  min-width: 60px;
  flex-shrink: 0;
}

.badge-field-value {
  font-size: 14px;
  color: #303133;
  font-weight: 400;
  word-break: break-all;
  flex: 1;
}

/* 校徽状态标签 */
.badge-status-normal {
  background: #e6f7e6 !important;
  color: #1f7a1f !important;
  border: 1px solid #b7eb8f !important;
}

.badge-status-abnormal {
  background: #fef0f0 !important;
  color: #f56c6c !important;
  border: 1px solid #fbc4c4 !important;
}

/* 空校徽提示 */
.badge-empty {
  text-align: center;
  padding: 24px 16px;
  color: #c0c4cc;
  font-size: 13px;
  font-style: italic;
  background: #fafafa;
  border-radius: 6px;
  border: 1px dashed #dcdfe6;
}