.enterprise-filter-bar {
  display: flex;
  gap: 12px;
  padding: 4px 12px 8px;
  border-bottom: 1px solid #eee;
  margin-bottom: 6px;
  align-items: center;
  justify-content: flex-start;
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  white-space: nowrap !important;
  -webkit-overflow-scrolling: touch;
}

.enterprise-filter-bar::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.filter-count {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #606266;
}

.filter-count .num {
  color: #ef4444;
  font-weight: 500;
}

.sub-filter-bar {
  display: flex;
  justify-content: flex-start;
  margin: 8px 0 12px;
  position: relative;
}

.sub-filter-inner {
  display: flex;
  width: 100%;
  gap: 8px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}

.sub-filter-group {
  position: relative;
}

.sub-filter-search {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.sub-filter-search-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 47, 70, 0.06);
}

.sub-filter-search-input {
  width: 100px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #303133;
}

.sub-filter-search-input::placeholder {
  color: #c0c4cc;
}

.sub-filter-search-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin-left: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c0c4cc;
}

.sub-filter-search-btn:hover .sub-filter-search-icon {
  opacity: 0.85;
}

.sub-filter-search-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
}

.sub-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  background: #fff;
  color: #303133;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(31, 47, 70, 0.06);
  cursor: pointer;
}

.sub-filter-btn:hover {
  border-color: #cfd8e3;
}

.sub-filter-caret {
  display: inline-block;
  color: #909399;
  transition: transform 0.2s ease;
  transform-origin: center center;
}

.sub-filter-group.open .sub-filter-caret {
  transform: rotate(180deg);
}

.sub-filter-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  min-width: 240px;
  max-width: 280px;
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 47, 70, 0.08);
  padding: 6px;
  display: none;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sub-filter-pop.open {
  display: block;
}

.sub-filter-pop::-webkit-scrollbar {
  width: 8px;
}

.sub-filter-pop::-webkit-scrollbar-thumb {
  background: #dfe3e8;
  border-radius: 6px;
}

.sub-filter-pop::-webkit-scrollbar-thumb:hover {
  background: #cfd4da;
}

.sub-filter-pop::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 24px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-left: 1px solid #e6e8eb;
  border-top: 1px solid #e6e8eb;
}

.sub-pop-item {
  padding: 10px 12px;
  border-radius: 6px;
  color: #303133;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-pop-item:hover {
  background: #f5f7fa;
}

.sub-pop-item.active {
  background: #e7fff6;
  color: #20c997;
}

.enterprise-container.section {
  padding-top: 15px;
  padding-bottom: 24px;
}

.enterprise-container>.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto 40px;
  padding: 0 12px;
}

.enterprise-filter-bar .filter-item {
  cursor: pointer;
  font-size: 16px;
  color: #606266;
  position: relative;
  padding-bottom: 8px;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.filter-item.active {
  color: #333;
  font-weight: 600;
}

.filter-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #409EFF;
  border-radius: 2px;
}

.enterprise-grid {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding-bottom: 32px;
}

body.require-login.logged-out .enterprise-container .enterprise-filter-bar,
body.require-login.logged-out .enterprise-container .enterprise-grid {
  display: none !important;
}

.ent-card {
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  padding: 12px;
  padding-bottom: 8px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.ent-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.ent-card.active {
  border-color: #409EFF;
  background: #fdfdfd;
}

.ent-header {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.ent-logo {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: #f0f2f5;
  flex-shrink: 0;
  border: 1px solid #e6e8eb;
}

.ent-info {
  flex: 1;
  overflow: hidden;
}

.ent-name {
  font-size: 14px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 10em;
  display: block;
}

.ent-badges {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
  justify-content: flex-start;
}

.ent-badge {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0f2f5;
  color: #909399;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ent-badge:first-child {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  flex: 0 0 auto;
}

.ent-badges .ent-badge:nth-child(2) {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 120px;
}

.ent-badge.highlight {
  background: #e1f3d8;
  color: #67c23a;
}

.ent-details {
  font-size: 13px;
  color: #606266;
  line-height: 1.5;
  margin-top: 4px;
}

.ent-detail-row {
  display: flex;
  justify-content: space-between;
  line-height: 22px;
  margin-bottom: 2px;
}

.ent-intro-snippet {
  display: none;
}

.ent-action {
  margin-top: 2px;
  text-align: center;
  padding-top: 0;
}

.btn-apply {
  display: inline-block;
  width: auto;
  padding: 2px 0;
  text-align: center;
  color: #20c997;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  text-decoration: none;
  text-underline-offset: 2px;
}

.btn-apply:hover {
  color: #0f766e;
  text-decoration: none;
}

.status-corner {
  position: absolute;
  top: 6px;
  right: -18px;
  transform: rotate(45deg);
  transform-origin: center;
  background: hsl(0, 84%, 57%);
  color: #fff;
  padding: 2px 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.18);
  pointer-events: none;
}

.status-corner-upcoming {
  background: #e4e7ed;
  color: #606266;
  box-shadow: none;
}

.ent-detail-dialog {
  width: 960px;
  max-width: 95vw;
  border-radius: 8px;
  overflow: visible;
  border: 0.5px solid #e7eef8;
  padding: 12px;
}

.ent-detail-dialog .modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  border: 0.5px solid #e6e8eb;
  color: #606266;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.ent-detail-dialog .modal-close:hover {
  background-color: #f0f2f5;
  color: #303133;
}

.ent-banner {
  background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
  color: #fff;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.ent-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: 0;
}

.ent-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ent-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.ent-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.ent-tags {
  display: flex;
  gap: 12px;
  font-size: 14px;
  opacity: 0.9;
}

.ent-upload-btn {
  background: #20c997;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}

.ent-main {
  padding: 12px;
  background: #f5f7fa;
  max-height: 60vh;
  overflow-y: auto;
}

.ent-section {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ent-desc-text {
  line-height: 1.6;
  color: #333;
  font-size: 14px;
  text-align: justify;
}

.schedule-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 700;
  flex-wrap: wrap;
}

.schedule-card {
  background: #f0fbf8;
  border: 1px solid #d1f2e9;
  border-radius: 8px;
  padding: 16px;
}

.schedule-item {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

.schedule-label {
  width: auto;
  color: #606266;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}

.group-btn {
  background: #fff;
  border: 1px solid #dcdfe6;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  color: #20c997;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.group-btn:hover {
  border-color: #20c997;
  color: #17b487;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(32, 201, 151, 0.18);
}

.source-btn {
  border: 1px solid #20c997;
  color: #20c997;
  background: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.source-btn:hover {
  color: #17b487;
  border-color: #17b487;
  transform: translateY(-1px);
}

.apply-btn-lg {
  background: #20c997;
  color: #fff;
  border: none;
  padding: 5px 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.apply-btn-lg:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.subsidiary-link {
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.subsidiary-link:hover {
  color: #2d7bd9;
  text-decoration: underline;
}

@media (max-width: 1000px) {
  .ent-upload-btn {
    display: none !important;
  }

  .sub-filter-bar {
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .sub-filter-inner {
    width: auto;
    flex: 1;
  }

  .filter-count {
    position: static;
    transform: none;
    width: auto;
    margin-left: auto;
    text-align: right;
    padding: 0 2px;
    margin-top: 0;
    white-space: nowrap;
  }

  .filter-item {
    font-size: 15px !important;
  }
}