/* ============================================================
   통합 관리자 포털 전용 스타일 (portal.css)
   - admin.css(공통) 위에 포털에서만 쓰는 클래스만 추가합니다.
   - 공통 파일(admin.css)은 원본을 그대로 유지합니다.
   ============================================================ */

body[data-service="portal"] {
  --admin-primary: #4f46e5;
  --admin-primary-dark: #4338ca;
  --admin-primary-light: #e0e7ff;
}

.portal-brand-sub {
  display: block;
  font-size: .8rem;
  color: var(--admin-text-soft);
  margin-top: 2px;
}

/* ---------- 증감 배지 ---------- */
.portal-delta {
  font-weight: 800;
  font-size: .82rem;
}
.portal-delta.is-up   { color: #16a34a; }
.portal-delta.is-down { color: #dc2626; }
.portal-delta.is-flat { color: #94a3b8; }
.portal-delta.is-new  { color: #0284c7; }

/* ---------- 서비스 배지 ---------- */
.portal-svc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 3px 10px 3px 8px;
  white-space: nowrap;
}
.portal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, #64748b);
  flex: 0 0 auto;
}

/* ---------- 전체 추이 막대 차트 ---------- */
.portal-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 220px;
  padding: 8px 4px 0;
  overflow-x: auto;
}
.portal-bar {
  flex: 1 0 12px;
  min-width: 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}
.portal-bar-fill {
  width: 100%;
  max-width: 26px;
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  border-radius: 4px 4px 0 0;
  transition: height .2s ease;
  min-height: 2px;
}
.portal-bar:hover .portal-bar-fill { background: linear-gradient(180deg, #818cf8, #6366f1); }
.portal-bar-val {
  font-size: .68rem;
  color: #64748b;
  margin-bottom: 3px;
  white-space: nowrap;
}
.portal-bar-label {
  font-size: .68rem;
  color: #94a3b8;
  margin-top: 4px;
  white-space: nowrap;
  height: 14px;
}

/* ---------- 서비스별 표 ---------- */
.portal-num,
td.portal-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.portal-soft { color: #94a3b8; font-size: .85rem; white-space: nowrap; }
.portal-link { color: var(--admin-primary); font-weight: 700; text-decoration: none; }
.portal-link:hover { text-decoration: underline; }
tr.is-muted td { background: #fafafa; }

.portal-cell-bar {
  display: inline-block;
  width: 64px;
  height: 8px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
  margin-right: 8px;
  vertical-align: middle;
}
.portal-cell-fill {
  height: 100%;
  border-radius: 999px;
}

/* ---------- 점유율 ---------- */
.portal-share-foot {
  text-align: right;
  color: #94a3b8;
  font-size: .82rem;
  margin-top: 12px;
}

/* ---------- TOP 화면 ---------- */
.portal-rank-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.portal-rank-left .admin-rank-num {
  flex: 0 0 auto;
}

/* ---------- 필터 알약 그룹 간격 ---------- */
#portal-trend-range { gap: 6px; }

@media (max-width: 640px) {
  .portal-bars { height: 170px; }
  .portal-bar-val { display: none; }
}
