/* 蓝色主题表单管理页面样式 */
/* 全局样式重置和基础设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 下拉菜单样式优化 */
.dropui-menu li a {
  padding: 8px 0 8px 27px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dropui-menu li a:hover {
  background-color: rgba(33, 150, 243, 0.1);
  padding-left: 30px;
}

.dropui .dropui-tab {
  font-size: 14px;
  padding: 8px 16px;
}

/* 完全禁用dropui框架生成的菜单，防止与自定义菜单冲突 */
.dropui .dropui-content {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.dropui:hover .dropui-content,
.dropui.hovered .dropui-content {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 上传组件样式 */
.uploadifive-queue-item { 
  border: none !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 12px;
}

#uploadifive_upload_mf_form_import_file {
  z-index: 1999 !important;
}

/* 表单列表布局 - 网格系统 */
.forms_list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px 0;
  justify-content: flex-start;
}

/* 大屏幕设备 - 4列布局 */
@media (min-width: 1200px) {
  .forms_list {
    gap: 20px;
  }
  
  li[id^="liform_"] {
    flex: 1 1 calc(25% - 15px);
    min-width: 250px;
  }
}

/* 中等屏幕设备 - 3列布局 */
@media (max-width: 1199px) and (min-width: 769px) {
  li[id^="liform_"] {
    flex: 1 1 calc(33.33% - 11.25px);
    min-width: 220px;
  }
}

/* 小屏幕设备 - 2列布局 */
@media (max-width: 768px) {
  li[id^="liform_"] {
    flex: 1 1 calc(50% - 7.5px);
    min-width: 200px;
  }
}

/* 超小屏幕设备 - 1列布局 */
@media (max-width: 480px) {
  li[id^="liform_"] {
    flex: 1 1 100%;
    min-width: auto;
  }
}

/* 统一所有表单项的基础样式 */
li[id^="liform_"] {
  position: relative;
  margin-bottom: 0;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  border: 2px solid #0d47a1;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  flex: 1 1 calc(25% - 11.25px);
  min-width: 200px;
  max-width: none;
  padding: 0;
  margin-left: 0 !important;
}

li[id^="liform_"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

/* 主表样式 */
.parent_form {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  border-left: 5px solid #ff9800;
  margin-left: 0 !important;
}

.parent_form:hover {
  box-shadow: 0 8px 25px rgba(25,118,210,0.4);
}

/* 关联表样式 */
.child_form {
  background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
  border-left: 5px solid #42a5f5;
  margin-left: 25px !important;
}

.child_form:hover {
  box-shadow: 0 8px 25px rgba(30,136,229,0.4);
}

/* 其他表样式 - 统一宽度和对齐 */
.other_form {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  border-left: 5px solid #64b5f6;
  margin-left: 0 !important;
}

/* 展开/折叠按钮样式 */
.form_expand_toggle {
  position: absolute;
  left: 12px;
  cursor: pointer;
  padding: 6px 10px;
  background-color: #ff9800;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100;
  border: none;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.form_expand_toggle:hover {
  background-color: #f57c00;
  transform: scale(1.1);
}

.form_expand_toggle.collapsed {
  background-color: #42a5f5;
}

.form_expand_toggle.collapsed:hover {
  background-color: #2196f3;
}

.form_expand_toggle .expand_icon {
  transition: transform 0.3s ease;
  font-weight: bold;
}

.form_expand_toggle.collapsed .expand_icon {
  transform: rotate(-90deg);
}

/* 表单类型标签样式 */
.form_type_badge {
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin: 10px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
}

.main_form_badge {
  background-color: #ff9800;
  color: white;
  border: none;
}

.child_form_badge {
  background-color: #42a5f5;
  color: white;
  border: none;
}

/* 表单标题样式 */
.form_title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 10px;
  padding-left: 50px;
  padding-top: 15px;
  padding-right: 20px;
  line-height: 1.4;
  transition: color 0.3s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.parent_form .form_title {
  color: #fff3e0;
}

.child_form .form_title {
  color: #e3f2fd;
}

/* 表单统计信息 */
.form_stat {
  background-color: rgba(255,255,255,0.95);
  border-radius: 6px;
  padding: 10px 14px;
  text-align: right;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.3);
}

.form_stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.form_stat_count {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  display: inline-block;
}

.form_stat_msg {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 表单操作按钮样式 - 高优先级确保不被覆盖 */
.form_actions {
  position: absolute !important;
  right: 12px !important;
  top: 12px !important;
  z-index: 9999 !important;
}

/* 使用双重选择器提高优先级 */
.form_actions .form_actions_toggle,
.form_actions > a.form_actions_toggle {
  background-color: rgba(255,255,255,0.9) !important;
  color: #1976d2 !important;
  border: none !important;
  border-radius: 50% !important;
  width: 34px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
  text-decoration: none !important;
  z-index: 10000 !important;
  position: relative !important;
}

.form_actions .form_actions_toggle:hover,
.form_actions > a.form_actions_toggle:hover {
  background-color: white !important;
  transform: rotate(90deg) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* 表单操作菜单 - 使用属性选择器确保所有表单的菜单都应用 */
[id^="action_toggle_content_"] {
  position: absolute !important;
  right: 10px !important;
  top: 50px !important;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25) !important;
  overflow: hidden !important;
  z-index: 9999 !important;
  min-width: 180px !important;
  display: none !important;
  border: 2px solid #dee2e6 !important;
  /* 确保菜单不会被其他元素覆盖 */
  pointer-events: auto !important;
  visibility: visible !important;
}

.form_action_item {
  padding: 12px 16px;
  border-bottom: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.form_action_item:last-child {
  border-bottom: none;
}

.form_action_item:hover {
  background-color: #1976d2;
  padding-left: 20px;
}

.form_action_item a {
  color: #495057;
  text-decoration: none;
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.form_action_item:hover a {
  color: white;
}

/* 表单底部工具栏 */
.bottom_form_bar {
  background-color: rgba(255,255,255,0.95);
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form_option {
  border-radius: 20px;
  padding: 7px 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.3);
}

.form_option:hover {
  background-color: #1976d2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-color: #1976d2;
}

.form_option a {
  color: #495057;
  text-decoration: none;
  font-weight: 500;
}

.form_option:hover a {
  color: white;
}

/* 表单标签样式 */
.form_tag {
  margin-top: 10px;
  width: 100%;
}

.form_tag_list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.form_tag_list li {
  background-color: rgba(255,255,255,0.9);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  color: #1565c0;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form_tag_list li a {
  color: #1565c0;
  text-decoration: none;
  font-weight: 500;
}

.form_tag_list li:hover {
  background-color: white;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* 中间内容栏样式 */
.middle_form_bar {
  padding: 14px 50px 14px 10px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.parent_form .middle_form_bar,
.child_form .middle_form_bar,
.other_form .middle_form_bar {
  margin-left: 0 !important;
}

/* 筛选按钮样式优化 */
.filter_buttons {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.filter_buttons button {
  background-color: white;
  border: 2px solid #e9ecef;
  border-radius: 24px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  color: #495057;
}

.filter_buttons button:hover {
  background-color: #1976d2;
  border-color: #1976d2;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(25,118,210,0.4);
}

.filter_buttons button.active {
  background-color: #1976d2;
  border-color: #1976d2;
  color: white;
  box-shadow: 0 4px 15px rgba(25,118,210,0.4);
}

/* 响应式优化 */
@media (max-width: 768px) {
  .forms_list {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  li[id^="liform_"],
  .parent_form,
  .other_form {
    max-width: 100%;
  }
  
  .child_form {
    margin-left: 15px !important;
    max-width: calc(100% - 15px);
  }
  
  .form_title {
    font-size: 15px;
    padding-left: 45px;
  }
}

/* 确保所有表单项对齐一致 */
.forms_list > li {
  margin-left: 0 !important;
  width: 100%;
}

/* 统计数字和状态标识样式优化 */
.status_badge {
  background-color: rgba(255,255,255,0.9);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1976d2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* 操作菜单分隔线 */
.form_action_divider {
  height: 1px;
  background-color: #dee2e6;
  margin: 2px 0;
}

/* 加载动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

li[id^="liform_"] {
  animation: fadeIn 0.5s ease-out;
}

/* 按钮波纹效果 */
button, .form_actions_toggle, .form_option {
  position: relative;
  overflow: hidden;
}

button::after, .form_actions_toggle::after, .form_option::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

button:focus:not(:active)::after, .form_actions_toggle:focus:not(:active)::after, .form_option:focus:not(:active)::after {
  animation: ripple 0.5s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}